@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

@keyframes notifSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes notifSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

@keyframes progressShrink {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.notif-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-bottom-left-radius: 12px;
}

:root {
    --bg-color: #0b0e11;
    --card-bg: #151a21;
    --primary-blue: #0088cc;
    --accent-blue: #2c9aff;
    --text-color: #ffffff;
    --text-secondary: #7f8fa4;
    --danger-red: #ff3b30;
    --success-green: #34c759;
    --nav-height: 60px;
}

#splash-loader {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: #000;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash-loader.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-star-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: splashStarPulse 2.4s ease-in-out infinite;
}

.splash-star-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(0.35) brightness(2.5)
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.3))
            drop-shadow(0 0 30px rgba(200, 200, 220, 0.12));
    opacity: 0.7;
}

@keyframes splashStarPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.07);
        opacity: 0.9;
    }
}

.splash-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.splash-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, #0088cc, #00aaff, #2c9aff, #00d2ff);
    box-shadow: 0 0 10px rgba(0, 136, 204, 0.6), 0 0 20px rgba(44, 154, 255, 0.3);
    animation: splashProgressGrow 2.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes splashProgressGrow {
    0%   { width: 0%; }
    20%  { width: 25%; }
    50%  { width: 55%; }
    80%  { width: 85%; }
    100% { width: 100%; }
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: #0b0e14;
    color: #fff;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--bg-color);
    overflow: hidden;
}

.betting-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, #1c2533 0%, #151a21 100%);
    border-radius: 24px 24px 0 0;
    padding: 0;
    box-sizing: border-box;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-top: 2px solid rgba(0, 136, 204, 0.3);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.betting-sheet:not(.hidden) {
    transform: translateY(0);
}

.betting-sheet.hidden {
    transform: translateY(100%);
}

.betting-sheet .sheet-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.betting-sheet .sheet-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.betting-sheet .sheet-header .close-sheet-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.sheet-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 20px 16px 20px;
    position: relative;
}

.sheet-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.close-sheet-btn {
    position: absolute;
    right: 0;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-sheet-btn:active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(0.9);
}

.betting-sheet .sheet-body {
    padding: 0 20px 20px 20px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 4px;
}

.adjust-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.adjust-btn:active {
    background: rgba(0, 136, 204, 0.3);
    transform: scale(0.95);
}

#bet-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 14px 16px;
    font-size: 1.2rem;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

#bet-input:focus {
    outline: none;
}

.quick-amounts {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quick-btn:active {
    background: rgba(0, 136, 204, 0.2);
    border-color: rgba(0, 136, 204, 0.3);
    color: #fff;
    transform: scale(0.96);
}

.confirm-bet-btn {
    width: 100%;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-bet-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 136, 204, 0.3);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    z-index: 20;
    background: transparent;
    border-bottom: none;
    box-shadow: none;
}

.online-users {
    background: transparent;
    backdrop-filter: none;
    padding: 0px 4px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4cd964;
    border: none;
}

#user-count {
    transition: all 0.3s ease;
    display: inline-block;
}

@keyframes onlineCountPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: #4cd964;
    border-radius: 50%;
    box-shadow: 0 0 5px #4cd964;
}

.balance-container {
    background: transparent;
    backdrop-filter: none;
    padding: 6px 6px 6px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.ton-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.ton-icon-small {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

#balance {
    font-weight: 700;
    font-size: 0.95rem;
}

.add-funds-btn {
    background: var(--primary-blue);
    border: none;
    border-radius: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
}

.history-bar {
    position: relative;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    z-index: 15;
    background: transparent;
    margin-bottom: 0;
    margin-top: -80px;
}

.history-bar::-webkit-scrollbar {
    display: none;
}

.history-pill {
    padding: 2px 0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #1e2530;
    color: #a5bddc;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.03);
    width: 36px;
    height: 32px;
    min-width: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.history-pill.win {
    color: var(--success-green);
    background-color: rgba(52, 199, 89, 0.1);
    border-color: rgba(52, 199, 89, 0.2);
}

.history-pill.gold {
    color: #ffd60a;
    background-color: rgba(255, 214, 10, 0.1);
    border-color: rgba(255, 214, 10, 0.2);
}

.history-pill.high-tier {
    color: #ff453a;
    background-color: rgba(255, 69, 58, 0.1);
    border-color: rgba(255, 69, 58, 0.2);
    box-shadow: 0 0 8px rgba(255, 69, 58, 0.2);
}

.live-pill {
    flex: 0 0 auto;
    min-width: 44px;
    height: 32px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    color: #0088cc;
    background: rgba(0, 136, 204, 0.12);
    border: 1px solid rgba(0, 136, 204, 0.25);
    box-shadow: 0 0 8px rgba(0, 136, 204, 0.15);
    transition: color 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, min-width 0.3s ease;
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow: hidden;
}

.live-pill .lp-text {
    display: inline-block;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.live-pill .lp-text.out {
    opacity: 0;
    transform: scale(0.7) translateY(3px);
}

.live-pill .lp-text.in {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.live-pill.crashed {
    animation: pillShake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes pillShake {
    0%, 100% { transform: translateX(0); }
    15%, 85% { transform: translateX(1px); }
    30%, 70% { transform: translateX(-2px); }
    45% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
}

.settings-btn {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.game-stage {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #131820 0%, #060709 100%);
    overflow: hidden;
    perspective: 1000px;
    padding-top: 20px;
    padding-bottom: 80px;
}

.scanlines,
.noise {
    display: none;
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

@keyframes noise {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-1%, -1%);
    }

    20% {
        transform: translate(1%, 1%);
    }

    30% {
        transform: translate(-2%, 2%);
    }

    40% {
        transform: translate(2%, -2%);
    }

    50% {
        transform: translate(0, 0);
    }

    60% {
        transform: translate(1%, -1%);
    }

    70% {
        transform: translate(-1%, 1%);
    }

    80% {
        transform: translate(2%, 2%);
    }

    90% {
        transform: translate(-2%, -2%);
    }

    100% {
        transform: translate(0, 0);
    }
}

.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}


.meteor {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(-45deg);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    animation: meteor-fall 2s linear forwards;
}

@keyframes meteor-fall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(-45deg);
    }

    100% {
        opacity: 0;
        transform: translate(-200px, 200px) rotate(-45deg);
    }
}

.floating-planet {
    position: absolute;
    pointer-events: none;
    z-index: 4;
    will-change: opacity, left, top;
}

.p-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.p-detail {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.p-rings-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.p-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border-style: solid;
}

.p-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

.p-moon {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: moonOrbit var(--orbit-dur) linear infinite;
}

@keyframes moonOrbit {
    0%   { transform: rotate(0deg)   translateX(var(--orbit-r)) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(var(--orbit-r)) rotate(-360deg); }
}

.multiplier-display {
    display: none !important;
}


.multiplier-graph {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.multiplier-graph.active {
    opacity: 1;
}

.countdown-display {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.countdown-display:not(.hidden) {
    animation: countdownAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes countdownAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.countdown-text {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.circular-timer {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circular-timer svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.circular-timer-bg {
    fill: none;
    stroke: rgba(0, 136, 204, 0.2);
    stroke-width: 8;
}

.circular-timer-progress {
    fill: none;
    stroke: #0088cc;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.15s ease;
    will-change: stroke-dashoffset;
    filter: drop-shadow(0 0 12px currentColor);
}

.countdown-number {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 30px rgba(0, 136, 204, 0.8), 0 0 60px rgba(0, 136, 204, 0.4);
    font-family: 'Outfit', sans-serif;
    position: relative;
    z-index: 1;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

@keyframes numberOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateY(-30px) rotateX(90deg);
    }
}

@keyframes numberIn {
    0% {
        opacity: 0;
        transform: scale(1.8) translateY(30px) rotateX(-90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

@keyframes circlePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 400px) {
    .circular-timer {
        width: 144px;
        height: 144px;
    }
    
    .countdown-number {
        font-size: 3.2rem;
    }
}

.countdown-display.hidden {
    display: none;
}

.crashed-text {
    color: var(--danger-red);
    text-shadow: 0 0 30px rgba(255, 59, 48, 0.4);
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.rocket-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease-out;
}

.rocket-container::before {
    content: '';
    position: absolute;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, rgba(255, 149, 0, 0.12) 0%, rgba(255, 120, 0, 0.06) 30%, transparent 60%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.rocket-container.hidden {
    display: none;
}

#rocket-lottie {
    width: 100%;
    height: 100%;
}

.explosion-container {
    position: absolute;
    top: 52%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 155px;
    height: 155px;
    z-index: 50;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.1s ease-in;
}

.explosion-container.show {
    opacity: 1;
}

.explosion-container.hidden {
    display: none;
    opacity: 0;
}

#explosion-lottie {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#explosion-lottie svg {
    width: 100% !important;
    height: 100% !important;
}

.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.countdown-display.hidden,
.rocket-container.hidden,
.explosion-container.hidden,
.pay-form.hidden,
.ton-pending-view.hidden,
.profile-page.hidden,
.game-stage.hidden {
    display: none !important;
}

#history-page.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.betting-sheet.hidden {
    display: block !important;
}

.topup-sheet.hidden {
    display: block !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.modal-content {
    background: linear-gradient(180deg, #1c2533 0%, #151a21 100%);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 20px;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.close-modal-btn:active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.fade-transition {
    transition: opacity 0.3s ease;
    opacity: 1;
}

.withdrawal-modal-card {
    background: #111827;
    border-radius: 20px;
    width: calc(100% - 32px);
    max-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    max-height: 92vh;
    overflow-y: auto;
    scrollbar-width: none;
    animation: wmSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.withdrawal-modal-card::-webkit-scrollbar {
    display: none;
}

@keyframes wmSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wm-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.wm-title-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #0088cc, #005588);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.wm-close {
    background: rgba(255, 255, 255, 0.07);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.wm-close:active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.wm-section {
    padding: 10px 16px 0;
}

.wm-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #7f8fa4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.wm-currency-tabs {
    display: flex;
    gap: 8px;
}

.wm-curr-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.wm-curr-tab.active {
    border-color: #0088cc;
    background: rgba(0, 136, 204, 0.12);
    color: #fff;
}

.wm-curr-tab:active {
    transform: scale(0.97);
}

.wm-amount-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wm-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.wm-input:focus {
    border-color: rgba(0, 136, 204, 0.6);
}

.wm-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.wm-max-btn {
    background: rgba(0, 136, 204, 0.15);
    border: 1.5px solid rgba(0, 136, 204, 0.3);
    border-radius: 12px;
    color: #0088cc;
    padding: 0 16px;
    height: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wm-max-btn:active {
    background: rgba(0, 136, 204, 0.3);
    transform: scale(0.96);
}

.wm-wallet-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(52, 199, 89, 0.08);
    border: 2px solid rgba(52, 199, 89, 0.3);
    border-radius: 24px;
    padding: 32px 28px;
    margin-bottom: 16px;
    min-height: 120px;
}

.wm-wallet-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wm-wallet-addr-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wm-wallet-change {
    background: rgba(255, 59, 48, 0.15);
    border: 1.5px solid rgba(255, 59, 48, 0.3);
    border-radius: 14px;
    color: #ff3b30;
    font-size: 1.1rem;
    padding: 16px 24px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
    flex-shrink: 0;
    font-weight: 700;
}

.wm-wallet-change:active {
    background: rgba(255, 255, 255, 0.15);
}

.wm-connect-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #7f8fa4;
    margin-top: 8px;
}

.wm-stars-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 16px 0;
    background: rgba(255, 214, 10, 0.06);
    border: 1px solid rgba(255, 214, 10, 0.18);
    border-radius: 10px;
    padding: 10px;
    color: #fff;
    font-size: 0.8rem;
}

.wm-fee-block {
    margin: 10px 16px 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px 14px;
}

.wm-fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
}

.wm-fee-total {
    font-size: 1rem;
    color: #fff;
}

.wm-fee-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 10px 0;
}

.wm-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 12px 16px 16px;
    padding: 12px;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.35);
    transition: all 0.2s ease;
}

.wm-submit-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 136, 204, 0.2);
}

.wm-submit-btn ion-icon {
    font-size: 1.2rem;
}

.controls-area {
    padding: 6px 16px;
    background: rgba(21, 26, 33, 0.85);
    z-index: 30;
    position: relative;
    border-radius: 20px 20px 0 0;
    box-shadow: none;
    margin-bottom: 0;
}

.bet-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, #0088cc 0%, #006699 100%);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background 0.3s;
    letter-spacing: 0.5px;
}

.bet-btn:active {
    transform: scale(0.98);
    box-shadow: none;
}

.bet-btn.active-cashout {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bet-btn.active-cashout:active {
    transform: scale(0.98);
}

@keyframes pulseGold {
    0% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    }
}

.bet-btn.disabled-grey {
    background: #2c3e50;
    color: #7f8fa4;
    cursor: not-allowed;
    border: 1px solid #34495e;
}

.profile-page {
    flex: 1;
    display: block;
    padding: 16px;
    padding-top: 24px;
    background: #0b0e11;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    z-index: 50;
    background-image: radial-gradient(circle at 50% 30%, #1a222d 0%, #0b0e11 70%);
    height: calc(100vh - var(--nav-height));
    padding-bottom: calc(var(--nav-height) + 40px);
    box-sizing: border-box;
    width: 100%;
}

.profile-page::-webkit-scrollbar {
    width: 6px;
}

.profile-page::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.profile-page::-webkit-scrollbar-thumb {
    background: rgba(0, 136, 204, 0.5);
    border-radius: 3px;
}

.profile-page::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 136, 204, 0.7);
}

#history-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

#history-page:not(.hidden) {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: auto;
}

#history-page.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.history-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    flex-shrink: 0;
    position: relative;
    cursor: grab;
    touch-action: none;
    transition: background 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.history-header:active {
    cursor: grabbing;
    background: rgba(255, 255, 255, 0.02);
}

.history-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.history-header:active::before {
    width: 50px;
    height: 5px;
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(-50%) scale(1.1);
}

.history-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    pointer-events: none;
    user-select: none;
}

#full-history-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 20px;
    touch-action: pan-y;
}

#full-history-list::-webkit-scrollbar {
    width: 5px;
}

#full-history-list::-webkit-scrollbar-track {
    background: transparent;
}

#full-history-list::-webkit-scrollbar-thumb {
    background: rgba(0, 136, 204, 0.4);
    border-radius: 3px;
}

#full-history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 136, 204, 0.6);
}

.history-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.history-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.05);
}

.history-card.win {
    border-left: 4px solid #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.history-card.loss {
    border-left: 4px solid #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.h-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.h-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.h-date {
    font-size: 0.8rem;
    color: #7f8fa4;
    margin-top: 4px;
}

.h-result {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.h-mult {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.h-profit {
    font-size: 0.9rem;
    font-weight: 700;
}

.text-win {
    color: #10b981;
}

.text-loss {
    color: #ef4444;
}

.profile-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 80px;
    margin-bottom: 30px;
}

.avatar-ring-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #0088cc, #00d2ff);
    margin-bottom: 12px;
}

.avatar-img-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0f141a;
}

.username-display-large {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.user-id-badge {
    margin-top: 5px;
    font-size: 0.8rem;
    color: #7f8fa4;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.stat-card:active {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(0.98);
}

.stat-icon {
    font-size: 1.8rem;
    color: #7f8fa4;
    flex-shrink: 0;
}

.stat-icon.gold {
    color: #FFD700;
}

.stat-icon.blue {
    color: #0088cc;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ton-mini {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.profile-menu {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
}

.menu-item {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.menu-item.hidden {
    display: none !important;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 136, 204, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0088cc;
    font-size: 1.2rem;
}

.menu-item span {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
}

.arrow {
    color: #5a6b7c;
    font-size: 1.2rem;
}

.badge {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.verified {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.live-bets-panel {
    background: rgba(21, 26, 33, 0.75);
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(var(--nav-height) + 10px);
    min-height: 0;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: none;
}

.total-bets-value {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bets-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    min-height: 100px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgb(21, 26, 33);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #556070;
    text-decoration: none;
    font-size: 0.7rem;
    gap: 4px;
    width: 33%;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.nav-item ion-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.nav-item.active {
    color: var(--primary-blue);
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    background-color: #000;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    position: absolute;
    top: 40px;
    padding-top: calc(10px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    z-index: 9999;
}

.online-users {
    background: rgba(30, 30, 36, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4cd964;
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: #4cd964;
    border-radius: 50%;
    box-shadow: 0 0 5px #4cd964;
}

.balance-container {
    background: rgba(30, 30, 36, 0.95);
    padding: 6px 6px 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.diamond-icon {
    color: var(--diamond-color);
}

#balance {
    font-weight: 700;
    font-size: 1rem;
}

.add-funds-btn {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
}

.game-stage {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
    perspective: 1000px;
}

.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}


.multiplier-display {
    display: none !important;
}

.crashed-text {
    color: var(--danger-red);
    text-shadow: 0 0 40px rgba(255, 59, 48, 0.8);
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.explosion-container {
    position: absolute;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    z-index: 6;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#explosion-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.history-pill {
    flex: 0 0 auto;
    width: 50px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    background-color: #232830;
    color: #556070;
    border: none;
    opacity: 1;
}

.history-pill.win {
    background: #1e3a2a;
    color: #4cd964;
}

.history-pill.gold {
    background: #3a321e;
    color: #ffd60a;
}

.bet-btn.disabled-grey {
    background: #232830;
    color: #556070;
    box-shadow: none;
    cursor: default;
    transform: none;
}

.bet-btn.active-cashout {
    background: linear-gradient(180deg, #ff9500 0%, #cc7a00 100%);
    box-shadow: 0 4px 0 #995c00;
    color: white;
}

.live-bets-panel {
    background: rgba(21, 26, 33, 0.75);
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: none;
    padding-bottom: var(--nav-height);
    min-height: 0;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: none;
}

.bets-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.bet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(25, 28, 35, 0.85);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bet-row.my-bet {
    background: rgba(0, 136, 204, 0.12);
    border: 1px solid rgba(0, 136, 204, 0.25);
}

.bet-row.win-row {
    background: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.25);
    animation: winPulse 0.5s ease;
}

.bet-row.loss-row {
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid rgba(255, 59, 48, 0.25);
    opacity: 0.7;
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.bet-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bet-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.bet-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bet-username {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.bet-details {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}

.bet-amount-text {
    color: #7f8fa4;
    font-weight: 500;
}

.bet-multiplier {
    color: #00d4ff;
    font-weight: 600;
}

.bet-card-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bet-win-amount {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

.bet-icon-ton {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.bet-icon-star {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    border-radius: 50%;
}

.bets-list {
    padding-top: 8px;
    padding-bottom: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.profile-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.icon-btn {
    background: rgba(40, 44, 52, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
}

.lang-flag {
    width: 24px;
    border-radius: 4px;
}

.profile-balance-badge {
    background: rgba(40, 44, 52, 0.8);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    margin-left: auto;
}

.profile-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.avatar-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 2px;
    margin-bottom: 12px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.username-display {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 16px 0;
}

.level-progress-bar {
    width: 100%;
    height: 24px;
    background: #1e2530;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #34c759;
    width: 0%;
}

.progress-text {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    font-weight: 700;
    color: #7f8fa4;
    text-transform: lowercase;
}

.profile-actions-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
}

.action-btn.primary {
    background: #007aff;
    color: white;
}

.action-btn.outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.profile-section {
    background: transparent;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #7f8fa4;
}

.link-btn {
    color: #007aff;
    text-decoration: none;
    font-size: 0.85rem;
}

.inventory-grid {
    display: flex;
    gap: 12px;
}

.inv-slot {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
}

.inv-slot.next {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #555;
}

.referral-card {
    background: #151a21;
    padding: 16px;
    border-radius: 16px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.referral-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ref-title {
    font-size: 0.9rem;
    font-weight: 600;
    width: 70%;
    line-height: 1.3;
}

.btn-small-link {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    height: fit-content;
    font-size: 0.75rem;
}

.referral-actions-row {
    display: flex;
    gap: 8px;
}

.copy-btn {
    border-radius: 12px;
    width: 48px;
    background: #007aff;
}

.profile-footer-stats {
    padding: 16px;
    background: #11141a;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: #7f8fa4;
}

.stat-label .val {
    color: #fff;
    font-weight: 700;
    margin-left: 4px;
}

.withdraw-btn {
    flex: 0 0 100px;
    background: #1c2b3d;
    color: #007aff;
    padding: 10px;
}

.bet-status {
    font-weight: 600;
}

.bet-status.cashed-out {
    color: var(--success-green);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 480px;
    width: 100%;
    height: auto;
    min-height: var(--nav-height);
    background: rgb(20, 20, 23);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    padding-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    text-decoration: none;
    font-size: 0.75rem;
    gap: 4px;
}

.nav-item ion-icon {
    font-size: 1.4rem;
}

.nav-item.active {
    color: var(--primary-blue);
}

.close-topup-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.topup-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 12px;
}

.pay-method-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.pay-method-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.pay-method-btn .star-icon {
    color: #FFD700;
    font-size: 1.2rem;
}

.pay-method-btn .ton-icon {
    width: 18px;
    height: 18px;
}

.pay-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-badge {
    background: linear-gradient(135deg, #ff3b30, #ff9500);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.4);
    vertical-align: middle;
}

.admin-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: linear-gradient(180deg, #0f1419 0%, #0b0e11 100%);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    overflow: hidden;
}

.admin-page:not(.hidden) {
    transform: translateX(0);
}

.admin-page.hidden {
    transform: translateX(100%);
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    padding-top: 100px !important;
    background: rgba(0, 136, 204, 0.05);
    border-bottom: 1px solid rgba(0, 136, 204, 0.1);
    flex-shrink: 0;
}

.admin-back-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-back-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.92);
}

.admin-page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #00aaff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-page-title ion-icon {
    font-size: 1.4rem;
}

.admin-header-spacer {
    width: 44px;
}

.admin-page-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px 20px 16px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 16px 0 16px;
    overflow-x: auto;
}

.admin-tabs::-webkit-scrollbar {
    display: none;
}

.admin-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-tab-btn.hidden {
    display: none !important;
}

.admin-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 24px;
}

.astat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.05);
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.astat-item:active {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(0.98);
}

.astat-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 136, 204, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0088cc;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.astat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.astat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.astat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

    .admin-balances-row {
        display: flex;
        gap: 12px;
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .abalance-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 12px;
        background: rgba(255, 255, 255, 0.05);
        padding: 18px;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        transition: all 0.2s ease;
    }

    .abalance-item:active {
        background: rgba(255, 255, 255, 0.08);
        transform: scale(0.98);
    }

    .abalance-header {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.6);
        font-weight: 600;
    }

    .abalance-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
    }

    .abalance-icon img {
        width: 20px;
        height: 20px;
        object-fit: contain;
        max-width: 20px;
        max-height: 20px;
    }

    .blue-bg {
        background: rgba(0, 136, 204, 0.2);
    }

    .star-bg {
        background: rgba(255, 215, 0, 0.2);
    }

    .star-bg img {
        width: 20px;
        height: 20px;
        max-width: 20px;
        max-height: 20px;
        object-fit: contain;
        border-radius: 50%;
    }

    .abalance-val {
        font-size: 1.6rem;
        font-weight: 700;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .blue-text {
        color: #00aaff;
    }

    .star-text {
        color: #ffd700;
    }

.admin-tab-btn ion-icon {
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.admin-tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.3), rgba(0, 170, 255, 0.2));
    border-color: rgba(0, 136, 204, 0.5);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
}

.admin-tab-btn.active ion-icon {
    color: #0088cc;
}

.admin-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    animation: fadeSlideUp 0.3s ease;
}

.admin-section.hidden {
    display: none !important;
}

.admin-section-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
    line-height: 1.4;
}

.admin-section h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-section h4 ion-icon {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-section h4.gold-title {
    color: #FFD700;
}

.admin-section h4.gold-title ion-icon {
    color: #FFD700;
}

.admin-section .input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-section .input-group:last-child {
    margin-bottom: 0;
}

.admin-section input[type="text"],
.admin-section input[type="number"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 20px;
    color: #fff;
    font-size: 1.05rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    min-height: 56px;
}

#admin-wallet-input {
    padding: 22px 24px !important;
    font-size: 1.1rem !important;
    min-height: 64px !important;
    font-weight: 500;
}

.admin-section input[type="text"]:focus,
.admin-section input[type="number"]:focus {
    outline: none;
    border-color: rgba(255, 59, 48, 0.4);
    background: rgba(0, 0, 0, 0.4);
}

.admin-section input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.admin-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 20px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.1);
}

.admin-btn.save-btn,
.admin-btn.success-btn {
    background: linear-gradient(135deg, #0088cc, #00aaff);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
}

.admin-btn.danger-btn {
    background: linear-gradient(135deg, #ff3b30, #ff453a);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.2);
}

.admin-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.admin-buttons-row .admin-btn {
    flex: 1;
}

.topup-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    transform: translateY(100%);
    background: linear-gradient(180deg, #1c2533 0%, #151a21 100%);
    border-radius: 24px 24px 0 0;
    padding: 0;
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    border-top: 2px solid rgba(0, 136, 204, 0.3);
    overflow: hidden;
}

.topup-sheet:not(.hidden) {
    transform: translateY(0);
}

.topup-sheet .sheet-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    cursor: grab;
}

.topup-sheet .sheet-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.topup-sheet .sheet-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.topup-sheet .close-topup-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topup-sheet .close-topup-btn:active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-50%) scale(0.9);
}

.topup-sheet .sheet-body {
    padding: 20px;
}

.topup-methods {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pay-method-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
}

.pay-method-btn.active {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.3), rgba(0, 170, 255, 0.2));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
}

.pay-method-btn:active {
    transform: scale(0.96);
}

.pay-method-btn .star-icon {
    color: #FFD700;
    font-size: 1.2rem;
}

.pay-method-btn .ton-icon {
    width: 20px;
    height: 20px;
}

.pay-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeSlideUp 0.3s ease;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pay-form .input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 4px;
}

.pay-form .input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.pay-form .input-group input:focus {
    outline: none;
}

.pay-form .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.pay-form .quick-amounts {
    display: flex;
    gap: 10px;
}

.pay-form .quick-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pay-form .quick-btn:active {
    background: rgba(0, 136, 204, 0.2);
    border-color: rgba(0, 136, 204, 0.3);
    color: #fff;
    transform: scale(0.96);
}

.pay-form .confirm-bet-btn {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    border: none;
    border-radius: 14px;
    padding: 16px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.3);
}

.pay-form .confirm-bet-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 136, 204, 0.3);
}

.pay-form .confirm-bet-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bet-currency-selector {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
}

.bet-curr-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.bet-curr-btn.active {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.3), rgba(0, 170, 255, 0.2));
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 136, 204, 0.2);
}

.bet-curr-btn:active {
    transform: scale(0.96);
}

.bet-curr-btn img {
    vertical-align: middle;
}

.ton-rate-info {
    display: none;
}

.ton-rate-info span {
    color: #0088cc;
    font-weight: 600;
}

.ton-amount-info {
    text-align: center;
    font-size: 1rem;
    margin: 8px 0 4px;
    color: rgba(255, 255, 255, 0.7);
}

.ton-amount-info span {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.15rem;
}

.ton-fee-info {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin: -8px 0 12px;
}

.ton-fee-info.hidden {
    display: none !important;
    margin: 0;
    padding: 0;
}

[data-tc-wallets-modal-container] {
    z-index: 9999 !important;
}

.ton-connect-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4px;
    width: 100%;
}

#ton-connect-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#ton-connect-btn>div,
#ton-connect-btn>button {
    margin: 0 auto !important;
}

.ton-pending-view {
    text-align: center;
    padding: 20px;
    animation: fadeSlideUp 0.3s ease;
}

.ton-pending-view h4 {
    color: #FFD700;
    font-size: 1.2rem;
    margin: 0 0 16px 0;
}

.ton-pending-view p {
    color: rgba(255, 255, 255, 0.7);
    margin: 8px 0;
    font-size: 0.95rem;
}

.ton-pending-view b {
    color: #fff;
}

.ton-pending-address {
    background: rgba(0, 0, 0, 0.4);
    padding: 14px;
    border-radius: 12px;
    margin: 16px 0;
    word-break: break-all;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ton-pending-timer {
    font-size: 2rem;
    font-weight: 800;
    color: #0088cc;
    margin: 20px 0;
}

.ton-pending-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ton-pending-cancel:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.96);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 900;
    transition: all 0.3s ease;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.page-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-transition.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.game-stage,
.profile-page,
.controls-area,
.live-bets-panel {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.game-stage.hidden,
.profile-page.hidden {
    opacity: 0;
}

.pay-form.hidden {
    display: none !important;
}

.ton-pending-view.hidden {
    display: none !important;
}

.game-stage {
    opacity: 1;
    transition: opacity 0.25s ease;
}

.profile-page {
    opacity: 1;
    transition: opacity 0.25s ease;
}

.controls-area {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.live-bets-panel {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.top-bar {
    transition: opacity 0.25s ease;
}

.history-bar {
    transition: opacity 0.25s ease;
}

.betting-sheet {
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.betting-sheet:not(.hidden) {
    transform: translateY(0);
}

#history-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#history-page.hidden {
    display: none !important;
}

.history-modal-content {
    background: linear-gradient(180deg, rgba(28, 37, 51, 0.9) 0%, rgba(21, 26, 33, 0.95) 100%);
    border-top: 1px solid rgba(0, 136, 204, 0.3);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px;
    height: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    overflow: hidden;
}

#history-page:not(.hidden) .history-modal-content {
    transform: translateY(0);
}

.history-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    cursor: grab;
}

.history-header::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.history-title {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

#full-history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#full-history-list::-webkit-scrollbar {
    display: none;
}

.history-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-card.win {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1) 0%, rgba(48, 209, 88, 0.05) 100%);
    border-color: rgba(52, 199, 89, 0.2);
}

.history-card.loss {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1) 0%, rgba(255, 69, 58, 0.05) 100%);
    border-color: rgba(255, 59, 48, 0.2);
}

.h-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.h-amount {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.h-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.h-result {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.h-mult {
    font-size: 1.1rem;
    font-weight: 800;
}

.h-profit {
    font-size: 0.95rem;
    font-weight: 600;
}

.text-win {
    color: #34c759;
}

.text-loss {
    color: #ff3b30;
}

.topup-sheet .input-group input {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(0, 136, 204, 0.3) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.topup-sheet .input-group input:focus {
    outline: none !important;
    border-color: #00aaff !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

.topup-sheet .quick-btn {
    background: rgba(0, 136, 204, 0.15) !important;
    border: 1px solid rgba(0, 136, 204, 0.3) !important;
    color: #00aaff !important;
    border-radius: 12px !important;
    padding: 12px !important;
    font-weight: 600 !important;
}

.topup-sheet .quick-btn:active {
    background: rgba(0, 136, 204, 0.3) !important;
    transform: scale(0.96) !important;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.lang-flag-gif {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes flipRotate {
    0% {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        transform: perspective(400px) rotateY(90deg) scale(1.1);
        filter: brightness(1.5);
    }

    100% {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
        filter: brightness(1);
    }
}

.ton-mini,
.star-mini {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 2px;
    display: inline-block;
    border: none;
    outline: none;
    background: transparent;
}

.star-mini {
    border-radius: 50%;
    object-fit: cover;
}

.ton-icon-small {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
}

.lang-selector {
    background: rgba(30, 30, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 10px 4px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-selector img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.lang-selector span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

.lang-selector:active {
    transform: scale(0.95);
}

@keyframes langFadeSlide {
    0% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }

    50% {
        transform: scale(0.5) rotate(180deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

@keyframes langTextFade {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    50% {
        opacity: 0;
        transform: translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.currency-toggle {
    display: flex;
    align-items: center;
    background: rgba(30, 30, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 0 4px;
    position: relative;
    cursor: pointer;
    width: 76px;
    height: 36px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    text-decoration: none !important;
}

.currency-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 34px;
    height: 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.currency-icon {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-icon img {
    width: 18px;
    height: 18px;
    opacity: 0.4;
    filter: grayscale(80%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: contain;
    display: block;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 4px;
    line-height: 0;
}

.currency-icon.star img {
    border-radius: 50%;
    object-fit: contain;
    width: 18px;
    height: 18px;
}

.currency-icon.active img {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.15) drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.currency-icon.star.active img {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.0) drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.currency-toggle.is-star .currency-slider {
    transform: translateX(32px);
}

.currency-toggle:hover .currency-slider {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
}

#withdrawal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#withdrawal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #34c759;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.withdrawal-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 3px solid #ffd700;
}

.withdrawal-card.pending {
    border-left-color: #ff9500;
}

.withdrawal-card.completed {
    border-left-color: #34c759;
}

.withdrawal-card.rejected {
    border-left-color: #ff3b30;
}

.withdrawal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.withdrawal-user {
    font-weight: 600;
    font-size: 1rem;
}

.withdrawal-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.withdrawal-status.pending {
    background: rgba(255, 149, 0, 0.2);
    color: #ff9500;
}

.withdrawal-status.completed {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.withdrawal-status.rejected {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

.withdrawal-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.withdrawal-info-item {
    display: flex;
    flex-direction: column;
}

.withdrawal-info-label {
    opacity: 0.6;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.withdrawal-actions {
    display: flex;
    gap: 8px;
}

.withdrawal-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.withdrawal-actions button:hover {
    transform: translateY(-2px);
}

.btn-message {
    background: rgba(0, 136, 204, 0.2);
    color: #0088cc;
}

.btn-approve {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.btn-reject {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    padding-bottom: 8px;
    padding-right: 16px;
    padding-left: 16px;
}

.admin-tabs::-webkit-scrollbar {
    height: 4px;
}

.admin-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.admin-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.admin-tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.admin-tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}