:root {
    --tg-safe-top: 0px;
    --tg-safe-bottom: 0px;
    --tg-viewport-height: 100vh;

    /* Monster Legends theme — cosmic space blue/purple (close to original) */
    --bg-void: #1a1c38;
    --bg-grad-1: #1d1844;
    --bg-grad-2: #292451;
    --surface-1: #262957;
    --surface-2: #1b1c3a;
    --surface-3: #15112e;
    --border-soft: #3d4682;
    --border-strong: #6285d9;
    --text-primary: #ffffff;
    --text-muted: #a9b5df;
    --text-dim: #8892b3;
    --text-soft: #dce3f1;
    --accent-primary: #49cefe;
    --accent-primary-deep: #1e70e5;
    --accent-primary-soft: #b7e3ff;
    --blaze: linear-gradient(180deg, var(--accent-primary-deep) -7.28%, var(--accent-primary) 113.16%);
}

/* ---- Signature elements (Monster Legends visual identity) ---- */
.spark-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.spark {
    position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 6px 2px rgba(73,206,254,0.7);
    animation: spark-rise linear infinite;
}
@keyframes spark-rise {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(-420px) translateX(var(--drift, 20px)); opacity: 0; }
}
.neon-pulse { animation: neon-pulse 2.4s ease-in-out infinite; }
@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(30,112,229,0.5), 0 0 2px rgba(73,206,254,0.6); }
    50% { box-shadow: 0 0 20px rgba(73,206,254,0.85), 0 0 6px rgba(73,206,254,0.8); }
}
.fang-divider {
    height: 10px; background: var(--bg-void);
    clip-path: polygon(0% 0%, 6% 100%, 12% 20%, 18% 100%, 24% 10%, 30% 100%, 36% 25%, 42% 100%, 48% 5%, 54% 100%, 60% 20%, 66% 100%, 72% 10%, 78% 100%, 84% 15%, 90% 100%, 96% 0%, 100% 100%, 100% 0%);
}
.glow-blob {
    position: absolute; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.3; animation: glow-shift 4s ease-in-out infinite;
}
@keyframes glow-shift {
    0%, 100% { opacity: 0.22; transform: scale(1); }
    50% { opacity: 0.42; transform: scale(1.14); }
}


*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Exo 2', sans-serif;
    font-weight: 800;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

html, body {
    width: 100vw;
    max-width: 100%;
    height: var(--tg-viewport-height);
    overflow: hidden;
    background-color: var(--bg-void);
    color: #ffffff;
    background: linear-gradient(180deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%);
    margin: 0;
    padding: 0;
}

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

img.close-btn, img.back-btn, img.arrow-icon, img.copy-icon, img.copy-box-btn {
    pointer-events: auto;
    cursor: pointer;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    touch-action: manipulation !important;
}

a, button, div, span {
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.next_btn {
    border-radius: 12px;
    border: 3px solid var(--accent-primary-soft);
    background: linear-gradient(0deg, var(--accent-primary-deep) -7.28%, var(--accent-primary) 113.16%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    color: white;
    padding: 12px 60px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    margin-bottom: 25px;
    transition: transform 0.1s;
}

.next_btn:active {
    transform: translateY(3px);
}

.next_btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.global-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.8) 1px, transparent 1px), radial-gradient(circle at 90% 40%, rgba(255,255,255,0.6) 1.5px, transparent 1.5px), radial-gradient(circle at 50% 80%, rgba(255,255,255,0.9) 1px, transparent 1px), radial-gradient(circle at 75% 15%, rgba(255,255,255,0.5) 2px, transparent 2px);
    background-size: 150px 150px;
    z-index: 0;
    pointer-events: none;
    animation: twinkle1 4s infinite alternate ease-in-out;
}

.stars-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 25% 60%, rgba(255,255,255,1) 1.5px, transparent 1.5px), radial-gradient(circle at 80% 85%, rgba(255,255,255,0.8) 1px, transparent 1px), radial-gradient(circle at 40% 10%, rgba(255,255,255,0.9) 2px, transparent 2px);
    background-size: 200px 200px;
    animation: twinkle2 3s infinite alternate-reverse ease-in-out;
}

@keyframes twinkle1 {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

@keyframes twinkle2 {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.bg-planet-top {
    position: absolute;
    top: -40px;
    left: -40px;
    width: 140px;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    transition: top 1s cubic-bezier(0.25, 0.8, 0.25, 1), left 1s cubic-bezier(0.25, 0.8, 0.25, 1), width 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bg-bomb-bottom {
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 80px;
    animation: float 5s ease-in-out infinite alternate;
    pointer-events: none;
    opacity: 0.9;
    z-index: 1;
}

.img-placeholder {
    background-color: transparent;
    display: inline-block;
    overflow: hidden;
}

.onboarding-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 900;
    background: transparent;
}

.ob-step {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: calc(40px + var(--tg-safe-top)) 20px calc(40px + var(--tg-safe-bottom)) 20px;
    text-align: center;
    position: relative;
    z-index: 10;
    gap: 20px;
}

.ob-step.active {
    display: flex;
    animation: fadeIn 0.4s ease-in;
}

.ob-logo {
    width: 220px;
    max-width: 80%;
    object-fit: contain;
}

.ob-image {
    width: 100%;
    max-width: 280px;
    object-fit: contain;
}

.ob-text-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.ob-title {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.ob-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 800;
    padding: 0 20px;
}

.ob-dots {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.ob-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
}

.ob-dot.active {
    background: #ffffff;
    box-shadow: 0 0 5px #fff;
}

.app-container {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100vw;
    max-width: 100%;
    overflow-x: hidden;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(30px + var(--tg-safe-top)) 16px 12px 16px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 90;
    background: rgba(26, 28, 56, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.coin-group {
    display: flex;
    gap: 24px;
    padding-left: 5px;
}

.coin-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-2);
    border: 2px solid var(--border-strong);
    border-radius: 20px;
    height: 28px;
    min-width: 80px;
    padding-left: 18px;
    padding-right: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    cursor: pointer;
}

.coin-pill img.coin-main {
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
}

.coin-pill img.coin-plus {
    position: absolute;
    left: 8px;
    bottom: -4px;
    width: 16px;
    height: 16px;
    object-fit: contain;
    z-index: 3;
    pointer-events: none;
}

.coin-pill span {
    font-size: 13px;
    font-weight: 900;
    color: white;
    margin-left: 5px;
}

.profile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.profile-img-wrap {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-strong);
    border-radius: 12px;
    padding: 2px;
    background-color: var(--surface-2);
}

.profile-img-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.profile-badge {
    background-color: var(--border-strong);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 12px;
    position: absolute;
    bottom: -10px;
    text-transform: uppercase;
    border: 1px solid var(--surface-2);
    letter-spacing: 0.5px;
    z-index: 5;
}

.scrollable-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100vw;
    max-width: 100%;
    padding: calc(100px + var(--tg-safe-top)) 16px calc(130px + var(--tg-safe-bottom)) 16px;
    position: relative;
    z-index: 10;
}

.page-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.page-content.active {
    display: block;
}

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

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

.header-section {
    text-align: center;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-logo {
    width: 160px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 8px;
    animation: logo-glow 2.6s ease-in-out infinite;
}
@keyframes logo-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(30,112,229,0.45)); }
    50% { filter: drop-shadow(0 0 16px rgba(73,206,254,0.75)); }
}

.home-tabs-container {
    display: flex;
    background: var(--surface-1);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid var(--border-soft);
    padding: 4px;
}

.htab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 900;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    text-transform: uppercase;
}

.htab.active {
    background: linear-gradient(90deg, var(--accent-primary-deep), var(--accent-primary));
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 20px;
}

.game-card-container {
    position: relative;
    width: 100%;
    border-radius: 28px;
}

.game-card-container::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 28px;
    z-index: 1;
    box-shadow: none;
}

.game-card-container.purple-accent::before {
    background: #ab56ff;
}

.game-card-container.yellow-accent::before {
    background: #ffbe30;
}

.game-card-shell {
    position: relative;
    background: var(--text-dim);
    border-radius: 24px;
    padding: 6px 6px 26px 6px;
    z-index: 2;
    border-top: 2px solid var(--text-dim);
    border-bottom: 2px solid var(--border-soft);
}

.info-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    background: #ff4b6b;
    border: 2px solid #fff;
    color: white;
    font-family: serif;
    font-style: italic;
    font-weight: bold;
    font-size: 14px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.game-card-inner {
    background: var(--surface-2);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-card-header {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
}

.gc-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    font-weight: 900;
}

.gc-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gc-stat.gold {
    color: #f5d742;
}

.gc-stat.green {
    color: #4ade80;
}

.gc-stat img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.gc-banner {
    width: 100%;
    height: 95px;
    object-fit: cover;
    display: block;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.tech-dots {
    position: absolute;
    bottom: 10px;
    display: flex;
    gap: 6px;
}

.tech-dots.left {
    left: 24px;
}

.tech-dots.right {
    right: 24px;
}

.tech-dots span {
    width: 8px;
    height: 4px;
    background: var(--border-soft);
    border-radius: 2px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.4);
}

.gc-enter-btn {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 45px;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    border-radius: 14px;
    z-index: 10;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.1s;
}

.gc-enter-btn:active {
    transform: translate(-50%, 2px);
}

.btn-purple {
    background: linear-gradient(180deg, #a750f9, #8629d8);
    border-color: #dcb3fd;
    box-shadow: none;
}

.btn-yellow {
    background: linear-gradient(180deg, #ffc444, #f5911e);
    border-color: #ffeba1;
    box-shadow: none;
}

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

.back-btn {
    width: 24px;
    height: 24px;
    cursor: pointer;
    object-fit: contain;
}

.prize-title {
    font-size: 24px;
    text-transform: uppercase;
    font-weight: 900;
}

.prize-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.prize-selector-btn {
    background: var(--border-soft);
    border: 2px solid var(--border-strong);
    padding: 8px 30px;
    border-radius: 12px;
    font-size: 14px;
    text-transform: uppercase;
    min-width: 140px;
    text-align: center;
}

.arrow-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    cursor: pointer;
}

.prize-pool-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 10px 0;
    margin-bottom: 15px;
}

.pool-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.pool-amounts {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 900;
}

.pool-amounts img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.winners-btn {
    background: var(--text-soft);
    color: var(--surface-3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 20px;
}

.lb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--border-soft);
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.lb-row:active {
    transform: scale(0.98);
}

.lb-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.lb-rank {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
}

.lb-name {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.lb-score {
    background: var(--bg-void);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.lb-rewards {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
}

.reward-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reward-col img {
    width: 18px;
    height: 18px;
    margin-bottom: 2px;
    object-fit: contain;
}

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

.page-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s;
}

.page-btn:active {
    background: rgba(255,255,255,0.2);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

.my-rank-row {
    border: 2px solid var(--accent-primary) !important;
    background: rgba(73, 206, 254, 0.15) !important;
}

.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.task-hero {
    text-align: center;
    margin-bottom: 20px;
}

.task-hero img {
    width: 160px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 10px;
}

.task-hero-text {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.4;
}

.text-cyan {
    color: var(--accent-primary);
}

.text-green {
    color: #4ade80;
}

.task-list-title {
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--border-soft);
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
}

.task-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-void);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.task-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.task-name {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.task-reward {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #4ade80;
    font-size: 13px;
}

.task-reward img {
    width: 14px;
    height: 14px;
}

.task-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.play-arrow {
    color: #ffffff;
    font-size: 18px;
}

.claim-btn-small {
    background: rgba(46,204,113,0.15);
    color: #27ae60;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
}

.claim-btn-small.start {
    background: linear-gradient(90deg, var(--accent-primary-deep), var(--accent-primary));
    color: white;
}

.invite-stats-container {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.invite-stat-box {
    flex: 1;
    background: var(--border-soft);
    padding: 16px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid var(--border-strong);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.invite-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 800;
}

.invite-stat-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent-primary);
}

.invite-stat-value.gold {
    color: #ffe522;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.invite-stat-value.gold img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.invite-link-wrapper {
    background: var(--bg-void);
    padding: 18px;
    border-radius: 16px;
    border: 2px solid var(--border-strong);
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.invite-link-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 900;
}

.invite-link-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-1);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.invite-link-text {
    font-size: 12px;
    color: #fff;
    word-break: break-all;
    padding-right: 15px;
    opacity: 0.9;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.popup-box {
    width: 90%;
    max-width: 380px;
    background: var(--border-soft);
    border-radius: 20px;
    padding: 20px 16px;
    position: relative;
    border: 2px solid var(--border-strong);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-header-ribbon {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-soft);
    color: var(--surface-3);
    padding: 10px 40px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 900;
    border: 3px solid var(--border-strong);
    white-space: nowrap;
}

.close-btn {
    position: absolute;
    top: -15px;
    right: -10px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 10;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.popup-profile-banner {
    background-color: var(--bg-grad-1);
    border-radius: 14px;
    padding: 20px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.popup-profile-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    border-radius: 14px;
    z-index: 1;
}

.popup-avatar {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    border: 2px solid var(--border-strong);
    background: var(--surface-2);
    padding: 2px;
    position: relative;
    z-index: 2;
}

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

.popup-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 2;
}

.popup-name {
    font-size: 18px;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.popup-code {
    font-size: 11px;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.copy-icon {
    width: 14px;
    height: 14px;
    cursor: pointer;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0px 1px 2px rgba(0,0,0,0.8));
}

.popup-block {
    background: var(--surface-1);
    border-radius: 14px;
    padding: 16px;
    position: relative;
    margin-top: 10px;
}

.block-label {
    position: absolute;
    top: -12px;
    left: 16px;
    background: var(--surface-1);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 10px;
    text-transform: uppercase;
    color: #fff;
}

.reward-paid {
    text-align: center;
    font-size: 12px;
    font-weight: 900;
    margin: 5px 0;
    text-transform: uppercase;
}

.reward-paid span {
    color: #fefb49;
}

.recent-reward-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.reward-pill {
    background: var(--bg-void);
    display: flex;
    align-items: center;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    gap: 8px;
}

.reward-pill img {
    width: 24px;
    height: 24px;
}

.min-balance {
    text-align: right;
    font-size: 10px;
    color: var(--text-muted);
}

.min-balance span {
    display: block;
    font-size: 14px;
    color: #fefb49;
    text-decoration: underline;
    margin-top: 2px;
}

.popup-btn-full {
    width: 100%;
    background: var(--border-soft);
    border: none;
    padding: 12px;
    border-radius: 10px;
    color: white;
    font-weight: 900;
    font-size: 12px;
    margin-top: 15px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.popup-btn-full.theme-btn {
    background: linear-gradient(90deg, var(--accent-primary-deep), var(--accent-primary));
    border: 2px solid var(--accent-primary-soft);
}

.wallet-box {
    background: var(--text-soft);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.wallet-address {
    font-size: 10px;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
}

.wallet-address span {
    font-size: 14px;
    color: var(--surface-3);
    font-weight: 900;
    margin-top: 2px;
}

.disconnect-text {
    color: #ef4444;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    font-size: 14px;
    align-items: center;
    color: var(--text-soft);
}

.summary-row:last-child {
    border-bottom: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-1);
    transition: .3s;
    border-radius: 24px;
    border: 2px solid var(--border-strong);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary-deep);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #fff;
    box-shadow: 0 0 5px rgba(255,255,255,0.8);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding-top: 15px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: calc(24px + var(--tg-safe-bottom));
    z-index: 100;
    background: linear-gradient(to top, rgba(21,17,46,1) 40%, rgba(21,17,46,0) 100%);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
}

.nav-item.active {
    opacity: 1;
    transform: translateY(-4px) scale(1.15);
}

.nav-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    margin-bottom: 6px;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.8));
}

.nav-item span {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
    transition: color 0.2s;
    white-space: nowrap;
}

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

.converter-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
    gap: 10px;
}

.conv-input-box {
    background: var(--bg-void);
    border: 2px solid var(--border-soft);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.conv-input-box input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    width: 100%;
    outline: none;
}

.how-it-works-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 5px;
    line-height: 1.4;
    font-weight: 700;
}

.how-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.icon-check {
    width: 14px;
    height: 14px;
    object-fit: contain;
    margin-top: 2px;
    flex-shrink: 0;
}

.copy-box-wrapper {
    background: var(--text-soft);
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid var(--accent-primary-soft);
}

.copy-box-left {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding-right: 10px;
}

.copy-box-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--border-strong);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.copy-box-value {
    font-size: 14px;
    font-weight: 900;
    color: var(--surface-3);
    word-break: break-all;
}

.copy-box-btn {
    width: 22px;
    height: 22px;
    cursor: pointer;
    filter: brightness(0) drop-shadow(0px 1px 1px rgba(0,0,0,0.2));
    flex-shrink: 0;
}

.play-stats-board {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 10px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.play-stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.play-stat-col.center-col {
    border-left: 1px dashed rgba(255,255,255,0.2);
    border-right: 1px dashed rgba(255,255,255,0.2);
}

.play-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 900;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.play-stat-value {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
}

.play-stat-prizes {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 900;
    color: #fefb49;
}

.play-center-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    min-height: 180px;
}

.play-center-img {
    width: 100%;
    max-width: 250px;
    object-fit: contain;
}

.play-timer-section {
    text-align: center;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.play-hearts {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    font-weight: 900;
    color: #ff4b6b;
    margin-bottom: 15px;
}

.play-btn-styled {
    background: linear-gradient(180deg, #a750f9, #8629d8);
    border: 3px solid #dcb3fd;
    border-radius: 14px;
    padding: 12px 40px;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.1s;
    box-shadow: none;
}

.play-btn-styled:active {
    transform: translateY(3px);
}

.play-bottom-actions {
    display: flex;
    gap: 10px;
    padding: 0 10px;
}

.play-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    position: relative;
    gap: 10px;
}

.play-action-btn.fun-mode {
    background: var(--text-soft);
    color: var(--surface-3);
}

.play-action-btn.get-entry {
    background: var(--text-soft);
    color: var(--surface-3);
    border: 2px solid var(--accent-primary);
}

.play-action-btn .btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.play-action-btn .btn-sub {
    font-size: 9px;
    font-weight: 900;
    color: var(--border-strong);
}

.play-action-btn .btn-main {
    font-size: 12px;
    font-weight: 900;
}

.play-action-btn .strike {
    text-decoration: line-through;
    font-size: 9px;
    color: #ef4444;
    margin-left: 4px;
}

.discount-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid #fff;
    transform: rotate(10deg);
}

.top3-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 25px;
    margin-top: 20px;
}

.top3-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface-1);
    padding: 15px 5px 10px 5px;
    border-radius: 16px;
    position: relative;
    border: 2px solid transparent;
    width: 30%;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.top3-item:active {
    transform: scale(0.95);
}

.top3-item.rank-1 {
    border-color: #ffd700;
    transform: translateY(-20px);
    width: 34%;
    z-index: 5;
    background: linear-gradient(180deg, #3d3522, var(--surface-1));
}

.top3-item.rank-2 {
    border-color: #c0c0c0;
    background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
}

.top3-item.rank-3 {
    border-color: #cd7f32;
    background: linear-gradient(180deg, #382c24, var(--surface-1));
}

.top3-avatar-wrap {
    position: relative;
    margin-bottom: 12px;
}

.top3-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background: var(--bg-void);
}

.top3-item.rank-1 .top3-avatar {
    width: 60px;
    height: 60px;
    border-color: #ffd700;
}

.top3-item.rank-2 .top3-avatar {
    border-color: #c0c0c0;
}

.top3-item.rank-3 .top3-avatar {
    border-color: #cd7f32;
}

.top3-badge {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
    z-index: 2;
}

.top3-item.rank-1 .top3-badge {
    width: 36px;
    height: 36px;
    bottom: -16px;
}

.top3-name {
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 4px;
    padding: 0 4px;
}

.top3-item.rank-1 .top3-name {
    font-size: 13px;
    color: #ffd700;
}

.top3-score {
    font-size: 10px;
    background: var(--bg-void);
    padding: 2px 8px;
    border-radius: 8px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.top3-prize {
    font-size: 12px;
    font-weight: 900;
    color: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.top3-item.rank-1 .top3-prize {
    font-size: 14px;
}

.top3-prize img {
    width: 14px;
    height: 14px;
}

.empty-podium {
    visibility: hidden;
    pointer-events: none;
}

.floating-text-airdrop {
    position: fixed;
    color: #4ade80;
    font-size: 24px;
    font-weight: 900;
    text-shadow: 2px 2px 0 #000;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.partner-task-card {
    background: var(--border-soft);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.partner-task-title {
    font-size: 12px;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

@keyframes hitFlash {
    0% {
        transform: scale(0.85);
        filter: brightness(1.5);
    }

    50% {
        transform: scale(1.1);
        filter: brightness(1.5);
    }

    100% {
        transform: scale(1);
        filter: none;
    }
}

.hit-anim {
    animation: hitFlash 0.3s ease-out forwards !important;
}

.timer-display {
    color: #ef4444 !important;
}

.payment-tabs {
    display: flex;
    flex-direction: row;
    width: 100%;
    background: var(--bg-void);
    border: 2px solid var(--border-soft);
    padding: 4px;
    border-radius: 14px;
    gap: 4px;
    margin-bottom: 15px;
}

.ptab {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 1px;
}

.ptab.active {
    background: linear-gradient(90deg, var(--accent-primary-deep), var(--accent-primary));
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.info-img-airdrop {
    display: block;
    margin: 10px auto;
    width: 90%;
    max-width: 320px;
    object-fit: contain;
}

/* =========================================================================
 * COSMIC SPINNER — fully-paid TON spin feature. No randomness in the
 * payout (that's server-side, see spinapi.php); this is purely the
 * presentational wheel + result treatment.
 * ========================================================================= */

.game-card-container.cyan-accent::before {
    background: var(--accent-primary);
}

.btn-cyan {
    background: var(--blaze);
    border-color: var(--accent-primary-soft);
    box-shadow: none;
}

.spin-card-banner {
    width: 100%;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background:
        radial-gradient(circle at 50% 120%, rgba(73,206,254,0.25), transparent 60%),
        var(--surface-3);
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}
.spin-card-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.15;
}
.spin-card-mini-wheel {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: conic-gradient(
        #ffd54a 0deg 45deg,
        var(--accent-primary-deep) 45deg 90deg,
        #7c3aed 90deg 135deg,
        var(--accent-primary-deep) 135deg 180deg,
        #7c3aed 180deg 225deg,
        var(--accent-primary-deep) 225deg 270deg,
        #7c3aed 270deg 315deg,
        var(--accent-primary-deep) 315deg 360deg
    );
    border: 3px solid rgba(255,255,255,0.85);
    box-shadow: 0 0 18px rgba(73,206,254,0.55);
    animation: spin-card-idle 6s linear infinite;
    position: relative;
    z-index: 1;
}
@keyframes spin-card-idle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spin-card-copy {
    position: relative;
    z-index: 1;
    text-align: left;
}
.spin-card-copy .sc-line1 { font-size: 11px; font-weight: 800; color: var(--text-soft); text-transform: uppercase; letter-spacing: .5px; }
.spin-card-copy .sc-line2 { font-size: 13px; font-weight: 900; color: var(--accent-primary); }

/* ---- Full-screen spin popup ---- */
#spin-popup .popup-box {
    align-items: center;
    text-align: center;
    padding-bottom: 24px;
    max-height: 92vh;
    overflow-y: auto;
}

.spin-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
    gap: 10px;
}
.spin-status-pill {
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 800;
    flex: 1;
}
.spin-status-pill b {
    display: block;
    color: var(--accent-primary);
    font-size: 15px;
    margin-top: 2px;
}

.spin-progress-wrap {
    width: 100%;
    margin-top: 14px;
}
.spin-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
}
.spin-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 20px;
    background: var(--surface-3);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    position: relative;
}
.spin-progress-fill {
    height: 100%;
    border-radius: 20px;
    background: var(--blaze);
    box-shadow: 0 0 10px rgba(73,206,254,0.7);
    transition: width 0.6s ease;
}

.spin-wheel-stage {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 26px auto 10px auto;
}
.spin-wheel-glow {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(73,206,254,0.35), transparent 70%);
    filter: blur(4px);
    animation: neon-pulse 2.4s ease-in-out infinite;
}
.spin-pointer {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid #ffd54a;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    z-index: 6;
}
.spin-wheel-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 6px solid var(--surface-1);
    box-shadow:
        0 0 0 2px var(--border-strong),
        0 8px 24px rgba(0,0,0,0.5),
        inset 0 0 20px rgba(0,0,0,0.4);
    z-index: 2;
}
.spin-wheel {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: conic-gradient(
        #ffd54a 0deg 45deg,
        var(--accent-primary-deep) 45deg 90deg,
        #7c3aed 90deg 135deg,
        var(--accent-primary-deep) 135deg 180deg,
        #7c3aed 180deg 225deg,
        var(--accent-primary-deep) 225deg 270deg,
        #7c3aed 270deg 315deg,
        var(--accent-primary-deep) 315deg 360deg
    );
    z-index: 3;
    transition: transform 4.2s cubic-bezier(0.12, 0.67, 0.1, 1);
    will-change: transform;
}
.spin-wheel-labels {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    z-index: 4;
    pointer-events: none;
}
.spin-wheel-label {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 74px;
    margin-left: -37px;
    text-align: center;
    font-size: 9.5px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    text-transform: uppercase;
    transform-origin: 50% 0;
}
.spin-wheel-hub {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--blaze);
    border: 3px solid #fff;
    box-shadow: 0 0 16px rgba(73,206,254,0.8), inset 0 2px 6px rgba(255,255,255,0.4);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    user-select: none;
    transition: transform 0.12s;
}
.spin-wheel-hub:active { transform: scale(0.94); }
.spin-wheel-hub .swh-label {
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    letter-spacing: .5px;
}
.spin-wheel-hub .swh-cost {
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,0.85);
    margin-top: 1px;
}
.spin-wheel-hub.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}
.spin-wheel-hub:not(.disabled) {
    animation: swh-breathe 1.8s ease-in-out infinite;
}
@keyframes swh-breathe {
    0%, 100% { box-shadow: 0 0 16px rgba(73,206,254,0.8), inset 0 2px 6px rgba(255,255,255,0.4); }
    50% { box-shadow: 0 0 26px rgba(73,206,254,1), inset 0 2px 6px rgba(255,255,255,0.5); }
}

.spin-wallet-row {
    width: 100%;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 11.5px;
}
.spin-wallet-row .swr-status { color: var(--text-muted); font-weight: 700; }
.spin-wallet-row .swr-addr { color: var(--accent-primary); font-weight: 800; }
.spin-wallet-row .swr-btn {
    background: var(--blaze);
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
}

.spin-history-note {
    margin-top: 14px;
    font-size: 10.5px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ---- Screen dim + result reveal ---- */
.spin-dim-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.spin-dim-overlay.active { opacity: 1; }

.spin-result-card {
    position: fixed;
    left: 50%;
    bottom: -320px;
    transform: translateX(-50%);
    width: min(320px, 86vw);
    background: linear-gradient(180deg, var(--surface-1), var(--surface-3));
    border: 2px solid var(--accent-primary);
    border-radius: 22px;
    padding: 26px 20px 22px 20px;
    text-align: center;
    z-index: 999;
    box-shadow: 0 -10px 40px rgba(73,206,254,0.4), 0 0 0 4px rgba(73,206,254,0.15);
    transition: bottom 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}
.spin-result-card.show { bottom: 14vh; }
.spin-result-card.jackpot {
    border-color: #ffd54a;
    box-shadow: 0 -10px 50px rgba(255,213,74,0.55), 0 0 0 4px rgba(255,213,74,0.2);
    background: linear-gradient(180deg, #2c2412, var(--surface-3));
}
.spin-result-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    margin: -60px auto 10px auto;
    background: var(--blaze);
    border: 4px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 6px 20px rgba(73,206,254,0.6);
    animation: spin-result-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.spin-result-card.jackpot .spin-result-icon {
    background: linear-gradient(180deg, #ffe27a, #ffb020);
    box-shadow: 0 6px 24px rgba(255,213,74,0.8);
}
@keyframes spin-result-pop {
    0% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.spin-result-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.spin-result-card.jackpot .spin-result-title { color: #ffd54a; }
.spin-result-amount {
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    margin-top: 4px;
    animation: spin-amount-scale 0.4s ease 0.15s both;
}
@keyframes spin-amount-scale {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.spin-result-close {
    margin-top: 18px;
    width: 100%;
    padding: 11px 0;
    border-radius: 12px;
    border: none;
    background: var(--blaze);
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
}
.spin-result-card.jackpot .spin-result-close {
    background: linear-gradient(180deg, #ffe27a, #ffb020);
    color: #3a2400;
}

#spin-confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

/* =========================================================================
 * AIRDROP TAP2EARN — redesigned rank badge, tap glow/ripple, progress bar,
 * and the eligibility mission card. Element IDs referenced by core.js are
 * unchanged; this is purely presentational.
 * ========================================================================= */

.ad-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 18px auto;
    padding: 8px 18px;
    border-radius: 30px;
    background: linear-gradient(180deg, var(--surface-1), var(--surface-3));
    border: 1px solid var(--border-soft);
    box-shadow: 0 0 16px rgba(205,127,50,0.25);
}
.ad-rank-badge.elite { box-shadow: 0 0 18px rgba(167,80,249,0.35); }
.ad-rank-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    animation: ad-rank-pulse 1.6s ease-in-out infinite;
}
@keyframes ad-rank-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
#airdrop-rank-display { font-size: 13px; font-weight: 900; letter-spacing: 1.5px; }

.ad-tap-stage {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto;
}
.ad-tap-glow {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(73,206,254,0.28), transparent 70%);
    filter: blur(6px);
    animation: neon-pulse 2.6s ease-in-out infinite;
    pointer-events: none;
}
.ad-tap-ring {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    border: 2px dashed rgba(73,206,254,0.3);
    animation: ad-ring-spin 30s linear infinite;
    pointer-events: none;
}
@keyframes ad-ring-spin { to { transform: rotate(360deg); } }
#airdrop-tap-area {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#airdrop-tap-area:active #airdrop-monster-img { transform: scale(0.94); }
#airdrop-monster-img { transition: transform 0.1s ease; }

.ad-ripple {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(73,206,254,0.55);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%) scale(1);
    animation: ad-ripple-out 0.5s ease-out forwards;
}
@keyframes ad-ripple-out { to { transform: translate(-50%, -50%) scale(9); opacity: 0; } }

.ad-progress-card {
    max-width: 320px;
    margin: 18px auto 0 auto;
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 12px 16px;
}
.ad-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 8px;
}
.ad-progress-label b { color: var(--text-soft); font-weight: 900; }
.ad-progress-track {
    width: 100%;
    height: 9px;
    border-radius: 20px;
    background: var(--surface-3);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}
.ad-progress-fill {
    height: 100%;
    border-radius: 20px;
    background: var(--blaze);
    box-shadow: 0 0 10px rgba(73,206,254,0.6);
    transition: width 0.4s ease;
}

.ad-mission-card {
    max-width: 340px;
    margin: 22px auto 0 auto;
    background: linear-gradient(180deg, var(--surface-1), var(--surface-3));
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 16px;
}
.ad-mission-title {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
    text-align: center;
}
.ad-mission-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border-soft);
}
.ad-mission-item:first-of-type { border-top: none; padding-top: 0; }
.ad-mission-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(73,206,254,0.12);
    color: var(--accent-primary);
    font-weight: 900;
    font-size: 15px;
    transition: background 0.25s ease, color 0.25s ease;
}
.ad-mission-icon.done { background: rgba(74,222,128,0.18); color: #4ade80; }
.ad-mission-text { flex: 1; min-width: 0; }
.ad-mission-text .ad-m-title { font-size: 12.5px; font-weight: 800; color: #fff; }
.ad-mission-text .ad-m-status { font-size: 10.5px; font-weight: 700; color: var(--text-muted); margin-top: 2px; }
.ad-mission-text .ad-m-status.done { color: #4ade80; }
.ad-mission-btn {
    background: var(--blaze);
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.ad-mission-btn.done {
    background: rgba(74,222,128,0.15);
    color: #4ade80;
    cursor: default;
}
.ad-mission-btn:disabled { opacity: 0.6; cursor: not-allowed; }
