/* === main.css === */
/* ============================================
   REAL MAFIA — Premium Dark Theme
   ============================================ */

:root {
    /* Dark mafia colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #14141d;
    --bg-tertiary: #1c1c28;
    --bg-card: #18181f;
    --bg-card-hover: #20202a;

    /* Mafia accents */
    --accent-gold: #d4af37;
    --accent-gold-bright: #f5d142;
    --accent-blood: #d83030;
    --accent-blood-bright: #ff4040;
    --accent-emerald: #2dd4bf;
    --accent-purple: #a855f7;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a8a8b8;
    --text-tertiary: #6b6b7b;
    --text-muted: #4a4a55;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);

    /* Effects */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow-gold: 0 0 32px rgba(212, 175, 55, 0.3);
    --shadow-glow-red: 0 0 32px rgba(216, 48, 48, 0.3);

    /* Animation */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
}

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* ============================================
   MAFIA LOADER — Card Deal Animation
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, #1a0a14 0%, #0a0a0f 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 600ms ease;
    overflow: hidden;
}

.loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Spotlight from above */
.loader-spotlight {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 600px;
    background: radial-gradient(ellipse at top, rgba(212, 175, 55, 0.25) 0%, transparent 60%);
    filter: blur(20px);
    pointer-events: none;
}

/* Smoke particles */
.loader-smoke {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.smoke-particle {
    position: absolute;
    bottom: -100px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: smokeRise 4s linear infinite;
}

.smoke-particle:nth-child(1) { left: 15%; animation-delay: 0s; }
.smoke-particle:nth-child(2) { left: 30%; animation-delay: 1s; }
.smoke-particle:nth-child(3) { left: 50%; animation-delay: 0.5s; width: 100px; height: 100px; }
.smoke-particle:nth-child(4) { left: 70%; animation-delay: 1.5s; }
.smoke-particle:nth-child(5) { left: 85%; animation-delay: 2s; }

/* Cards container */
.loader-cards {
    position: relative;
    width: 280px;
    height: 140px;
    margin-bottom: 40px;
    perspective: 1000px;
}

.loader-card {
    position: absolute;
    top: 0;
    left: 50%;
    width: 60px;
    height: 90px;
    background: linear-gradient(135deg, #2a1a2a 0%, #1a0a1a 100%);
    border: 1.5px solid var(--accent-gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform-origin: bottom center;
    opacity: 0;
    will-change: transform, opacity;
}

.loader-card[data-card="1"] {
    animation: cardDeal 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
    --final-rotate: -28deg;
    --final-x: -110px;
}
.loader-card[data-card="2"] {
    animation: cardDeal 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
    --final-rotate: -14deg;
    --final-x: -55px;
}
.loader-card[data-card="3"] {
    animation: cardDeal 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
    --final-rotate: 0deg;
    --final-x: 0px;
    z-index: 5;
}
.loader-card[data-card="4"] {
    animation: cardDeal 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards;
    --final-rotate: 14deg;
    --final-x: 55px;
}
.loader-card[data-card="5"] {
    animation: cardDeal 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 1.0s forwards;
    --final-rotate: 28deg;
    --final-x: 110px;
}

.loader-card span {
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
}

/* Brand text */
.loader-brand {
    opacity: 0;
    animation: fadeInUp 800ms ease-out 1.4s forwards;
    text-align: center;
}

.loader-title {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(180deg, #f5d142 0%, #d4af37 50%, #8a6f1a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 8px;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
    margin-bottom: 8px;
}

/* loader-subtitle override'lari pastda — yangi ornament style ishlatiladi */

/* Pulse loader — 5 ta nuqta gangster style, gorizontal chiziq emas */
.loader-pulse {
    display: flex;
    gap: 10px;
    margin-top: 36px;
    opacity: 0;
    animation: fadeIn 400ms ease 1.6s forwards;
}

.loader-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold));
    box-shadow:
        0 0 12px rgba(212, 175, 55, 0.7),
        0 2px 4px rgba(0, 0, 0, 0.4);
    animation: pulseDot 1.4s ease-in-out infinite;
}

.loader-pulse-dot:nth-child(1) { animation-delay: 0s; }
.loader-pulse-dot:nth-child(2) { animation-delay: 0.15s; }
.loader-pulse-dot:nth-child(3) { animation-delay: 0.3s; background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-blood)); }
.loader-pulse-dot:nth-child(4) { animation-delay: 0.45s; }
.loader-pulse-dot:nth-child(5) { animation-delay: 0.6s; }

@keyframes pulseDot {
    0%, 80%, 100% {
        transform: scale(0.6) translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.15) translateY(-6px);
        opacity: 1;
        box-shadow:
            0 0 20px rgba(212, 175, 55, 1),
            0 0 10px rgba(216, 48, 48, 0.6),
            0 4px 8px rgba(0, 0, 0, 0.4);
    }
}

/* Loader subtitle — ornament bilan */
.loader-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--accent-gold);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.loader-ornament-left,
.loader-ornament-right {
    font-size: 16px;
    color: var(--accent-gold);
    opacity: 0.7;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    animation: ornamentFloat 3s ease-in-out infinite;
}

.loader-ornament-right {
    animation-delay: 1.5s;
}

@keyframes ornamentFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    50%      { transform: translateY(-2px) rotate(5deg); opacity: 1; }
}

.loader-tagline {
    display: inline-block;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.8) 50%,
        transparent 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: taglineShimmer 4s ease-in-out infinite;
    color: var(--accent-gold);
}

@keyframes taglineShimmer {
    0%, 100% { background-position: -100% 0; }
    50%      { background-position: 200% 0; }
}

/* ============================================
   APP CONTAINER
   ============================================ */
.app {
    min-height: 100vh;
    background-color: var(--bg-primary);
    padding-bottom: 80px;
    position: relative;
}

.app.hidden {
    display: none;
}

/* Section gaps - yaxshi ajratish */
.tab-content > * + * {
    margin-top: 16px;
}

.app-bg-glow {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: relative;
    padding: 16px 16px 8px;
    z-index: 1;
}

.header-content {
    position: relative;  /* lang-switcher absolute uchun anchor */
    background: linear-gradient(135deg,
        rgba(20, 20, 30, 0.9) 0%,
        rgba(28, 28, 40, 0.95) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 20px 20px 20px 20px;
    padding-top: 44px;  /* lang switcher uchun joy */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
}

/* User Card */
.user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blood), #8a1c1c);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    transition: transform var(--transition-fast), box-shadow var(--transition-normal);
    /* Border is set per rank class — fallback is gold */
    box-shadow: 0 0 0 2px var(--accent-gold), 0 4px 16px rgba(212, 175, 55, 0.3);
}

.user-avatar:active {
    transform: scale(0.95);
}

.user-avatar--photo {
    background-color: transparent;
}

.user-avatar--photo #userInitial {
    display: none;
}

/* ============================================
   RANK-BASED AVATAR RINGS (5 levels)
   1: Yangi o'yinchi — kumush
   2: Tajribali — bronza
   3: Pro Detektiv — kumush yorqin
   4: Shahar afsonasi — oltin
   5: O'lmas hukmdor — premium gradient (gold+blood+purple)
   ============================================ */
.user-avatar--rank-1 {
    box-shadow:
        0 0 0 2px #8a8a9a,
        0 4px 12px rgba(138, 138, 154, 0.4);
}
.user-avatar--rank-2 {
    box-shadow:
        0 0 0 2px #cd7f32,
        0 4px 14px rgba(205, 127, 50, 0.5);
}
.user-avatar--rank-3 {
    box-shadow:
        0 0 0 2px #c0c0d0,
        0 0 18px rgba(192, 192, 208, 0.6),
        0 4px 14px rgba(0, 0, 0, 0.4);
}
.user-avatar--rank-4 {
    box-shadow:
        0 0 0 2px var(--accent-gold-bright),
        0 0 24px rgba(212, 175, 55, 0.7),
        0 4px 16px rgba(0, 0, 0, 0.4);
}
.user-avatar--rank-5 {
    box-shadow:
        0 0 0 2.5px var(--accent-gold-bright),
        0 0 0 5px rgba(168, 85, 247, 0.4),
        0 0 28px rgba(212, 175, 55, 0.8),
        0 0 14px rgba(216, 48, 48, 0.5),
        0 4px 18px rgba(0, 0, 0, 0.5);
    animation: avatarPulseMax 3s ease-in-out infinite;
}

@keyframes avatarPulseMax {
    0%, 100% {
        box-shadow:
            0 0 0 2.5px var(--accent-gold-bright),
            0 0 0 5px rgba(168, 85, 247, 0.4),
            0 0 28px rgba(212, 175, 55, 0.8),
            0 0 14px rgba(216, 48, 48, 0.5),
            0 4px 18px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
            0 0 0 2.5px var(--accent-gold-bright),
            0 0 0 6px rgba(168, 85, 247, 0.5),
            0 0 36px rgba(212, 175, 55, 1),
            0 0 20px rgba(216, 48, 48, 0.7),
            0 4px 22px rgba(0, 0, 0, 0.6);
    }
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.user-rank {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 10px 4px 6px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    cursor: pointer;
    user-select: none;
}

.user-rank:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

.user-rank:active {
    transform: scale(0.96);
}

.user-rank::after {
    content: 'ⓘ';
    font-size: 10px;
    opacity: 0.5;
    margin-left: 2px;
}

.user-vip {
    display: none;
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
    animation: vipPulse 2s ease-in-out infinite;
}

.user-vip.active {
    display: block;
}

/* MMR Progress */
.mmr-progress {
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.mmr-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mmr-progress-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: 1px;
}

.mmr-progress-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: 'Cinzel', serif;
}

.mmr-progress-bar {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.mmr-progress-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(90deg,
        var(--accent-blood) 0%,
        var(--accent-gold) 50%,
        var(--accent-gold-bright) 100%);
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mmr-progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: progressGlow 2s ease-in-out infinite;
}

.mmr-progress-footer {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: right;
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    padding: 14px 16px 16px;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    margin-top: 16px;
}

.tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-tertiary);
    position: relative;
    border-radius: var(--radius-md);
}

.tab:active {
    transform: scale(0.95);
}

.tab.active {
    color: var(--accent-gold);
}

.tab.active::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-blood));
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-glow-gold);
}

.tab-icon {
    font-size: 22px;
    transition: transform var(--transition-fast);
}

.tab.active .tab-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.tab-label {
    font-size: 11px;
    font-weight: 600;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
    padding: 24px 16px;
    position: relative;
    z-index: 1;
}

.tab-content {
    display: none;
    animation: fadeInUp 400ms ease-out;
}

.tab-content.active {
    display: block;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 20px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
}

.footer-text {
    opacity: 0.6;
}

/* === components.css === */
/* ============================================
   V5.1 — PLAY BANNER (viral growth)
   ============================================ */
.play-banner {
    width: 100%;
    position: relative;
    padding: 18px 20px;
    background: linear-gradient(135deg,
        rgba(216, 48, 48, 0.92) 0%,
        rgba(168, 32, 32, 0.85) 50%,
        rgba(120, 28, 28, 0.92) 100%);
    border: 1px solid rgba(255, 100, 100, 0.5);
    border-radius: var(--radius-lg);
    cursor: pointer;
    overflow: hidden;
    color: white;
    font-family: inherit;
    transition: transform var(--transition-fast), box-shadow var(--transition-normal);
    box-shadow:
        0 8px 24px rgba(216, 48, 48, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-align: left;
}

.play-banner:active {
    transform: scale(0.98);
    box-shadow: 0 4px 16px rgba(216, 48, 48, 0.3);
}

.play-banner-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(ellipse at center, rgba(255, 200, 80, 0.3) 0%, transparent 70%);
    pointer-events: none;
    animation: playBannerGlow 4s ease-in-out infinite;
}

@keyframes playBannerGlow {
    0%, 100% { opacity: 0.4; transform: rotate(0deg); }
    50% { opacity: 0.8; transform: rotate(180deg); }
}

.play-banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.play-banner-icon {
    font-size: 40px;
    line-height: 1;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    animation: playIconPulse 2s ease-in-out infinite;
}

@keyframes playIconPulse {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.play-banner-text {
    flex: 1;
}

.play-banner-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 4px;
}

.play-banner-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.play-banner-arrow {
    font-size: 32px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1;
    flex-shrink: 0;
}

/* VIP mode — purple-gold accent */
body.is-vip .play-banner {
    background: linear-gradient(135deg,
        rgba(168, 85, 247, 0.85) 0%,
        rgba(216, 48, 48, 0.85) 50%,
        rgba(212, 175, 55, 0.85) 100%);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.35);
}

/* ============================================
   V5.1 — PLAY MODAL (bottom sheet)
   ============================================ */
.modal--bottom-sheet {
    align-items: flex-end;
    padding: 0;
}

.modal-content--sheet {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px 20px 32px;
    max-height: 80vh;
    animation: sheetSlideUp 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content--tall {
    height: 75vh;
}

@keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.play-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--accent-gold-bright) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.play-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.play-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    text-align: left;
    color: var(--text-primary);
    width: 100%;
}

.play-option:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.play-option--add {
    border-color: rgba(45, 212, 191, 0.3);
}

.play-option--add:hover {
    border-color: rgba(45, 212, 191, 0.6);
}

.play-option--top {
    border-color: rgba(216, 48, 48, 0.3);
}

.play-option--top:hover {
    border-color: rgba(216, 48, 48, 0.6);
}

.play-option-icon {
    font-size: 38px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.play-option-info {
    flex: 1;
    min-width: 0;
}

.play-option-name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.play-option-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================
   V5.1 — TOP GROUPS LIST
   ============================================ */
.tg-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 18px;
    background: linear-gradient(90deg, var(--accent-blood-bright) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tg-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    padding-bottom: 10px;
}

.tg-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.tg-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(212, 175, 55, 0.3);
}

.tg-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blood), #8a1c1c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(216, 48, 48, 0.4);
}

.tg-card-info {
    flex: 1;
    min-width: 0;
}

.tg-card-name {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tg-card-members {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-emerald);
    background: rgba(45, 212, 191, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.tg-card-join {
    flex-shrink: 0;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--accent-gold), #8a6f1a);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tg-card-join:active {
    transform: scale(0.95);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

.tg-loading, .tg-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.tg-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.tg-empty-text {
    font-size: 13px;
}

/* ============================================
   ACTIVE GAME WIDGET — foydalanuvchi o'yinda bo'lsa
   ============================================ */
.active-game-card {
    position: relative;
    background: linear-gradient(135deg,
        rgba(28, 28, 40, 0.95) 0%,
        rgba(20, 20, 30, 0.98) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 16px;
    overflow: hidden;
    animation: activeGameFadeIn 400ms ease-out;
}

@keyframes activeGameFadeIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.active-game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.6;
    background: radial-gradient(circle at top right, var(--game-glow, rgba(212, 175, 55, 0.18)), transparent 60%);
}

/* Variant: Lobby (registratsiya) */
.active-game-card--lobby {
    --game-glow: rgba(212, 175, 55, 0.25);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.15);
}

/* Variant: Kunduz fazasi */
.active-game-card--day {
    --game-glow: rgba(255, 200, 80, 0.25);
    border-color: rgba(255, 200, 80, 0.5);
    box-shadow: 0 0 24px rgba(255, 200, 80, 0.15);
}

/* Variant: Tun fazasi */
.active-game-card--night {
    --game-glow: rgba(120, 90, 220, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.18);
}

/* Variant: O'lgan */
.active-game-card--dead {
    --game-glow: rgba(216, 48, 48, 0.2);
    border-color: rgba(216, 48, 48, 0.4);
    opacity: 0.85;
}

.active-game-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.active-game-emoji {
    font-size: 36px;
    line-height: 1;
    filter: drop-shadow(0 0 12px var(--game-glow));
}

.active-game-card--night .active-game-emoji {
    animation: nightPulse 2.5s ease-in-out infinite;
}

.active-game-card--day .active-game-emoji {
    animation: dayPulse 3s ease-in-out infinite;
}

@keyframes nightPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.6)); }
    50%      { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(168, 85, 247, 1)); }
}

@keyframes dayPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(255, 200, 80, 0.6)); }
    50%      { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(255, 200, 80, 1)); }
}

.active-game-status {
    flex: 1;
    min-width: 0;
}

.active-game-status-label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.active-game-main {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Live pulse indicator (top-right corner) */
.active-game-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.8);
    animation: livePulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.active-game-card--dead .active-game-pulse {
    background: var(--text-muted);
    box-shadow: none;
    animation: none;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.6; }
}

.active-game-sub {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.active-game-actions {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.active-game-jump-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #8a6f1a 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.active-game-jump-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.5);
}

.active-game-card--night .active-game-jump-btn {
    background: linear-gradient(135deg, #a855f7 0%, #6b21a8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
}

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    min-height: 100px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at top right, var(--card-glow-color, transparent), transparent 70%);
    opacity: 0.4;
}

.stat-card--wins {
    --card-glow-color: rgba(212, 175, 55, 0.5);
}

.stat-card--games {
    --card-glow-color: rgba(168, 85, 247, 0.5);
}

.stat-card--winrate {
    --card-glow-color: rgba(45, 212, 191, 0.5);
}

.stat-card--streak {
    --card-glow-color: rgba(216, 48, 48, 0.5);
}

.stat-card-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.stat-card-value {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   GENERIC CARD
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    transition: all var(--transition-normal);
}

.card:hover {
    background: var(--bg-card-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

/* ============================================
   BALANCE CARD (premium look)
   ============================================ */
.balance-card {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.08) 0%,
        rgba(168, 85, 247, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.balance-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.balance-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.5));
}

.balance-info {
    flex: 1;
}

.balance-amount {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.balance-label {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-divider {
    width: 1px;
    height: 40px;
    background: var(--border-default);
}

/* Balance +N flash animation */
.balance-info {
    position: relative;
}

.balance-flash {
    position: absolute;
    top: -8px;
    right: 0;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-emerald);
    text-shadow: 0 0 8px rgba(45, 212, 191, 0.6);
    pointer-events: none;
    animation: balanceFlash 2s ease-out forwards;
}

@keyframes balanceFlash {
    0%   { opacity: 0; transform: translateY(0) scale(0.8); }
    20%  { opacity: 1; transform: translateY(-8px) scale(1.1); }
    100% { opacity: 0; transform: translateY(-32px) scale(0.95); }
}

/* ============================================
   CHART
   ============================================ */
.chart-container {
    position: relative;
    height: 200px;
    padding: 8px 0;
}

/* ============================================
   INVENTORY — adaptive: 1 row uchun avtomatik kengayadi
   ============================================ */
.inventory-grid {
    display: grid;
    /* 1 item — full width; 2 item — 50/50; 3 item — 33/33/33; 4+ — 2x2 grid */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

/* JS-based fallback (browser :has() qo'llab-quvvatlamasa) */
.inventory-grid--count-1 {
    grid-template-columns: 1fr;
}
.inventory-grid--count-2 {
    grid-template-columns: 1fr 1fr;
}
.inventory-grid--count-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.inventory-grid--count-4 {
    grid-template-columns: 1fr 1fr;
}

/* Modern :has() (ham ishlaydi, ham fallback) */
.inventory-grid:has(.inventory-item:nth-child(1):nth-last-child(1)) {
    grid-template-columns: 1fr;
}
.inventory-grid:has(.inventory-item:nth-child(2):nth-last-child(1)) {
    grid-template-columns: 1fr 1fr;
}
.inventory-grid:has(.inventory-item:nth-child(3):nth-last-child(1)) {
    grid-template-columns: 1fr 1fr 1fr;
}

/* 3 ta item rejimida — kichikroq padding va layout kompakt */
.inventory-grid--count-3 .inventory-item,
.inventory-grid:has(.inventory-item:nth-child(3):nth-last-child(1)) .inventory-item {
    padding: 10px 8px;
    gap: 8px;
    flex-direction: column;
    text-align: center;
}

.inventory-grid--count-3 .inventory-toggle,
.inventory-grid:has(.inventory-item:nth-child(3):nth-last-child(1)) .inventory-toggle {
    margin-top: 4px;
}

.inventory-grid--count-3 .inventory-item-info,
.inventory-grid:has(.inventory-item:nth-child(3):nth-last-child(1)) .inventory-item-info {
    text-align: center;
}

.inventory-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.inventory-item--empty {
    opacity: 0.4;
}

.inventory-item-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.inventory-item-info {
    flex: 1;
    min-width: 0;
}

.inventory-item-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-item-count {
    font-size: 11px;
    color: var(--accent-gold);
    font-weight: 700;
    margin-top: 2px;
}

.inventory-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
    grid-column: 1 / -1;
}

/* ============================================
   INVENTORY TOGGLE (active/inactive)
   ============================================ */
.inventory-item {
    position: relative;
    transition: all var(--transition-fast);
}

.inventory-item--active {
    background: linear-gradient(135deg,
        rgba(45, 212, 191, 0.05) 0%,
        var(--bg-tertiary) 100%);
    border-color: rgba(45, 212, 191, 0.3);
}

.inventory-item--active .inventory-item-icon {
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.3));
}

.inventory-item--inactive {
    background: var(--bg-tertiary);
    border-color: var(--border-default);
    /* MUHIM: opacity past emas — buyum bor, faqat o'chiq */
}

.inventory-item--inactive .inventory-item-icon {
    opacity: 0.85;
    /* grayscale yo'q — rang qoladi, faqat biroz pasaytirilgan */
}

.inventory-item-state {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    vertical-align: middle;
}

.inventory-item-state--on {
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent-emerald);
}

.inventory-item-state--off {
    background: rgba(168, 85, 247, 0.12);
    color: #b88aff;
}

.inventory-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}

.inventory-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.inventory-toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

.inventory-toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.inventory-toggle-input:checked + .inventory-toggle-slider {
    background: linear-gradient(135deg, var(--accent-gold), #8a6f1a);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.inventory-toggle-input:checked + .inventory-toggle-slider::before {
    transform: translateX(16px);
}

/* ============================================
   SHOP QUANTITY COUNTER
   ============================================ */
.purchase-qty-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 12px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    color: var(--accent-gold);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qty-btn:active:not(:disabled) {
    transform: scale(0.92);
    background: var(--accent-gold);
    color: var(--bg-primary);
}

.qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.qty-input {
    width: 70px;
    text-align: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    padding: 8px 4px;
    appearance: textfield;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.purchase-qty-presets {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
}

.qty-preset {
    flex: 1;
    max-width: 60px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.qty-preset:active {
    transform: scale(0.95);
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-color: var(--accent-gold);
}

/* ============================================
   MAGIC WORD PANEL (VIP only)
   ============================================ */
.shop-grid--magic {
    display: block !important;
    margin-top: 8px;
}

.magic-word-panel {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.08) 0%,
        rgba(168, 85, 247, 0.05) 50%,
        rgba(216, 48, 48, 0.06) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
}

.magic-word-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

/* User name card — ko'rsatadi: '✨ Bahodir' */
.magic-word-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.12) 0%,
        rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
}

.magic-word-user-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.magic-word-user-name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-gold-bright);
    text-shadow: 0 0 8px rgba(255, 224, 102, 0.3);
}

/* Bo'rttirilgan user name preview (matn ichidagi) */
.magic-word-name-preview {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--accent-gold-bright);
    background: rgba(212, 175, 55, 0.15);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    margin: 0 2px;
}

/* Live preview block (input ostida) */
.magic-word-preview {
    margin-top: 10px;
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal), padding var(--transition-normal);
}

.magic-word-preview--shown {
    max-height: 120px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(212, 175, 55, 0.3);
}

.magic-word-preview-label {
    font-size: 10px;
    color: var(--accent-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

.magic-word-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.7));
    animation: vipPulse 2.5s ease-in-out infinite;
}

.magic-word-titles {
    flex: 1;
}

.magic-word-title {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold-bright);
    margin-bottom: 3px;
}

.magic-word-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.magic-word-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    max-height: 240px;
    overflow-y: auto;
}

.magic-word-empty,
.magic-word-loading {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.magic-word-item {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.magic-word-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(212, 175, 55, 0.3);
}

.magic-word-item:active {
    transform: scale(0.99);
}

.magic-word-item--selected {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(168, 85, 247, 0.08));
    border-color: var(--accent-gold);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.magic-word-item--pending {
    opacity: 0.65;
    cursor: not-allowed;
}

.magic-word-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-style: italic;
}

.magic-word-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.magic-word-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.magic-word-status--default {
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent-emerald);
}

.magic-word-status--pending {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-gold);
}

.magic-word-status--approved {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-gold);
    font-size: 14px;
    padding: 0 8px;
}

.magic-word-selected-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-gold-bright);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.magic-word-input-block {
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
}

.magic-word-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.magic-word-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.magic-word-textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 10px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    transition: border var(--transition-fast);
}

.magic-word-textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.btn-magic-submit {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-gold), #8a6f1a);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-magic-submit:active {
    transform: scale(0.97);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.6);
}

/* ============================================
   ACHIEVEMENTS
   ============================================ */
.achievements-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.1) 0%,
        rgba(168, 85, 247, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.achievements-progress-circle {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg, .circle-progress {
    fill: none;
    stroke-width: 8;
}

.circle-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.circle-progress {
    stroke: url(#circleGradient);
    stroke-linecap: round;
    stroke-dasharray: 276.46;
    stroke-dashoffset: 276.46;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.circle-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circle-text-value {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.circle-text-label {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.achievements-summary-text {
    flex: 1;
}

.achievements-summary-text h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.achievements-summary-text p {
    font-size: 13px;
    color: var(--text-secondary);
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.achievement-item--unlocked {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.1) 0%,
        var(--bg-card) 100%);
    border-color: rgba(212, 175, 55, 0.3);
}

.achievement-item--locked {
    opacity: 0.6;
}

.achievement-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.achievement-item--unlocked .achievement-icon {
    background: linear-gradient(135deg, var(--accent-gold), #8a7820);
    box-shadow: var(--shadow-glow-gold);
}

.achievement-info {
    flex: 1;
    min-width: 0;
}

.achievement-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.achievement-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.achievement-status {
    flex-shrink: 0;
}

.achievement-item--unlocked .achievement-status {
    color: var(--accent-gold);
    font-size: 20px;
}

.achievement-item--locked .achievement-status {
    color: var(--text-muted);
    font-size: 20px;
}

/* ============================================
   LEADERBOARD
   ============================================ */
.leaderboard-header {
    margin-bottom: 16px;
}

.leaderboard-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.leaderboard-item--first {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.15) 0%,
        var(--bg-card) 100%);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.2);
}

.leaderboard-item--second {
    background: linear-gradient(135deg,
        rgba(192, 192, 192, 0.1) 0%,
        var(--bg-card) 100%);
    border-color: rgba(192, 192, 192, 0.3);
}

.leaderboard-item--third {
    background: linear-gradient(135deg,
        rgba(205, 127, 50, 0.1) 0%,
        var(--bg-card) 100%);
    border-color: rgba(205, 127, 50, 0.3);
}

.leaderboard-rank {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-tertiary);
    min-width: 32px;
    text-align: center;
}

.leaderboard-item--first .leaderboard-rank {
    font-size: 24px;
}

.leaderboard-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-mmr {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-gold);
}

/* ============================================
   ROLES
   ============================================ */
.roles-header {
    margin-bottom: 16px;
}

.role-filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-top: 12px;
    padding-bottom: 4px;
}

.filter-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn.active {
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-color: var(--accent-gold);
}

.filter-btn:active {
    transform: scale(0.95);
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.role-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.role-card:active {
    transform: scale(0.97);
}

.role-card--mafia {
    border-color: rgba(216, 48, 48, 0.3);
}

.role-card--mafia::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(216, 48, 48, 0.15), transparent 60%);
    pointer-events: none;
}

.role-card--town {
    border-color: rgba(45, 212, 191, 0.3);
}

.role-card--town::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(45, 212, 191, 0.15), transparent 60%);
    pointer-events: none;
}

.role-card--neutral {
    border-color: rgba(212, 175, 55, 0.3);
}

.role-card--neutral::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.15), transparent 60%);
    pointer-events: none;
}

.role-icon {
    font-size: 40px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.role-name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.role-team {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.role-card--mafia .role-team {
    color: var(--accent-blood);
}

.role-card--town .role-team {
    color: var(--accent-emerald);
}

.role-card--neutral .role-team {
    color: var(--accent-gold);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 200ms ease-out;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideUp 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    text-align: center;
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
}

.modal-name {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-team {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 16px;
}

.modal-team--mafia {
    background: rgba(216, 48, 48, 0.2);
    color: var(--accent-blood);
}

.modal-team--town {
    background: rgba(45, 212, 191, 0.2);
    color: var(--accent-emerald);
}

.modal-team--neutral {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-gold);
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
    font-size: 14px;
}

/* ============================================
   RANK PROGRESSION MODAL
   ============================================ */
.modal-content--rank {
    max-width: 380px;
    padding: 24px 20px;
}

.rank-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-gold-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.rank-item--unlocked {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, var(--bg-tertiary) 100%);
    border-color: rgba(212, 175, 55, 0.25);
}

.rank-item--current {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(216, 48, 48, 0.08) 100%);
    border-color: var(--accent-gold);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}

.rank-item--current::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center left, rgba(212, 175, 55, 0.15), transparent 60%);
    pointer-events: none;
}

.rank-item--locked {
    opacity: 0.55;
}

.rank-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    border: 1px solid var(--border-default);
}

.rank-item--current .rank-item-icon {
    background: linear-gradient(135deg, var(--accent-gold), #8a6f1a);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
    border-color: var(--accent-gold-bright);
}

.rank-item--unlocked:not(.rank-item--current) .rank-item-icon {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    border-color: rgba(212, 175, 55, 0.4);
}

.rank-item-info {
    flex: 1;
    min-width: 0;
}

.rank-item-name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.rank-item--current .rank-item-name {
    color: var(--accent-gold);
}

.rank-item-mmr {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.rank-item-progress {
    margin-top: 10px;
}

.rank-item-progress-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 4px;
}

.rank-item-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blood) 0%, var(--accent-gold) 100%);
    border-radius: var(--radius-full);
    transition: width 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rank-item-progress-text {
    font-size: 11px;
    color: var(--accent-gold-bright);
    font-weight: 600;
}

.rank-item-status {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rank-status--current {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-bright));
    color: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
    font-size: 10px;
}

.rank-status--unlocked {
    color: var(--accent-gold);
    font-size: 18px;
    background: transparent;
}

.rank-status--locked {
    color: var(--text-muted);
    font-size: 16px;
    background: transparent;
}

/* === shop.css === */
/* ============================================
   LANGUAGE SWITCHER — header card ichida, top-right
   ============================================ */
.lang-switcher {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px 4px 5px;
    background: linear-gradient(135deg,
        rgba(20, 12, 18, 0.7) 0%,
        rgba(28, 18, 24, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.lang-switcher:hover {
    border-color: rgba(212, 175, 55, 0.75);
    background: linear-gradient(135deg,
        rgba(30, 18, 24, 0.85) 0%,
        rgba(38, 24, 32, 0.9) 100%);
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25);
}

.lang-switcher:active {
    transform: scale(0.93);
}

.lang-switcher-flag {
    font-size: 14px;
    line-height: 1;
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.3));
}

.lang-switcher-code {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 1.2px;
    color: var(--accent-gold-bright);
}

/* VIP mode — premium */
body.is-vip .lang-switcher {
    background: linear-gradient(135deg,
        rgba(40, 14, 14, 0.8) 0%,
        rgba(28, 18, 24, 0.85) 100%);
    border-color: rgba(212, 175, 55, 0.65);
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.3);
}

/* ============================================
   LANGUAGE MODAL
   ============================================ */
.modal-content--lang {
    max-width: 320px;
    padding: 20px;
}

.lang-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--accent-gold);
}

.lang-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 60vh;
    overflow-y: auto;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
    color: var(--text-primary);
    font-family: inherit;
}

.lang-option:active {
    transform: scale(0.97);
}

.lang-option.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), var(--bg-tertiary));
    border-color: var(--accent-gold);
}

.lang-option-flag {
    font-size: 22px;
    line-height: 1;
}

.lang-option-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.lang-option-code {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 1px;
}

.lang-option.active .lang-option-code {
    color: var(--accent-gold);
}

/* ============================================
   SHOP — SECTION TABS
   ============================================ */
.shop-sections {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.shop-section-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.shop-section-btn:active {
    transform: scale(0.97);
}

.shop-section-btn.active {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8902a 100%);
    color: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.shop-section-icon {
    font-size: 16px;
}

/* ============================================
   SHOP SECTIONS
   ============================================ */
.shop-section {
    display: none;
    animation: fadeInUp 300ms ease-out;
}

.shop-section.active {
    display: block;
}

.shop-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-card);
    border-left: 3px solid var(--accent-gold);
    border-radius: var(--radius-md);
}

/* ============================================
   VIP BANNER
   ============================================ */
.vip-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.2) 0%,
        rgba(216, 48, 48, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.vip-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50px;
    width: 150px;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3), transparent 70%);
    pointer-events: none;
}

.vip-banner-icon {
    font-size: 48px;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.8));
    animation: vipPulse 2s ease-in-out infinite;
}

.vip-banner-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.vip-banner-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(180deg, var(--accent-gold-bright) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.vip-banner-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* VIP ACTIVE banner — vip status ko'rsatish uchun */
.vip-banner--active {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.35) 0%,
        rgba(168, 85, 247, 0.22) 50%,
        rgba(216, 48, 48, 0.25) 100%);
    border: 2px solid rgba(212, 175, 55, 0.7);
    box-shadow:
        0 0 32px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vip-banner--active::before {
    width: 250px;
    right: -100px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.5), transparent 70%);
    animation: vipShimmer 4s ease-in-out infinite;
}

@keyframes vipShimmer {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(20px); }
}

.vip-banner-days {
    margin-left: auto;
    text-align: center;
    padding: 8px 14px;
    background: linear-gradient(180deg, var(--accent-gold-bright), var(--accent-gold));
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
    position: relative;
    z-index: 1;
}

.vip-banner-days-number {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.vip-banner-days-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ============================================
   CURRENCY TABS (Gold/Silver)
   ============================================ */
.currency-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.currency-tab {
    flex: 1;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.currency-tab:active {
    transform: scale(0.97);
}

.currency-tab.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), var(--bg-card));
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ============================================
   SHOP CARDS GRID
   ============================================ */
.shop-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 14px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.shop-card--featured {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.08) 0%,
        var(--bg-card) 100%);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.15);
}

.shop-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
}

.shop-card-badge--popular {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.shop-card-badge--best {
    background: linear-gradient(135deg, var(--accent-blood), #8a1c1c);
    color: white;
    box-shadow: 0 2px 8px rgba(216, 48, 48, 0.4);
}

.shop-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.shop-card-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.shop-card-meta {
    flex: 1;
    min-width: 0;
}

.shop-card-name {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.shop-card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.shop-card-discount,
.shop-card-bonus {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent-emerald);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
}

.shop-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.shop-card-price {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-gold);
}

.btn-buy {
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8902a 100%);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.btn-buy:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.4);
}

/* ============================================
   PURCHASE MODAL
   ============================================ */
.purchase-icon {
    font-size: 64px;
    margin-bottom: 12px;
    display: block;
}

.purchase-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.purchase-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.purchase-price-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.purchase-price-value {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-gold);
}

.purchase-actions {
    display: flex;
    gap: 10px;
}

.btn-cancel, .btn-confirm {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-family: inherit;
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-cancel:active {
    transform: scale(0.97);
    background: var(--bg-secondary);
}

.btn-confirm {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8902a 100%);
    color: var(--bg-primary);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-confirm:active {
    transform: scale(0.97);
}

/* === vip-theme.css === */
/* ============================================
   VIP PREMIUM THEME — cinematic mafia noir
   ============================================
   Applied via <body class="is-vip">.
   Mood: dim red lighting, velvet curtains, gold ornaments,
   cigar smoke, lounge atmosphere — premium mafia lounge.
   ============================================ */

body.is-vip {
    --accent-gold: #f5d142;
    --accent-gold-bright: #ffe066;
}

/* Premium background — dim red ember glow + gold mist */
body.is-vip .app::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at top, rgba(216, 48, 48, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(168, 85, 247, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at center, rgba(212, 175, 55, 0.04) 0%, transparent 70%);
    animation: vipBackgroundShift 12s ease-in-out infinite alternate;
}

body.is-vip .app-bg-glow {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, rgba(216, 48, 48, 0.08) 40%, transparent 70%);
    width: 700px;
    height: 700px;
    animation: vipGlowPulse 6s ease-in-out infinite;
}

@keyframes vipBackgroundShift {
    0%   { transform: translateY(0)    rotate(0deg);  opacity: 0.9; }
    100% { transform: translateY(-12px) rotate(0.5deg); opacity: 1;   }
}

@keyframes vipGlowPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50%      { opacity: 1;   transform: translateX(-50%) scale(1.1); }
}

/* Header — velvet feel */
body.is-vip .header-content {
    background:
        linear-gradient(135deg,
            rgba(40, 12, 12, 0.85) 0%,
            rgba(28, 28, 40, 0.92) 40%,
            rgba(50, 18, 30, 0.88) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow:
        0 4px 32px rgba(216, 48, 48, 0.15),
        0 0 0 1px rgba(212, 175, 55, 0.1) inset;
}

body.is-vip .header-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold-bright), transparent);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

body.is-vip .header {
    position: relative;
}

/* User name — gold gradient */
body.is-vip .user-name {
    background: linear-gradient(135deg, #fff 0%, var(--accent-gold-bright) 50%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 24px rgba(212, 175, 55, 0.3);
}

/* MMR progress fill — premium gradient */
body.is-vip .mmr-progress-fill {
    background: linear-gradient(90deg,
        var(--accent-blood) 0%,
        var(--accent-gold) 40%,
        var(--accent-gold-bright) 70%,
        #fff 100%);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

body.is-vip .mmr-progress-value {
    color: var(--accent-gold-bright);
    text-shadow: 0 0 8px rgba(255, 224, 102, 0.5);
}

/* Tabs — luxe feel */
body.is-vip .tabs {
    background: linear-gradient(180deg,
        rgba(10, 10, 15, 0.95) 0%,
        rgba(20, 10, 20, 0.92) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

body.is-vip .tab.active::before {
    background: linear-gradient(90deg,
        var(--accent-gold-bright),
        var(--accent-gold),
        var(--accent-blood));
    box-shadow:
        0 0 16px rgba(212, 175, 55, 0.8),
        0 0 8px rgba(255, 224, 102, 0.6);
}

/* Stat cards — gilded */
body.is-vip .stat-card {
    background: linear-gradient(135deg,
        rgba(28, 18, 24, 0.95) 0%,
        rgba(24, 24, 31, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.25);
}

body.is-vip .stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0.5;
}

body.is-vip .stat-card-value {
    color: var(--accent-gold-bright);
    text-shadow: 0 0 12px rgba(255, 224, 102, 0.25);
}

/* Cards — velvet */
body.is-vip .card {
    background: linear-gradient(135deg,
        rgba(28, 18, 24, 0.88) 0%,
        rgba(24, 24, 31, 0.92) 100%);
    border-color: rgba(212, 175, 55, 0.2);
}

/* Balance card — extra luxe */
body.is-vip .balance-card {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.18) 0%,
        rgba(168, 85, 247, 0.08) 50%,
        rgba(216, 48, 48, 0.12) 100%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    box-shadow:
        0 6px 24px rgba(212, 175, 55, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.is-vip .balance-amount {
    background: linear-gradient(180deg, var(--accent-gold-bright) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Achievements summary — premium */
body.is-vip .achievements-summary {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.2) 0%,
        rgba(168, 85, 247, 0.08) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 4px 24px rgba(212, 175, 55, 0.15);
}

/* Footer — gold gradient line */
body.is-vip .footer {
    position: relative;
}

body.is-vip .footer::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

/* Role cards — slight gold tint */
body.is-vip .role-card {
    border-color: rgba(212, 175, 55, 0.18);
}

body.is-vip .role-card--neutral {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.1);
}

/* Rank chip pulse for VIP */
body.is-vip .user-rank {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.15),
        rgba(168, 85, 247, 0.05));
    border-color: rgba(212, 175, 55, 0.4);
}

/* Shop tabs */
body.is-vip .shop-section-btn.active {
    background: linear-gradient(135deg, var(--accent-gold-bright) 0%, var(--accent-gold) 50%, #b8902a 100%);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.5);
}

/* Smoke ambient particles (decorative) */
body.is-vip .app::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        radial-gradient(2px 2px at 10% 80%, rgba(212, 175, 55, 0.4), transparent),
        radial-gradient(1px 1px at 30% 60%, rgba(212, 175, 55, 0.3), transparent),
        radial-gradient(2px 2px at 70% 40%, rgba(216, 48, 48, 0.2), transparent),
        radial-gradient(1px 1px at 90% 20%, rgba(168, 85, 247, 0.3), transparent);
    background-size: 200px 200px, 250px 250px, 300px 300px, 180px 180px;
    animation: vipParticles 30s linear infinite;
    opacity: 0.6;
}

@keyframes vipParticles {
    0% { background-position: 0 0, 0 0, 0 0, 0 0; }
    100% { background-position: 200px -300px, -250px 200px, 300px -250px, -180px 300px; }
}

/* Buttons */
body.is-vip .btn-confirm,
body.is-vip .btn-buy,
body.is-vip .btn-magic-submit {
    background: linear-gradient(135deg, var(--accent-gold-bright) 0%, var(--accent-gold) 50%, #8a6f1a 100%);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.45);
}

/* Modal — premium glow */
body.is-vip .modal-content {
    background: linear-gradient(135deg,
        rgba(28, 18, 24, 0.96) 0%,
        rgba(24, 24, 31, 0.96) 100%);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow:
        0 10px 60px rgba(212, 175, 55, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* === leaderboard.css === */
/* ============================================
   LEADERBOARD VIEW — full screen, mafia noir
   ============================================ */

.leaderboard-app {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at top, rgba(216, 48, 48, 0.08) 0%, transparent 50%),
        var(--bg-primary);
    padding-bottom: 100px;
}

/* === Header === */
.lb-header {
    position: relative;
    padding: 32px 20px 24px;
    overflow: hidden;
}

.lb-header-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(212, 175, 55, 0.18) 0%, transparent 60%),
        linear-gradient(180deg,
            rgba(40, 14, 14, 0.4) 0%,
            transparent 100%);
    pointer-events: none;
}

.lb-header-content {
    position: relative;
    text-align: center;
    z-index: 1;
}

.lb-trophy {
    font-size: 56px;
    line-height: 1;
    filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.7));
    animation: trophyShine 3s ease-in-out infinite;
    margin-bottom: 12px;
}

@keyframes trophyShine {
    0%, 100% { transform: scale(1) rotate(-3deg); }
    50%      { transform: scale(1.08) rotate(3deg); }
}

.lb-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, #fff 0%, var(--accent-gold-bright) 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-shadow: 0 0 24px rgba(212, 175, 55, 0.3);
}

.lb-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* === Player list === */
.lb-list {
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === Card (default) === */
.lb-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    background: linear-gradient(135deg,
        rgba(28, 28, 40, 0.88) 0%,
        rgba(24, 24, 31, 0.92) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lb-card:active {
    transform: scale(0.98);
}

.lb-card-rank {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-secondary);
}

/* Rank 1-3 medals — slightly bigger emoji */
.lb-card--rank-1 .lb-card-rank,
.lb-card--rank-2 .lb-card-rank,
.lb-card--rank-3 .lb-card-rank {
    font-size: 26px;
    background: transparent;
    border: none;
}

.lb-card--rank-1 {
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.15) 0%,
        rgba(28, 28, 40, 0.92) 100%);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.15);
}

.lb-card--rank-2 {
    background: linear-gradient(135deg,
        rgba(192, 192, 208, 0.1) 0%,
        rgba(28, 28, 40, 0.92) 100%);
    border-color: rgba(192, 192, 208, 0.3);
}

.lb-card--rank-3 {
    background: linear-gradient(135deg,
        rgba(205, 127, 50, 0.1) 0%,
        rgba(28, 28, 40, 0.92) 100%);
    border-color: rgba(205, 127, 50, 0.3);
}

.lb-card-body {
    flex: 1;
    min-width: 0;
}

.lb-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.lb-card-name-text {
    color: var(--text-primary);
}

.lb-card-title {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-style: italic;
    color: var(--accent-gold);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
}

.lb-card-stats {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.3px;
}

.lb-card-mmr {
    flex-shrink: 0;
    text-align: right;
}

.lb-card-mmr-value {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

.lb-card-mmr-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-tertiary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* "You" marker */
.lb-card--me {
    box-shadow: 0 0 0 1.5px var(--accent-emerald) inset, 0 0 16px rgba(45, 212, 191, 0.2);
}

.lb-me-marker {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 9px;
    font-weight: 700;
    background: var(--accent-emerald);
    color: var(--bg-primary);
    border-radius: var(--radius-full);
    letter-spacing: 1px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ============================================
   VIP cards — premium aura
   ============================================ */
.lb-card--vip {
    /* Reserve space for VIP elements */
    padding-right: 56px;  /* ribbon joyini ta'minlash */
}

.lb-card--vip .lb-card-name-text {
    background: linear-gradient(90deg, var(--accent-gold-bright), #fff, var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: vipNameShimmer 4s ease-in-out infinite;
}

@keyframes vipNameShimmer {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 100% center; }
}

.lb-vip-aura {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: var(--radius-lg);
    z-index: 0;
}

.lb-vip-ribbon {
    position: absolute;
    top: 50%;
    right: -2px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold));
    color: var(--bg-primary);
    font-family: 'Cinzel', serif;
    font-size: 9px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    letter-spacing: 1.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* VIP aura color variants */
.lb-card--vip-gold {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.4),
        0 0 20px rgba(212, 175, 55, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg,
        rgba(50, 28, 12, 0.85) 0%,
        rgba(28, 18, 24, 0.92) 100%);
}

.lb-card--vip-red {
    border-color: rgba(216, 48, 48, 0.6);
    box-shadow:
        0 0 0 1px rgba(216, 48, 48, 0.4),
        0 0 20px rgba(216, 48, 48, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg,
        rgba(60, 14, 14, 0.85) 0%,
        rgba(28, 18, 24, 0.92) 100%);
}

.lb-card--vip-red .lb-vip-ribbon {
    background: linear-gradient(135deg, #ff6060, var(--accent-blood));
    color: white;
}

.lb-card--vip-purple {
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.4),
        0 0 20px rgba(168, 85, 247, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg,
        rgba(40, 14, 60, 0.85) 0%,
        rgba(28, 18, 24, 0.92) 100%);
}

.lb-card--vip-purple .lb-vip-ribbon {
    background: linear-gradient(135deg, #c084fc, var(--accent-purple));
    color: white;
}

.lb-card--vip-emerald {
    border-color: rgba(45, 212, 191, 0.6);
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, 0.4),
        0 0 20px rgba(45, 212, 191, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg,
        rgba(12, 50, 44, 0.85) 0%,
        rgba(28, 18, 24, 0.92) 100%);
}

.lb-card--vip-emerald .lb-vip-ribbon {
    background: linear-gradient(135deg, #5eead4, var(--accent-emerald));
    color: var(--bg-primary);
}

/* ============================================
   Footer
   ============================================ */
.lb-footer {
    padding: 24px 20px;
    text-align: center;
}

.lb-close-btn {
    padding: 12px 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    font-family: inherit;
}

.lb-close-btn:active {
    transform: scale(0.96);
}

/* ============================================
   Error state
   ============================================ */
.leaderboard-error {
    text-align: center;
    padding: 48px 24px;
}

.leaderboard-error-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: grayscale(0.3);
}

.leaderboard-error-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-blood);
    margin-bottom: 8px;
}

.leaderboard-error-msg {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.leaderboard-error-btn {
    padding: 12px 24px;
    background: var(--accent-gold);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* ============================================
   Detail bottom-sheet modal
   ============================================ */
.modal--bottom-sheet .modal-content--sheet {
    max-width: 480px;
    width: 100%;
    margin: auto auto 0 auto;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px 20px 32px;
    animation: sheetSlideUp 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sheetSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.modal--bottom-sheet .modal-content--sheet::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
}

/* Detail content */
.detail-header {
    text-align: center;
    padding: 16px 0 20px;
    position: relative;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 16px;
}

.detail-name {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.detail-title {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-style: italic;
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.detail-header.detail--vip .detail-name {
    background: linear-gradient(90deg, var(--accent-gold-bright), #fff, var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-vip-ribbon {
    position: absolute;
    top: 4px;
    right: 0;
    background: linear-gradient(135deg, var(--accent-gold-bright), var(--accent-gold));
    color: var(--bg-primary);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    letter-spacing: 1.5px;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.detail-magic-word {
    padding: 14px 16px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.08) 0%,
        rgba(168, 85, 247, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.55;
    font-style: italic;
    text-align: center;
}

.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.detail-stat {
    text-align: center;
    padding: 10px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.detail-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
}

.detail-stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.detail-ach-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-ach {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.06) 0%,
        rgba(24, 24, 31, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
}

.detail-ach-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

.detail-ach-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.lb-detail-loading,
.lb-detail-error {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-tertiary);
}

/* === animations.css === */
/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Card deal from top center to fanned position */
@keyframes cardDeal {
    0% {
        transform: translateX(-50%) translateY(-200px) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(-50% + var(--final-x))) translateY(20px) rotate(var(--final-rotate)) scale(1);
        opacity: 1;
    }
}

/* Cigar burning — deprecated in v4.3 (pulse-dot animation o'rniga ishlatiladi) */

/* Smoke rising */
@keyframes smokeRise {
    0% {
        bottom: -100px;
        opacity: 0;
        transform: scale(0.5) translateX(0);
    }
    20% {
        opacity: 0.4;
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: scale(1.5) translateX(20px);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes vipPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
    }
    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.9));
    }
}

@keyframes progressGlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(calc(100vw + 100%)); }
}

@keyframes modalFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes modalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes statCountUp {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */

.fade-in {
    animation: fadeIn 400ms ease-out;
}

.fade-in-up {
    animation: fadeInUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }
.stagger-6 { animation-delay: 300ms; }

.float {
    animation: float 3s ease-in-out infinite;
}

/* Skeleton loading shimmer */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 1.5s infinite linear;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
