* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    font-family: "Cinzel";
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(180deg, #1a0b2e 0%, #0d0e12 100%);
    color: #e0e0ff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(15px + env(safe-area-inset-top)) 10px calc(80px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    position: relative;
    touch-action: pan-x pan-y;
}
h2 {
    color: #f0c05a;
}
.dimmed-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dimmed-overlay.show {
    opacity: 1;
}

.casino-container,
.leaders-container,
.balance-container,
.friends-container,
.profile-container {
    max-width: 360px;
    width: 100%;
    background: #1c1129;
    border-radius: 12px;
    padding: calc(10px + env(safe-area-inset-top)) 15px 15px;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    margin: 0 auto; /* Added for explicit centering */
}

.casino-container.fullscreen {
    margin-top: calc(40px + env(safe-area-inset-top));
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(240, 192, 90, 0.3);
}

.page-header .logo {
    height: 3.5em;
    width: 120px;
    margin-left: 5px;
    filter: drop-shadow(0 0 10px rgba(240, 192, 90, 0.5));
}

.page-header .wallet-balance {
    font-size: 1.3em;
    font-weight: 400;
    margin-right: 5px;
    color: #e0e0ff;
    display: flex;
    align-items: center;
    gap: 7px;
    text-align: right;
}

.character-image {
    display: block;
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 0 10px rgba(159, 54, 241, 0.3));
}

.info-panel {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 15px;
}

.info-box {
    flex: 1;
    background: rgba(28, 17, 41, 0.8);
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #f0c05a;
}

.info-box h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.8em;
    color: #f0c05a;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.info-box .value {
    font-size: 1em;
    font-weight: 400;
    color: #e0e0ff;
}

.slot-machine {
    background: #1c1129;
    border-radius: 12px;
    padding: 10px;
    border: 2px solid #f0c05a;
    box-shadow: 0 0 15px rgba(159, 54, 241, 0.2);
}

.slot-frame {
    display: flex;
    justify-content: center;
    gap: 2px;
    background: #0d0e12;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.reel-container {
    width: calc(100% / 5);
    height: 210px;
    background: #0d0e12;
    overflow: hidden;
    position: relative;
}

.reel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

.symbol {
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0d0e12;
    border-bottom: 1px solid rgba(240, 192, 90, 0.1);
}

.symbol img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(159, 54, 241, 0.3));
}

.symbol.win {
    background: linear-gradient(45deg, #f0c05a, #9f36f1);
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px #f0c05a; }
    to { box-shadow: 0 0 15px #9f36f1; }
}

.result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 14, 18, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.result-overlay.show {
    opacity: 1;
}

.result-text {
    font-family: 'Cinzel', serif;
    font-size: 1em;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    background: #f0c05a;
    color: #0d0e12;
    border: 1px solid #9f36f1;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.result-text.win-message {
    background: #f0c05a;
    color: #0d0e12;
}

.result-text.lose-message {
    background: #1c1129;
    color: #e0e0ff;
    font-size: 0.9em;
}

.controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.left-controls,
.right-controls,
.centerright {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.centerright {
}
.right-controls {
    display: flex;
    flex-grow: 2;
}
.left-controls button {
    width: 100%;
    flex-grow: 1;
}
.spin-button {
    width: 100%;
    min-width: 80px;
    height: 80px;
    border-radius: 500px;
    border: 3px solid #722B83;
    background: linear-gradient(0deg,rgba(65, 18, 86, 1) 0%, rgba(80, 23, 104, 1) 100%);
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 0 10px rgba(159, 54, 241, 0.3);
}
.spin-button svg {
    width: 50px;
    height: 50px;
    color: #f0c05a;
}

.spin-button:hover {
    transform: scale(1.05);
}

.spin-button:active {
    transform: scale(0.95);
}

.spin-button.dimmed {
    opacity: 0.5;
    pointer-events: none;
}

.spin-button.spinning {
    animation: pulse 1s ease-in-out infinite;
}

.promocode-section {
    background: rgba(28, 17, 41, 0.6);
    border: 2px solid rgba(240, 192, 90, 0.4);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(159, 54, 241, 0.2);
    margin-top: 4px;
}

.promocode-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1em;
    color: #f0c05a;
    margin-bottom: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
}

.promocode-title i {
    font-size: 1.2em;
    color: #9f36f1;
    animation: rotate-ticket 3s ease-in-out infinite;
}

@keyframes rotate-ticket {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.promocode-info {
    background: rgba(159, 54, 241, 0.15);
    border: 1px solid rgba(159, 54, 241, 0.4);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.promocode-info i {
    color: #9f36f1;
    font-size: 1.1em;
    flex-shrink: 0;
}

.promocode-info p {
    font-size: 0.8em;
    color: #e0e0ff;
    margin: 0;
    line-height: 1.4;
}

.promocode-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.promocode-input {
    flex: 1;
    background: #0d0e12;
    border: 2px solid #f0c05a;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Cinzel', serif;
    font-size: 0.95em;
    color: #e0e0ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 100%;
}

.promocode-input::placeholder {
    color: rgba(224, 224, 255, 0.4);
    text-transform: none;
    letter-spacing: normal;
}

.promocode-input:focus {
    outline: none;
    border-color: #9f36f1;
    box-shadow: 0 0 15px rgba(159, 54, 241, 0.3);
}

.promocode-submit {
    background: linear-gradient(135deg, #9f36f1, #7b2cbf);
    color: #e0e0ff;
    padding: 12px 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.9em;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(159, 54, 241, 0.3);
}

.promocode-submit i {
    font-size: 1.1em;
    color: #f0c05a;
}

.promocode-submit:hover {
    background: linear-gradient(135deg, #7b2cbf, #9f36f1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(159, 54, 241, 0.4);
}

.promocode-submit:active {
    transform: translateY(0);
}

.promocode-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.promocode-error {
    font-size: 0.8em;
    text-align: center;
    min-height: 1.2em;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 360px) {
    .promocode-section {
        padding: 12px;
    }

    .promocode-title {
        font-size: 1em;
    }

    .promocode-input {
        font-size: 0.85em;
        padding: 10px;
    }

    .promocode-submit {
        font-size: 0.85em;
        padding: 10px 16px;
    }

    .promocode-info p {
        font-size: 0.75em;
    }
}

@media (max-width: 320px) {
    .promocode-input-container {
        flex-direction: column;
    }

    .promocode-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 350px) {
    .controls {
        width: fit-content;
        flex-wrap: wrap;
    }
    .spin-button {
        width: 100%;
    }

    .right-controls {
        display: flex;
    }
    .gameSettings {flex-wrap: wrap;}
}
@media (max-width: 270px) {
    .controls {
        width: fit-content;
        flex-wrap: wrap;
    }
    .spin-button {
        width: 100%;
    }
    
    .left-controls,
    .right-controls {
        width: 100%;
    }
    .controls {

    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 10px rgba(159, 54, 241, 0.3); }
    50% { box-shadow: 0 0 20px rgba(159, 54, 241, 0.5); }
    100% { box-shadow: 0 0 10px rgba(159, 54, 241, 0.3); }
}
.button {
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    font-weight: 700;
    border: 3px solid #722B83;
    background: linear-gradient(0deg,rgba(65, 18, 86, 1) 0%, rgba(80, 23, 104, 1) 100%);
    border-radius: 5px;
    color: #f0c05a;
    display: flex;
    justify-content: center;
    height: 36px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
} .button svg { margin-right: 5px; width: 20px; color: #f0c05a;}
 .button svg path { color: #f0c05a;}
.controls {
    display: flex;
    align-items: center;
}
.control-button .bet-settings-button, .auto-button {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    transition: transform 0.2s ease, opacity 0.2s ease;
    width: 100%;
}

.control-button:hover {
    transform: scale(1.05);
}

.control-button:active {
    transform: scale(0.95);
}

.control-button.dimmed {
    opacity: 0.5;
    pointer-events: none;
}

.paytable-button {
    border: none;
    cursor: pointer;
    display: block;
    text-align: center;
    text-transform: uppercase;
    transition: transform 0.2s ease;
    width: 100%;
    height: 100%;
    padding: 10px;
}

.paytable-button:hover {
    transform: scale(1.05);
}
.paytable-button:active {
    transform: scale(0.95);
}

.button-table {
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    font-weight: 700;
    border: 3px solid #f0c05a;
    background: #1C1129;
    border-radius: 13px;
    color: #f0c05a;
} .button svg { margin-right: 5px; width: 20px; color: #f0c05a;}
 .button svg path { color: #f0c05a;}

.bet-settings-modal, .auto-settings-modal, .paytable-modal {
    position: fixed;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1c1129;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #f0c05a;
    display: none;
    z-index: 100;
    width: 80%;
    max-width: 300px;
    box-shadow: 0 0 20px rgba(159, 54, 241, 0.3);
}
.bet-settings-modal.show, .auto-settings-modal.show, .paytable-modal.show {
    display: block;
}

.bet-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bet-settings-label {
    font-family: 'Cinzel', serif;
    font-size: 0.8em;
    color: #f0c05a;
}

.bet-settings-value {
    font-size: 0.8em;
    color: #e0e0ff;
    font-weight: 400;
    background: #0d0e12;
    padding: 5px 10px;
    border-radius: 6px;
}

.bet-adjust-button {
    background: #9f36f1;
    color: #e0e0ff;
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s ease;
}

.bet-adjust-button:hover {
    background: #7b2cbf;
    transform: scale(1.05);
}

.bet-adjust-button:active {
    transform: scale(0.95);
}

.bet-adjust-button:disabled {
    background: #4b3a6b;
    cursor: not-allowed;
    opacity: 0.5;
}

.max-bet-button {
    background: #0d0e12;
    color: #f0c05a;
    padding: 5px 10px;
    font-size: 0.75em;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.max-bet-button:hover {
    background: #7b2cbf;
    transform: scale(1.05);
}

.max-bet-button:active {
    transform: scale(0.95);
}

.adjust-group {
    display: flex;
    align-items: center;
    gap: 5px; /* Reduced gap to make + and - closer to the number */
}

.ok-button {
    background: #9f36f1;
    color: #e0e0ff;
    padding: 8px;
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 50%;
    transition: background 0.2s, transform 0.2s ease;
    text-transform: uppercase;
    display: block;
    margin: 0 auto;
}

.ok-button:hover {
    background: #7b2cbf;
    transform: scale(1.05);
}

.ok-button:active {
    transform: scale(0.95);
}

.toggle-auto-spin {
    background: #9f36f1;
    color: #e0e0ff;
    padding: 8px 16px;
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s ease;
    text-transform: uppercase;
    width: 100%;
    margin-bottom: 10px;
}

.toggle-auto-spin.active {
    background: #f0c05a;
    color: #0d0e12;
}

.toggle-auto-spin:active {
    transform: scale(0.95);
}

.disabled-setting {
    opacity: 0.5;
    pointer-events: none;
}

.paytable-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.paytable-content::-webkit-scrollbar {
    width: 6px;
}

.paytable-content::-webkit-scrollbar-track {
    background: #0d0e12;
    border-radius: 3px;
}

.paytable-content::-webkit-scrollbar-thumb {
    background: #f0c05a;
    border-radius: 3px;
}

.paytable-content h3 {
    font-family: 'Cinzel', serif;
    font-size: 1em;
    color: #f0c05a;
    margin-bottom: 10px;
    text-align: center;
}

.paytable-content p {
    font-size: 0.8em;
    color: #e0e0ff;
    margin-bottom: 15px;
}

.paytable-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.paytable-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(159, 54, 241, 0.3));
}

.paytable-item span {
    font-size: 0.8em;
    color: #e0e0ff;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 10px;
}

.leaderboard-trophy {
    font-size: 2.5em;
    color: #f0c05a;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(240, 192, 90, 0.5));
}

.leaderboard-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5em;
    color: #f0c05a;
    margin-bottom: 5px;
    font-weight: 700;
}

.leaderboard-subtitle {
    font-size: 0.85em;
    color: #e0e0ff;
    opacity: 0.8;
}

.leaderboard-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 15px;
    padding: 0 10px;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 110px;
}

.podium-rank {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.podium-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6496f3, #1044ee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1em;
    color: #fff;
    margin-bottom: 8px;
    border: 2px solid #f0c05a;
    box-shadow: 0 4px 10px rgba(159, 54, 241, 0.3);
}

.podium-avatar-winner {
    width: 60px;
    height: 60px;
    font-size: 1.2em;
    animation: winner-glow 2s ease-in-out infinite;
}

@keyframes winner-glow {
    0%, 100% { box-shadow: 0 4px 10px rgba(240, 192, 90, 0.5); }
    50% { box-shadow: 0 6px 20px rgba(240, 192, 90, 0.8); }
}

.podium-name {
    font-family: 'Cinzel', serif;
    font-size: 0.75em;
    color: #e0e0ff;
    margin-bottom: 5px;
    font-weight: 600;
    text-align: center;
}

.podium-score {
    font-size: 0.7em;
    color: #f0c05a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.currency-icon-small {
    width: 17px;
    height: 17px;
    vertical-align: middle;
}

.podium-base {
    width: 100%;
    background: linear-gradient(180deg, #9f36f1, #7b2cbf);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    font-weight: 700;
    color: #fff;
    border: 2px solid #f0c05a;
    border-bottom: none;
}

.podium-base-first {
    height: 80px;
    background: linear-gradient(180deg, #f0c05a, #d4a849);
}

.podium-base-second {
    height: 60px;
    background: linear-gradient(180deg, #c0c0c0, #a8a8a8);
}

.podium-base-third {
    height: 40px;
    background: linear-gradient(180deg, #cd7f32, #b87333);
}

.podium-first { order: 2; }
.podium-second { order: 1; }
.podium-third { order: 3; }

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(28, 17, 41, 0.6);
    padding: 5px;
    border-radius: 10px;
    border: 1px solid rgba(240, 192, 90, 0.2);
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    background: rgba(28, 17, 41, 0.9);
    border-color: rgba(240, 192, 90, 0.5);
    transform: translateX(3px);
}

.leaderboard-item-you {
    background: rgba(159, 54, 241, 0.2);
    border: 2px solid #9f36f1;
}

.leaderboard-position {
    font-family: 'Cinzel', serif;
    font-size: 1em;
    font-weight: 700;
    color: #f0c05a;
    min-width: 25px;
    text-align: center;
}

.leaderboard-player {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.leaderboard-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9f36f1, #7b2cbf);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.75em;
    color: #fff;
    border: 1px solid #f0c05a;
}

.leaderboard-name {
    font-size: 0.85em;
    color: #e0e0ff;
    font-weight: 500;
}

.leaderboard-score {
    font-size: 0.8em;
    color: #f0c05a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.leaderboard-info {
    background: rgba(159, 54, 241, 0.15);
    border: 1px solid rgba(159, 54, 241, 0.4);
    border-radius: 10px;
    padding: 12px;
    margin-top: 15px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.leaderboard-info i {
    color: #9f36f1;
    font-size: 1.2em;
    margin-top: 2px;
    flex-shrink: 0;
}

.leaderboard-info p {
    font-size: 0.8em;
    color: #e0e0ff;
    line-height: 1.5;
    margin: 0;
}

.referral-header {
    text-align: center;
    margin-bottom: 20px;
}

.referral-gift-icon {
    font-size: 2.5em;
    color: #f0c05a;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(240, 192, 90, 0.5));
}

.referral-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5em;
    color: #f0c05a;
    margin-bottom: 5px;
    font-weight: 700;
}

.referral-subtitle {
    font-size: 0.9em;
    color: #e0e0ff;
    opacity: 0.9;
    font-weight: 500;
}

.referral-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.referral-stat-box {
    flex: 1;
    background: linear-gradient(135deg, rgba(159, 54, 241, 0.2), rgba(123, 44, 191, 0.2));
    border: 2px solid #9f36f1;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(159, 54, 241, 0.2);
}


.stat-number {
    font-family: 'Cinzel', serif;
    font-size: 1.8em;
    color: #f0c05a;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.stat-label {
    font-size: 0.75em;
    color: #e0e0ff;
    opacity: 0.8;
}

.referral-link-section {
    margin-bottom: 15px;
}

.referral-link-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    color: #f0c05a;
    margin-bottom: 8px;
    text-align: center;
}

.referral-link-container {
    background: #0d0e12;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #9f36f1;
    font-size: 0.75em;
    color: #e0e0ff;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(159, 54, 241, 0.2);
}

.referral-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.share-button {
    background: linear-gradient(135deg, #9f36f1, #7b2cbf);
    color: #e0e0ff;
    padding: 12px 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.95em;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(159, 54, 241, 0.3);
}

.share-button i {
    font-size: 1.2em;
    color: #f0c05a;
}

.share-button:hover {
    background: linear-gradient(135deg, #7b2cbf, #9f36f1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 54, 241, 0.4);
}

.share-button:active {
    transform: translateY(0px);
}

.referral-info-box {
    background: rgba(159, 54, 241, 0.15);
    border: 1px solid rgba(159, 54, 241, 0.4);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.referral-info-box i {
    color: #9f36f1;
    font-size: 1.2em;
    margin-top: 2px;
    flex-shrink: 0;
}

.referral-info-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    color: #f0c05a;
    margin-bottom: 8px;
    font-weight: 700;
}

.referral-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.referral-info-list li {
    font-size: 0.75em;
    color: #e0e0ff;
    line-height: 1.6;
    padding-left: 15px;
    position: relative;
    margin-bottom: 5px;
}

.referral-info-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #f0c05a;
    font-weight: 700;
}

.telegram-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1c1129;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #f0c05a;
    z-index: 1000;
    height: 72px;
}

.telegram-nav-button {
    background: none;
    border: none;
    color: #e0e0ff;
    font-family: 'Cinzel', serif;
    font-size: 0.9em;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.telegram-nav-button i {
    font-size: 1.7em;
    color: #f0c05a;
}

.telegram-nav-button:hover, .telegram-nav-button.active {
    color: #f0c05a;
    transform: scale(1.1);
}

.telegram-nav-button:hover i, .telegram-nav-button.active i {
    color: #f0c05a;
}

.telegram-nav-button:active {
    transform: scale(0.95);
}

.deposit-withdraw-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    margin-top: 15px; 
    justify-content: center;
}

.deposit-btn, .withdraw-btn {
    flex: 1;
    background: linear-gradient(135deg, #1c1129, #2a1b3e);
    color: #e0e0ff;
    padding: 12px;
    font-family: 'Cinzel', serif;
    font-size: 0.95em;
    font-weight: 700;
    border: 1px solid #f0c05a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease, transform 0.2s ease;
    text-align: center;
    max-width: 140px;
    box-shadow: 0 4px 8px rgba(159, 54, 241, 0.2);
}

.deposit-btn.active, .withdraw-btn.active {
    background: linear-gradient(135deg, #9f36f1, #7b2cbf);
    color: #e0e0ff;
    box-shadow: 0 6px 12px rgba(159, 54, 241, 0.3);
}

.deposit-btn:hover, .withdraw-btn:hover {
    background: linear-gradient(135deg, #7b2cbf, #9f36f1);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(159, 54, 241, 0.3);
}

.deposit-btn:active, .withdraw-btn:active {
    transform: scale(0.95);
}

.currency-section {
    margin-bottom: 10px;
}

.currency-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    color: #f0c05a;
    margin-bottom: 8px;
}

.currency-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0d0e12;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f0c05a;
    justify-content: center;
}

.currency-name {
    font-size: 0.9em;
    color: #e0e0ff;
}

.currency-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.qr-section {
    text-align: center;
    margin-bottom: 15px;
}

.qr-code {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    margin: 0 auto 8px;
    filter: drop-shadow(0 0 5px rgba(159, 54, 241, 0.3));
}

.qr-label {
    font-size: 0.75em;
    color: #e0e0ff;
    opacity: 0.8;
}

.address-section {
    margin-bottom: 15px;
}

.address-container {
    background: #0d0e12;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f0c05a;
    font-size: 0.8em;
    color: #e0e0ff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.address-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 25px);
}

.copy-icon {
    font-size: 0.9em;
    color: #f0c05a;
    cursor: pointer;
    transition: filter 0.2s;
}

.copy-icon:hover {
    filter: brightness(70%);
}

.withdrawal-section {
    margin-bottom: 15px;
}

.min-withdraw-note {
    font-size: 0.75em;
    color: #e0e0ff;
    margin-bottom: 10px;
    opacity: 0.8;
}

.withdrawal-input {
    width: 100%;
    background: #0d0e12;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f0c05a;
    font-size: 0.8em;
    color: #e0e0ff;
    margin-bottom: 0px;
}

.withdrawal-input:focus {
    outline: none;
    border-color: #9f36f1;
}

.error-message {
    color: #ff4d4d;
    font-size: 0.7em;
    margin-top: 2px;
    margin-bottom: 6px;
    min-height: 1em;
    text-align: center;
}

.max-button {
    background: #0d0e12;
    color: #f0c05a;
    padding: 2px 10px;
    height: 35px;
    font-size: 0.85em;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease, transform 0.2s ease;
    margin-top: 1px; /* Added margin to move the button down */
}

.max-button:hover {
    background: #7b2cbf;
    transform: scale(1.05);
}

.max-button:active {
    transform: scale(0.95);
}

.withdraw-submit, .deposit-submit {
    background: #9f36f1;
    color: #e0e0ff;
    padding: 10px;
    font-family: 'Cinzel', serif;
    font-size: 0.9em;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease, transform 0.2s ease;
    text-transform: uppercase;
}

.withdraw-submit:hover, .deposit-submit:hover {
    background: #7b2cbf;
    transform: scale(1.05);
}

.withdraw-submit:active, .deposit-submit:active {
    transform: scale(0.95);
}

.deposit-warning {
    font-size: 0.75em;
    color: #e0e0ff;
    text-align: center;
    margin-top: 10px;
    line-height: 1.5;
    opacity: 0.9;
}

.stars-deposit-section {
    margin-top: 20px;
}

.stars-info {
    background: rgba(159, 54, 241, 0.15);
    border: 1px solid rgba(159, 54, 241, 0.4);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.stars-info i {
    color: #9f36f1;
    font-size: 1.2em;
    margin-top: 2px;
    flex-shrink: 0;
}

.stars-info p {
    font-size: 0.8em;
    color: #e0e0ff;
    line-height: 1.5;
    margin: 0;
}

.deposit-amount-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.deposit-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #0d0e12;
    border: 2px solid #f0c05a;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 0 20px rgba(240, 192, 90, 0.2);
    transition: all 0.3s ease;
}

.deposit-input-wrapper:focus-within {
    border-color: #9f36f1;
    box-shadow: 0 0 25px rgba(159, 54, 241, 0.4);
}

.deposit-star-icon {
    font-size: 1.5em;
    color: #f0c05a;
    margin-right: 12px;
    filter: drop-shadow(0 0 8px rgba(240, 192, 90, 0.6));
}

.deposit-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #e0e0ff;
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    font-weight: 700;
    outline: none;
    padding: 0;
}

.deposit-amount-input::placeholder {
    color: rgba(224, 224, 255, 0.4);
    font-weight: 400;
}

.deposit-amount-input::-webkit-outer-spin-button,
.deposit-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.deposit-amount-input[type=number] {
    -moz-appearance: textfield;
}

.deposit-unit {
    font-family: 'Cinzel', serif;
    font-size: 1em;
    color: #f0c05a;
    font-weight: 600;
    margin-left: 8px;
    margin-right: 5px;
}

.deposit-quick-amounts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (max-width: 275px) {
    .deposit-quick-amounts {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }
}

.footer a {
    color: #fff;
}

.quick-amount-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap; /* keep star and number on one line */
    background: linear-gradient(135deg, rgba(28, 17, 41, 0.8), rgba(42, 27, 62, 0.8));
    border: 2px solid rgba(240, 192, 90, 0.4);
    border-radius: 10px;
    padding: 8px 12px;
    font-family: 'Cinzel', serif;
    font-size: 0.95em;
    font-weight: 600;
    color: #e0e0ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-amount-btn {
    display: flex;
    align-items: center; /* Center items vertically */
}

.quick-amount-btn:before {
    content: "⭐";
    font-size: 1.1em;
}

.quick-amount-btn:hover {
    background: linear-gradient(135deg, rgba(159, 54, 241, 0.3), rgba(123, 44, 191, 0.3));
    border-color: #9f36f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(159, 54, 241, 0.3);
}

.quick-amount-btn:active {
    transform: translateY(0);
}

.deposit-submit {
    background: linear-gradient(135deg, #9f36f1, #7b2cbf);
    color: #e0e0ff;
    padding: 12px 20px;
    font-family: 'Cinzel', serif;
    font-size: 1em;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(159, 54, 241, 0.3);
}

.deposit-submit i {
    font-size: 1.2em;
    color: #f0c05a;
}

.deposit-submit:hover {
    background: linear-gradient(135deg, #7b2cbf, #9f36f1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 54, 241, 0.4);
}

.deposit-submit:active {
    transform: translateY(0);
}

.stars-packages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.star-package-btn {
    background: linear-gradient(135deg, rgba(28, 17, 41, 0.8), rgba(42, 27, 62, 0.8));
    border: 2px solid #f0c05a;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.star-package-btn:hover {
    background: linear-gradient(135deg, rgba(159, 54, 241, 0.3), rgba(123, 44, 191, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 192, 90, 0.4);
}

.star-package-btn:active {
    transform: translateY(0);
}

.star-package-btn.featured {
    border-color: #9f36f1;
    background: linear-gradient(135deg, rgba(159, 54, 241, 0.2), rgba(123, 44, 191, 0.2));
    box-shadow: 0 4px 15px rgba(159, 54, 241, 0.3);
}

.star-package-btn.featured:hover {
    box-shadow: 0 6px 25px rgba(159, 54, 241, 0.5);
}

.popular-badge {
    position: absolute;
    top: -1px;
    right: 15px;
    background: linear-gradient(135deg, #9f36f1, #7b2cbf);
    color: #fff;
    font-size: 0.65em;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 0 0 8px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(159, 54, 241, 0.4);
}

.star-package-btn i {
    font-size: 2em;
    color: #f0c05a;
    filter: drop-shadow(0 0 8px rgba(240, 192, 90, 0.6));
}

.star-package-btn .star-amount {
    font-family: 'Cinzel', serif;
    font-size: 1.1em;
    color: #e0e0ff;
    font-weight: 700;
    flex: 1;
}

.star-package-btn .star-bonus {
    font-size: 0.9em;
    color: #f0c05a;
    font-weight: 600;
    background: rgba(240, 192, 90, 0.1);
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(240, 192, 90, 0.3);
}

.withdrawal-status {
    background: rgba(159, 54, 241, 0.15);
    border: 2px solid rgba(159, 54, 241, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}

.withdrawal-status i {
    color: #f0c05a;
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.withdrawal-status p {
    font-size: 0.85em;
    color: #e0e0ff;
    margin: 5px 0;
    line-height: 1.5;
}

.withdrawal-status p strong {
    color: #f0c05a;
    font-family: 'Cinzel', serif;
    font-size: 1.1em;
    display: block;
    margin-bottom: 8px;
}

.withdrawal-input {
    width: 100%;
    background: #0d0e12;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f0c05a;
    font-size: 0.8em;
    color: #e0e0ff;
    margin-bottom: 8px;
}

.withdrawal-input:focus {
    outline: none;
    border-color: #9f36f1;
}

.withdrawal-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    justify-content: center;
    background-color: #9f36f12c;
    padding: 10px;
    border-radius: 10px;
    border: 3px solid #190a25;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid #f0c05a;
    filter: drop-shadow(0 0 5px rgba(159, 54, 241, 0.3));
}

.profile-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    color: #f0c05a;
    margin-bottom: 8px;
    text-align: center;
}

.profile-info p {
    font-size: 0.9em;
    color: #e0e0ff;
    margin: 5px 0;
    opacity: 0.8;
    text-align: center;
}

.profile-details {
    text-align: center;
}

.language-selector select {
    background: #0d0e12;
    color: #e0e0ff;
    padding: 8px;
    border: 1px solid #f0c05a;
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
    height: 55px;
    cursor: pointer;
    display: block;
    /* margin-top: 15px;
    margin-bottom: 15px; */
}
.gameSettings {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    /* margin-bottom: 20px; */
}
.gameSettings .profile-section {
    width: 100%;
}
.language-selector {
    width: 100%;
}
.language-selector select:focus {
    outline: none;
    border-color: #9f36f1;
}

.privacy-policy {
    color: #9f36f1;
    font-size: 0.8em;
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin: 0 auto;
    width: fit-content;
    margin-bottom: 0px;
    margin-top: 10px;
}

.privacy-policy:hover {
    text-decoration: underline;
}
/* Add these styles to your style.css file */

.profile-section {
    background: rgba(28, 17, 41, 0.6);
    border: 1px solid rgba(240, 192, 90, 0.3);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
}

.profile-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cinzel', serif;
    font-size: 1.2em; /* already bigger */
    color: #e0e0ff;
    white-space: nowrap; /* prevents line breaks */
}

.setting-label i {
    color: #f0c05a;
    font-size: 1em;
}

.music-toggle-btn .music-status {
    display: block;
}

.music-toggle-btn i {
    margin: 0;
}

.music-toggle-btn {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1c1129, #2a1b3e);
    border: 2px solid #f0c05a;
    border-radius: 25px;
    padding: 8px 16px;
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    font-weight: 700;
    color: #e0e0ff;
    transition: all 0.3s ease;
    min-width: 40px;
    width: 40px;
    justify-content: center;
    float: right;
}

.music-toggle-btn i {
    font-size: 1.1em;
    color: #f0c05a;
    transition: all 0.3s ease;
}

.music-toggle-btn.active {
    background: linear-gradient(135deg, #9f36f1, #7b2cbf);
    border-color: #9f36f1;
    box-shadow: 0 0 15px rgba(159, 54, 241, 0.4);
}

.music-toggle-btn.active i {
    color: #f0c05a;
    animation: music-pulse 1.5s ease-in-out infinite;
}

.music-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(159, 54, 241, 0.3);
}

.music-toggle-btn:active {
    transform: scale(0.95);
}

.music-status {
    font-weight: 700;
    letter-spacing: 0.5px;
}

@keyframes music-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.footer {
    font-size: 0.75em;
    color: #e0e0ff;
    text-align: center;
    margin-top: 5px;
    margin-bottom: 0px;
    opacity: 0.8;
}

.footer img {
    width: 50%;
    max-height: 100px;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 10px;
    filter: drop-shadow(0 0 5px rgba(159, 54, 241, 0.3));
}

.btnCombo {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
}

@media (max-width: 360px) {
    body {
        padding: calc(10px + env(safe-area-inset-top)) 8px calc(70px + env(safe-area-inset-bottom));
    }

    .casino-container.fullscreen {
        margin-top: calc(35px + env(safe-area-inset-top));
    }

    .character-image, .footer img {
        max-height: 80px;
    }

    .reel-container {
        height: 180px;
    }

    .symbol {
        height: 60px;
    }

    .symbol img {
        width: 45px;
        height: 45px;
    }

    .telegram-nav {
        height: 60px;
        padding: 10px 0;
        gap: 10px;
    }

    .telegram-nav-button {
        font-size: 0.85em;
        padding: 8px;
        flex: 1;
        max-width: 60px;
    }

    .telegram-nav-button i {
        font-size: 1.4em;
    }

    .deposit-btn, .withdraw-btn {
        font-size: 0.8em;
        padding: 8px;
        max-width: 120px;
    }

    .qr-code {
        width: 100px;
        height: 100px;
    }

    .info-box h3 {
        font-size: 0.7em;
    }

    .info-box .value {
        font-size: 0.9em;
    }

    .slot-machine {
        padding: 8px;
    }

   .max-bet-button {
        padding: 4px 8px;
        font-size: 0.7em;
    }

    .ok-button {
        padding: 7px;
        font-size: 0.8em;
    }

    .referral-gift-icon {
        font-size: 2.5em;
    }

    .referral-title {
        font-size: 1.3em;
    }

    .referral-subtitle {
        font-size: 0.85em;
    }

    .stat-number {
        font-size: 1.5em;
    }

    .stat-label {
        font-size: 0.7em;
    }

    .share-button {
        font-size: 0.85em;
        padding: 10px 16px;
    }

    .referral-info-list li {
        font-size: 0.7em;
    }

    .deposit-warning {
        font-size: 0.7em;
    }
}

@media (max-width: 320px) {
    body {
        padding: calc(8px + env(safe-area-inset-top)) 6px calc(60px + env(safe-area-inset-bottom));
    }

    .casino-container.fullscreen {
        margin-top: calc(30px + env(safe-area-inset-top));
    }

    .character-image, .footer img {
        max-height: 70px;
    }

    .reel-container {
        height: 150px;
    }

    .symbol {
        height: 50px;
    }

    .symbol img {
        width: 35px;
        height: 35px;
    }

    .telegram-nav {
        height: 60px;
        padding: 8px 0;
        gap: 8px;
    }

    .telegram-nav-button {
        font-size: 0.8em;
        padding: 6px;
        flex: 1;
        max-width: 55px;
    }

    .telegram-nav-button i {
        font-size: 1.3em;
    }

    .deposit-btn, .withdraw-btn {
        font-size: 0.75em;
        padding: 6px;
        max-width: 110px;
    }

    .qr-code {
        width: 90px;
        height: 90px;
    }

    .info-box h3 {
        font-size: 0.65em;
    }

    .info-box .value {
        font-size: 0.85em;
    }

    .slot-machine {
        padding: 6px;
    }

    .max-bet-button {
        padding: 4px 8px;
        font-size: 0.7em;
    }

    .ok-button {
        padding: 7px;
        font-size: 0.8em;
    }

    .referral-gift-icon {
        font-size: 2.2em;
    }

    .referral-title  { 
        font-size: 1.2em;
    }

    .referral-subtitle {
        font-size: 0.8em;
    }

    .stat-number {
        font-size: 1.3em;
    }

    .stat-label {
        font-size: 0.65em;
    }

    .share-button {
        font-size: 0.8em;
        padding: 10px 14px;
    }

    .referral-info-list li {
        font-size: 0.65em;
    }

    .deposit-warning {
        font-size: 0.65em;
    }
}