/* ============================================================
   KELIME FETHI v2.0 — Premium Dark Theme UI
   Color Psychology: Green=Correct, Yellow=Close, Gray=Absent
   Gold=Daily/Streak, Blue=Available, Dark=Premium Theme
   Glass morphism + Gradients + Micro-animations
   ============================================================ */

/* === CSS Variables === */
:root {
    --bg: #0a0e1a;
    --bg2: #111827;
    --bg3: #1a2236;
    --card: #1e293b;
    --green: #16a34a;
    --green-dark: #15803d;
    --green-light: #22c55e;
    --yellow: #ca8a04;
    --yellow-dark: #a16207;
    --yellow-light: #eab308;
    --gray: #374151;
    --gray-dark: #1f2937;
    --gold: #f59e0b;
    --blue: #2563eb;
    --blue-light: #3b82f6;
    --red: #ef4444;
    --text: #f1f5f9;
    --text2: #94a3b8;
    --text3: #64748b;
    --border: rgba(255,255,255,0.08);
    --border2: rgba(255,255,255,0.15);

    /* Sizing */
    --tile-size: 64px;
    --gap: 6px;
    --key-h: 54px;
    --radius: 12px;
    --nav-h: 60px;
    --top-h: 50px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Glass Effects */
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-green: linear-gradient(135deg, #16a34a, #22c55e);
    --gradient-gold: linear-gradient(135deg, #f59e0b, #fbbf24);
    --gradient-blue: linear-gradient(135deg, #2563eb, #3b82f6);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-green: 0 0 20px rgba(22, 163, 74, 0.3);
    --shadow-glow-gold: 0 0 20px rgba(245, 158, 11, 0.3);

    /* Region Colors */
    --region-marmara: #6366f1;
    --region-ege: #8b5cf6;
    --region-akdeniz: #ec4899;
    --region-ic-anadolu: #f97316;
    --region-karadeniz: #14b8a6;
    --region-dogu: #0ea5e9;
    --region-guneydogu: #eab308;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Subtle ambient glow behind content */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(22, 163, 74, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* === Top Bar === */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--top-h) + var(--safe-top));
    padding-top: var(--safe-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 12px;
    padding-right: 12px;
    background: linear-gradient(180deg, var(--bg2), rgba(17, 24, 39, 0.95));
    border-bottom: 1px solid rgba(22, 163, 74, 0.12);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.top-left, .top-right { display: flex; align-items: center; gap: 10px; }

#streak-indicator {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(245, 158, 11, 0.12);
    padding: 3px 10px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

#score-display {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text2);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 10px;
    border-radius: 14px;
}

#game-title {
    font-size: 1.15rem;
    font-weight: 800;
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.15s;
    border-radius: 8px;
}
.icon-btn:hover { opacity: 1; }
.icon-btn:active { opacity: 0.5; transform: scale(0.9); }

/* === Game Area === */
#game-area {
    position: fixed;
    top: calc(var(--top-h) + var(--safe-top));
    bottom: calc(var(--nav-h) + var(--safe-bottom));
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.view {
    display: none;
    min-height: 100%;
    opacity: 0;
}
.view.active {
    display: flex;
    flex-direction: column;
    animation: viewFadeIn 0.3s ease forwards;
}

@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === MAP VIEW === */
#map-view { padding: 12px; gap: 12px; }

.map-header { text-align: center; }

.progress-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

#city-count {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--green);
}

.progress-label {
    font-size: 0.85rem;
    color: var(--text2);
}

.progress-bar-wrap {
    height: 8px;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light), #4ade80);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.4);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
    animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Daily Banner */
.daily-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.04));
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.06);
    animation: dailyGlow 3s ease-in-out infinite alternate;
}

@keyframes dailyGlow {
    from { box-shadow: 0 0 8px rgba(245,158,11,0.08); }
    to { box-shadow: 0 0 20px rgba(245,158,11,0.2); }
}

.daily-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.daily-icon { font-size: 1.5rem; }

.daily-left strong {
    display: block;
    font-size: 0.9rem;
    color: var(--gold);
}

.daily-timer {
    font-size: 0.75rem;
    color: var(--text3);
    font-variant-numeric: tabular-nums;
}

.daily-btn {
    background: var(--gradient-gold);
    color: #000;
    border: none;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}
.daily-btn:hover { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35); transform: translateY(-1px); }
.daily-btn:active { transform: scale(0.95) translateY(0); }

/* Map Container */
#map-container {
    flex: 1;
    min-height: 200px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(22, 163, 74, 0.08);
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3), var(--shadow-sm);
    padding: 8px;
    touch-action: pan-x pan-y;
}

#turkey-map {
    width: 100%;
    height: auto;
    max-height: 100%;
}

/* City path styles — game.js uses these class names */
#turkey-map path {
    fill: #94a3b8;
    stroke: rgba(0, 0, 0, 0.4);
    stroke-width: 0.8;
    cursor: pointer;
    transition: fill 0.4s ease, opacity 0.4s ease, filter 0.4s ease, transform 0.2s ease;
    transform-origin: center;
}
#turkey-map path.city-locked {
    fill: #475569;
    opacity: 0.22;
    cursor: not-allowed;
    filter: saturate(0.3);
}
#turkey-map path.city-available {
    opacity: 0.75;
    animation: cityPulse 2.5s ease-in-out infinite;
}
#turkey-map path.city-conquered {
    opacity: 0.92;
    filter: drop-shadow(0 0 2px currentColor);
}
#turkey-map path.city-daily {
    fill: var(--gold) !important;
    animation: cityPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
}
#turkey-map path:hover:not(.city-locked) {
    filter: brightness(1.4) drop-shadow(0 0 5px currentColor);
    transform: scale(1.03);
}
#turkey-map path:active:not(.city-locked) {
    filter: brightness(0.9);
    transform: scale(0.98);
}

@keyframes cityPulse {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

@keyframes cityConquered {
    0% { transform: scale(1); filter: brightness(1); }
    25% { transform: scale(1.12); filter: brightness(1.8); }
    50% { transform: scale(1.05); filter: brightness(1.4) drop-shadow(0 0 8px currentColor); }
    100% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 2px currentColor); }
}

.city-just-conquered {
    animation: cityConquered 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* City labels on map */
.city-label {
    font-size: 6.5px;
    font-family: 'Segoe UI', 'Arial Black', 'Helvetica Neue', sans-serif;
    fill: #ffffff;
    text-anchor: middle;
    pointer-events: auto;
    font-weight: 800;
    letter-spacing: 0.15px;
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.85);
    stroke-width: 1.2px;
    stroke-linejoin: round;
    filter: drop-shadow(0 0.5px 1px rgba(0,0,0,0.4));
    cursor: pointer;
    transition: font-size 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                fill 0.2s ease,
                filter 0.2s ease,
                stroke-width 0.2s ease;
}

/* Label hover — grow */
.city-label:hover {
    font-size: 9px;
    fill: #fbbf24;
    stroke-width: 1.8px;
    filter: drop-shadow(0 1px 3px rgba(251, 191, 36, 0.5));
}

/* Label active/focused — biggest, green glow */
.city-label.label-active {
    font-size: 11px;
    fill: #22c55e;
    stroke-width: 2px;
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6))
           drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    /* Bring to front via z-order trick */
}

/* Conquered city label — gold tint */
.city-label.label-conquered {
    fill: #fbbf24;
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.4));
}

/* Locked city label — dim */
.city-label.label-locked {
    fill: rgba(255, 255, 255, 0.3);
    stroke: rgba(0, 0, 0, 0.4);
    stroke-width: 0.8px;
    filter: none;
}

/* Label pop-in animation */
@keyframes labelPopIn {
    0% { font-size: 6.5px; }
    50% { font-size: 14px; }
    100% { font-size: 11px; }
}

.city-label.label-pop {
    animation: labelPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Region Selector */
.region-selector {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.region-selector::-webkit-scrollbar { display: none; }

.region-btn {
    background: rgba(30, 41, 59, 0.6);
    color: var(--text2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}
.region-btn.active {
    background: var(--gradient-green);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(22, 163, 74, 0.3);
}
.region-btn:not(.active):hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.12);
}
.region-btn:active { transform: scale(0.95); }

/* === PUZZLE VIEW === */
#puzzle-view {
    padding: 4px 12px 6px;
    gap: 2px;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.puzzle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    flex-shrink: 0;
}

.puzzle-header-left,
.puzzle-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 3px 6px;
    transition: color 0.2s;
}
.back-btn:hover { color: var(--text); }
.back-btn:active { opacity: 0.5; }

.skip-puzzle-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--red);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.skip-puzzle-btn:active { transform: scale(0.95); opacity: 0.7; }

.puzzle-city-info { text-align: center; }

#puzzle-city-name {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.region-tag {
    font-size: 0.7rem;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.word-length-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--blue-light);
    background: rgba(37,99,235,0.15);
    border: 1px solid rgba(37,99,235,0.3);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 2px;
    letter-spacing: 0.03em;
}

.hint-btn {
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.25);
    color: var(--gold);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.hint-btn:active { transform: scale(0.95); }
.hint-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Puzzle Stopwatch Timer */
.puzzle-timer-display {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text2, rgba(255,255,255,0.6));
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 6px;
    min-width: 36px;
    text-align: center;
    letter-spacing: 0.05em;
    margin-left: 4px;
}

/* Guess Grid */
.guess-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin: 0;
    flex-shrink: 1;
    overflow: hidden;
}

.grid-row {
    display: flex;
    gap: var(--gap);
    justify-content: center;
    position: relative;
}

/* Row ready indicator — green progress bar under row during auto-submit countdown */
.grid-row.row-ready::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(22, 163, 74, 0.6), transparent);
    border-radius: 2px;
    animation: row-ready-progress 0.8s linear forwards;
}
@keyframes row-ready-progress {
    from { transform: scaleX(0); transform-origin: left; }
    to { transform: scaleX(1); transform-origin: left; }
}

.tile {
    width: var(--tile-size);
    height: var(--tile-size);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.1rem, calc(var(--tile-size) * 0.45), 1.85rem);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text);
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    transition: border-color 0.15s, transform 0.1s, box-shadow 0.3s, background 0.3s;
    position: relative;
}

.tile.filled {
    border-color: rgba(148, 163, 184, 0.35);
    animation: tilePop 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tile.correct {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 14px rgba(22, 163, 74, 0.35);
}

.tile.present {
    background: linear-gradient(135deg, #ca8a04, #eab308);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 14px rgba(202, 138, 4, 0.3);
}

.tile.absent {
    background: rgba(55, 65, 81, 0.75);
    border-color: transparent;
    color: rgba(148, 163, 184, 0.6);
}

@keyframes tilePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@keyframes tileReveal {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0deg); }
}

@keyframes tileShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes tileBounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-22px) rotate(-2deg); }
    50% { transform: translateY(-18px); }
    70% { transform: translateY(-14px) rotate(2deg); }
}

.tile.revealing {
    animation: tileReveal 0.5s ease;
    transform-style: preserve-3d;
}
.tile.revealed {
    border-color: transparent;
}
.tile.pop {
    animation: tilePop 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tile.bounce {
    animation: tileBounce 0.5s ease;
}
.grid-row.shake { animation: tileShake 0.4s ease; }

/* Message Area */
.message-area {
    min-height: 16px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text2);
    flex-shrink: 1;
    line-height: 1.2;
}

/* Virtual Keyboard */
.keyboard {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    max-width: 540px;
    padding: 2px 2px 4px;
    margin-top: auto;
    flex-shrink: 0;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0 2px;
}

.key {
    min-width: 30px;
    height: var(--key-h);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.7));
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 48px;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s, flex 0.3s, opacity 0.3s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.key:active {
    transform: scale(0.92);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.key.wide {
    min-width: 56px;
    max-width: 72px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

/* ENTER key highlight */
.key.wide[data-key="ENTER"] {
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.3), rgba(22, 163, 74, 0.15));
    border-color: rgba(22, 163, 74, 0.3);
    color: var(--green-light);
}

/* GİR button glow when word is complete (auto-submit countdown) */
.key.wide[data-key="ENTER"].gir-glow {
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.6), rgba(22, 163, 74, 0.35)) !important;
    border-color: rgba(22, 163, 74, 0.6) !important;
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.4), 0 0 24px rgba(22, 163, 74, 0.15);
    animation: gir-pulse 0.6s ease-in-out infinite;
}
@keyframes gir-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(22, 163, 74, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 20px rgba(22, 163, 74, 0.6), 0 0 32px rgba(22, 163, 74, 0.2); transform: scale(1.05); }
}

/* key.correct, key.present, key.absent — see ENHANCED KEYBOARD KEYS section below */

/* === STATS VIEW === */
#stats-view { padding: 20px 16px; gap: 20px; }

.stats-container { max-width: 400px; margin: 0 auto; width: 100%; }
.stats-container h2 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stats-container h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.stat-box {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 8px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text3);
    text-transform: uppercase;
}

/* Guess Distribution */
.guess-dist { margin-bottom: 24px; }

.dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.dist-label {
    font-size: 0.85rem;
    font-weight: 700;
    width: 14px;
    text-align: right;
    color: var(--text2);
}

.dist-bar-wrap {
    flex: 1;
}

.dist-bar {
    height: 24px;
    min-width: 24px;
    background: var(--gray);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dist-bar.has-value {
    background: linear-gradient(90deg, #16a34a, #22c55e);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
}

/* Region Progress */
.region-progress-list { display: flex; flex-direction: column; gap: 8px; }

.region-progress-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.region-progress-row.locked { opacity: 0.5; }

.region-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.region-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text2);
}

.region-count {
    font-size: 0.75rem;
    color: var(--text3);
}

.region-bar-wrap {
    height: 8px;
    background: rgba(31, 41, 55, 0.6);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.region-bar {
    height: 100%;
    background: var(--green);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === SETTINGS VIEW === */
#settings-view { padding: 20px 16px; }

.settings-container { max-width: 400px; margin: 0 auto; width: 100%; }
.settings-container h2 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.setting-row.danger { border-color: rgba(239,68,68,0.2); }
.setting-row.danger span { color: var(--red); }

.toggle { position: relative; width: 48px; height: 26px; }
.toggle input { display: none; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray);
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.toggle input:checked + .toggle-slider {
    background: var(--green);
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.3);
}
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

.reset-btn {
    background: rgba(239,68,68,0.12);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.25);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.reset-btn:hover { background: rgba(239,68,68,0.2); }

.about-section {
    margin-top: 30px;
    text-align: center;
    color: var(--text3);
    font-size: 0.8rem;
}
.about-section p { margin-bottom: 4px; }
.back-to-site {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
    transition: color 0.2s;
}
.back-to-site:hover { color: var(--green-light); }

/* === BOTTOM NAV === */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.95), var(--bg2));
    border-top: 1px solid rgba(22, 163, 74, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    cursor: pointer;
    transition: color 0.2s, transform 0.15s;
    position: relative;
}
.nav-btn.active { color: var(--green); }
.nav-btn:active { transform: scale(0.93); }

/* Active tab indicator */
.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--green);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
}

.nav-icon { font-size: 1.3rem; line-height: 1; }
.nav-label { font-size: 0.65rem; font-weight: 600; }

.notif-dot {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    display: none;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}
.notif-dot.show { display: block; }

/* === OVERLAYS === */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px) saturate(0.8);
    display: flex;
    align-items: safe center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: overlayFadeIn 0.3s ease;
}
.overlay.hidden { display: none; }

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.overlay-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(17, 24, 39, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    flex-shrink: 0;
    margin: auto 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    animation: overlaySlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes overlaySlideIn {
    from { transform: scale(0.92) translateY(16px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Result Overlay */
.result-icon {
    font-size: 2.5rem;
    margin-bottom: 6px;
    animation: resultIconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes resultIconBounce {
    from { transform: scale(0) rotate(-10deg); }
    to { transform: scale(1) rotate(0deg); }
}

.result-content h2 { font-size: 1.1rem; margin-bottom: 4px; }

.result-word {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 4px 0;
    padding: 6px 14px;
    border-radius: 10px;
    animation: wordReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}
.result-word-won {
    color: var(--green-light, #4ade80);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}
.result-word-lost {
    color: var(--red, #ef4444);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}
@keyframes wordReveal {
    0% { transform: scale(0.5); opacity: 0; letter-spacing: 20px; }
    100% { transform: scale(1); opacity: 1; letter-spacing: 6px; }
}

.result-content p { color: var(--text2); font-size: 0.8rem; margin-bottom: 8px; }

.result-score {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 10px;
    animation: scorePopIn 0.5s ease;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    padding: 4px 14px;
    display: inline-block;
}

@keyframes scorePopIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.share-grid {
    margin-bottom: 10px;
    text-align: center;
}

/* ===== Share Card (Visual) ===== */
.share-card {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px 20px;
    display: inline-block;
    min-width: 220px;
    max-width: 300px;
    text-align: center;
}

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

.sc-logo {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
}

.sc-day {
    font-size: 0.7rem;
    color: #fbbf24;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
}

.sc-result {
    font-size: 2rem;
    font-weight: 800;
    color: #22c55e;
    margin: 4px 0 12px;
    letter-spacing: 2px;
}

.sc-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.sc-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.sc-cell {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: inline-block;
}

.sc-correct { background: #22c55e; }
.sc-present { background: #eab308; }
.sc-absent { background: #374151; }

.sc-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.sc-stat-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
}

.sc-stat-lbl {
    font-size: 0.55rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

.sc-footer {
    font-size: 0.6rem;
    color: #6b7280;
    letter-spacing: 0.3px;
}

.word-meaning-link {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.word-meaning-link:hover { background: rgba(99, 102, 241, 0.25); }

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.share-btn, .next-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.share-btn {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border2);
}
.next-btn {
    background: var(--gradient-green);
    color: white;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}
.next-btn:hover { box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4); transform: translateY(-1px); }
.retry-btn {
    padding: 10px 18px;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.retry-btn:hover { background: rgba(245, 158, 11, 0.2); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); transform: translateY(-1px); }
.share-btn:active, .next-btn:active, .retry-btn:active { transform: scale(0.95); }

/* Cloud Save Overlay */
.cloud-content h2 { margin-bottom: 16px; }
.cloud-status { margin-bottom: 12px; color: var(--text2); font-size: 0.85rem; }
.cloud-id { margin-bottom: 12px; font-size: 0.8rem; color: var(--text3); }
.cloud-id code { color: var(--green); font-weight: 600; }
.cloud-pin { margin-bottom: 16px; }
.cloud-pin label { display: block; margin-bottom: 6px; font-size: 0.85rem; color: var(--text2); }
.cloud-pin input {
    width: 120px;
    padding: 10px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 8px;
    background: var(--bg);
    border: 2px solid var(--border2);
    border-radius: 10px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cloud-pin input:focus {
    border-color: var(--green);
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.2);
}

.cloud-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.cloud-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cloud-action-btn.save { background: var(--gradient-green); color: white; }
.cloud-action-btn.load { background: var(--gradient-blue); color: white; }
.cloud-action-btn:active { transform: scale(0.95); }
.cloud-msg { font-size: 0.8rem; color: var(--text2); min-height: 20px; margin-bottom: 12px; }
.close-btn {
    background: var(--card);
    color: var(--text2);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.close-btn:hover { border-color: var(--border2); }

/* Tutorial */
.tutorial-content { padding: 30px 24px; }
.tutorial-step { min-height: 200px; }
.tutorial-step h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.tutorial-step p { color: var(--text2); font-size: 0.9rem; line-height: 1.6; margin-bottom: 12px; }
.tutorial-example {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 16px 0;
}
.tutorial-tile {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
}
.tutorial-actions { margin-top: 16px; }
.tutorial-btn {
    background: var(--gradient-green);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.tutorial-btn:hover { box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4); }
.tutorial-btn:active { transform: scale(0.95); }
.tutorial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}
.tut-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray);
    transition: background 0.2s, transform 0.2s;
}
.tut-dot.active {
    background: var(--green);
    transform: scale(1.2);
}

.tutorial-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* Toast Messages */
.toast-container {
    position: fixed;
    top: calc(var(--top-h) + var(--safe-top) + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(241, 245, 249, 0.95);
    color: var(--bg);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: auto;
    transition: opacity 0.3s, transform 0.3s;
    white-space: pre-line;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Float text */
#float-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 150;
}

.float-text {
    position: absolute;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--gold);
    animation: floatUp 1.5s ease forwards;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-80px) scale(0.8); }
}

/* Particle Canvas */
#particle-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 160;
}

/* === RESPONSIVE === */
/* === MOBILE RESULT OVERLAY FIX === */
@media (max-height: 700px) {
    .overlay { padding: 6px; }
    .overlay-content { padding: 14px; border-radius: 16px; }
    .result-icon { font-size: 2rem; margin-bottom: 3px; }
    .result-content h2 { font-size: 1rem; margin-bottom: 2px; }
    .result-word { font-size: 1.3rem; letter-spacing: 3px; margin: 3px 0; padding: 4px 10px; }
    .result-content p { font-size: 0.75rem; margin-bottom: 4px; }
    .result-score { font-size: 1rem; padding: 3px 10px; margin-bottom: 6px; }
    .share-grid { margin-bottom: 6px; }
    .share-card { padding: 8px 10px; }
    .sc-cell { width: 20px; height: 20px; }
    .sc-result { font-size: 1.3rem; margin: 2px 0 6px; }
    .share-btn, .next-btn { padding: 8px 14px; font-size: 0.75rem; }
    .result-actions { gap: 5px; margin-top: 6px; }
    .result-actions-secondary { gap: 5px; margin-top: 4px; }
    .challenge-btn { padding: 6px 10px; font-size: 0.75rem; }
    .retry-btn { padding: 6px 10px; font-size: 0.75rem; }
    .report-word-btn { margin-top: 3px; font-size: 0.7rem; padding: 4px 8px; }
    .word-meaning-link { margin-bottom: 4px; padding: 3px 8px; font-size: 0.7rem; }
}

@media (max-height: 550px) {
    .overlay { padding: 4px; }
    .overlay-content { padding: 10px; border-radius: 12px; }
    .result-icon { font-size: 1.5rem; margin-bottom: 2px; }
    .result-content h2 { font-size: 0.9rem; margin-bottom: 1px; }
    .result-word { font-size: 1.1rem; letter-spacing: 2px; padding: 3px 8px; margin: 2px 0; }
    .result-content p { font-size: 0.7rem; margin-bottom: 3px; }
    .result-score { font-size: 0.9rem; padding: 2px 8px; margin-bottom: 4px; }
    .sc-cell { width: 16px; height: 16px; }
    .sc-grid { gap: 2px; margin-bottom: 4px; }
    .sc-row { gap: 2px; }
    .share-btn, .next-btn { padding: 6px 10px; font-size: 0.7rem; border-radius: 8px; }
    .challenge-btn { padding: 5px 8px; font-size: 0.7rem; }
    .share-card { padding: 6px 8px; }
}

@media (max-width: 380px) {
    :root {
        --tile-size: 56px;
        --key-h: 50px;
    }
    .key { font-size: 0.95rem; }
    .key.wide { font-size: 0.72rem; min-width: 48px; }
}

@media (max-width: 340px) {
    :root {
        --tile-size: 50px;
        --key-h: 46px;
    }
    .key { font-size: 0.85rem; }
    .result-word { font-size: 1.3rem; letter-spacing: 2px; }
}

@media (min-width: 768px) {
    :root {
        --tile-size: 68px;
        --key-h: 60px;
    }
    .key { font-size: 1.15rem; max-width: 54px; }
    .key.wide { min-width: 64px; max-width: 80px; }
    #map-container { max-width: 800px; }
}

@media (min-width: 1200px) {
    #map-container { max-width: 900px; }
}

/* ============================================================
   IDLE KINGDOM STYLE ENHANCEMENTS v1.0
   Premium animations, effects, and visual upgrades
   ============================================================ */

/* === SPLASH / LOADING SCREEN === */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0a0e1a 0%, #111827 50%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transition: opacity 0.6s ease, visibility 0.6s;
}
#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #16a34a, #22c55e, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: splashPulse 1.5s ease-in-out infinite alternate;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(22, 163, 74, 0.3));
}

.splash-subtitle {
    font-size: 1rem;
    color: var(--text3);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.splash-loader {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 16px;
}

.splash-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #16a34a, #22c55e, #4ade80);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.5);
}

@keyframes splashPulse {
    from { transform: scale(1); filter: drop-shadow(0 0 20px rgba(22, 163, 74, 0.3)); }
    to { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(22, 163, 74, 0.5)); }
}

.splash-map-icon {
    font-size: 4rem;
    animation: splashFloat 2s ease-in-out infinite;
    margin-bottom: -8px;
}

@keyframes splashFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* === ANIMATED STREAK FIRE === */
.streak-fire {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.streak-fire .fire-icon {
    position: relative;
    display: inline-block;
    animation: fireFlicker 0.5s ease-in-out infinite alternate;
}

@keyframes fireFlicker {
    0% { transform: scale(1) rotate(-2deg); filter: brightness(1); }
    100% { transform: scale(1.15) rotate(2deg); filter: brightness(1.3); }
}

.streak-fire.streak-hot .fire-icon {
    animation: fireHot 0.3s ease-in-out infinite alternate;
}

@keyframes fireHot {
    0% { transform: scale(1) rotate(-5deg); filter: brightness(1) hue-rotate(0deg); }
    100% { transform: scale(1.25) rotate(5deg); filter: brightness(1.5) hue-rotate(10deg); }
}

/* Streak counter glow based on streak count */
#streak-indicator.streak-3 {
    background: rgba(245, 158, 11, 0.2);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}
#streak-indicator.streak-7 {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.15));
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
    animation: streakGlow 1.5s ease-in-out infinite alternate;
}
#streak-indicator.streak-14 {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(168, 85, 247, 0.2));
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    animation: streakGlow 1s ease-in-out infinite alternate;
}
#streak-indicator.streak-30 {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(239, 68, 68, 0.25), rgba(168, 85, 247, 0.2));
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.3);
    animation: streakGlow 0.7s ease-in-out infinite alternate;
}

@keyframes streakGlow {
    from { box-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }
    to { box-shadow: 0 0 24px rgba(245, 158, 11, 0.5); }
}

/* === CITY CONQUERED FLAG ANIMATION === */
.city-flag {
    position: absolute;
    pointer-events: none;
    animation: flagPlant 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    font-size: 12px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    z-index: 10;
}

@keyframes flagPlant {
    0% { transform: scale(0) translateY(10px); opacity: 0; }
    60% { transform: scale(1.3) translateY(-5px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Conquered city star overlay */
.city-star {
    animation: starTwinkle 2s ease-in-out infinite;
    font-size: 8px;
    position: absolute;
    pointer-events: none;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.6; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* === ENHANCED RESULT OVERLAY === */
.result-content {
    position: relative;
    /* NOTE: overflow must NOT be hidden/clip here — it's the same element as
       .overlay-content which needs overflow-y: auto for scroll on mobile */
}

.result-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: conic-gradient(from 0deg, transparent, rgba(22, 163, 74, 0.05), transparent, rgba(245, 158, 11, 0.05), transparent);
    animation: resultSpin 8s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* Ensure result-content children are above the ::before pseudo-element */
.result-content > * {
    position: relative;
    z-index: 1;
}

@keyframes resultSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result-icon {
    font-size: 2.5rem;
    animation: resultBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

@keyframes resultBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    80% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.result-score {
    font-size: 1.3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: scorePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
    position: relative;
    z-index: 1;
}

@keyframes scorePopIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* === REGION UNLOCK ANIMATION === */
.region-unlock-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 500;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(17, 24, 39, 0.98));
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 24px;
    padding: 32px 48px;
    text-align: center;
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.2);
    animation: regionUnlock 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes regionUnlock {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); }
    60% { transform: translate(-50%, -50%) scale(1.1) rotate(2deg); }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.region-unlock-banner .unlock-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
    animation: unlockSpin 0.8s ease 0.3s both;
}

@keyframes unlockSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.region-unlock-banner h2 {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.region-unlock-banner p {
    color: var(--text2);
    font-size: 0.9rem;
}

/* Region Complete Celebration Banner */
.region-complete-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 500;
    background: linear-gradient(135deg, rgba(22, 78, 36, 0.98), rgba(17, 24, 39, 0.98));
    border: 2px solid rgba(34, 197, 94, 0.5);
    border-radius: 24px;
    padding: 32px 48px;
    text-align: center;
    box-shadow: 0 0 80px rgba(34, 197, 94, 0.3);
    animation: regionUnlock 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.region-complete-banner .region-trophy {
    font-size: 4rem;
    display: block;
    margin-bottom: 8px;
    animation: unlockSpin 0.8s ease 0.3s both;
}
.region-complete-banner h2 {
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #4ade80, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}
.region-complete-banner p {
    color: var(--text2);
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.region-complete-banner .region-stars {
    font-size: 1.5rem;
    letter-spacing: 4px;
    animation: starsAppear 0.5s ease 0.8s both;
}
@keyframes starsAppear {
    0% { opacity: 0; transform: scale(0.5); }
    50% { transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* === ENHANCED DAILY BANNER === */
.daily-banner {
    position: relative;
    overflow: hidden;
}

.daily-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.08), transparent);
    animation: dailySweep 4s ease-in-out infinite;
}

@keyframes dailySweep {
    0% { left: -60%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* === SCORE COMBO COUNTER === */
.combo-counter {
    position: fixed;
    top: 80px;
    right: 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    text-align: center;
    z-index: 200;
    animation: comboAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(8px);
}

.combo-counter .combo-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
}

.combo-counter .combo-label {
    font-size: 0.65rem;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes comboAppear {
    0% { transform: scale(0) translateX(20px); opacity: 0; }
    100% { transform: scale(1) translateX(0); opacity: 1; }
}

/* === ENHANCED MAP — 3D-ish depth effect === */
#map-container {
    position: relative;
}

#map-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    box-shadow: inset 0 -40px 40px -20px rgba(0, 0, 0, 0.3),
                inset 0 40px 40px -20px rgba(255, 255, 255, 0.02);
}

/* === BADGE/MEDAL SYSTEM === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    animation: badgeShine 3s ease-in-out infinite;
}

.badge.badge-silver {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0.05));
    border-color: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.badge.badge-gold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 179, 8, 0.1));
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.badge.badge-diamond {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(59, 130, 246, 0.1));
    border-color: rgba(168, 85, 247, 0.3);
    color: #a855f7;
}

@keyframes badgeShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* === ENHANCED KEYBOARD KEYS === */
.key.correct {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.7)) !important;
    color: #4ade80 !important;
    border: 2px solid #22c55e !important;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
    animation: keyReveal 0.3s ease;
}

.key.present {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.7)) !important;
    color: #fbbf24 !important;
    border: 2px solid #eab308 !important;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.25);
    animation: keyReveal 0.3s ease;
}

.key.absent {
    background: rgba(55, 65, 81, 0.35) !important;
    color: rgba(148, 163, 184, 0.3) !important;
    border-color: transparent !important;
    flex: 0.3 !important;
    min-width: 12px !important;
    max-width: 20px !important;
    font-size: 0.5rem !important;
    height: calc(var(--key-h) * 0.65) !important;
    opacity: 0.5;
    border-radius: 6px !important;
    box-shadow: none !important;
    transition: flex 0.3s ease, min-width 0.3s ease, max-width 0.3s ease, opacity 0.3s ease, height 0.3s ease;
}

@keyframes keyReveal {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Swipe active key highlight */
.key.swipe-active {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.4), rgba(34, 197, 94, 0.3)) !important;
    border-color: rgba(22, 163, 74, 0.5) !important;
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.3);
    transition: all 0.08s ease;
}

/* === ENHANCED HINT BUTTON === */
.hint-btn {
    position: relative;
    overflow: hidden;
}

.hint-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.hint-btn:active::after {
    width: 120px;
    height: 120px;
}

/* === SMOOTH PAGE TRANSITIONS === */
.view.active {
    animation: viewSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes viewSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === RESPONSIVE TILE SPARKLE ON CORRECT === */
.tile.correct::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: transparent;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
    animation: tileSparkle 0.6s ease-out;
    pointer-events: none;
}

@keyframes tileSparkle {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); }
    100% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
}

/* === BOTTOM NAV ENHANCEMENTS === */
.nav-btn.active .nav-icon {
    animation: navIconBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes navIconBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Active nav indicator line */
.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--gradient-green);
    border-radius: 2px;
    animation: navLine 0.3s ease;
}

@keyframes navLine {
    from { width: 0; opacity: 0; }
    to { width: 20px; opacity: 1; }
}

/* === TOAST ENHANCEMENTS === */
.toast {
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* === LEVEL/XP BAR STYLE FOR MAP PROGRESS === */
.progress-bar-wrap {
    position: relative;
}

.progress-bar-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: radial-gradient(circle at center, rgba(22, 163, 74, 0.6) 0%, transparent 70%);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    animation: xpGlow 2s ease-in-out infinite;
}

@keyframes xpGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* === REGION UNLOCK EXIT ANIMATION === */
@keyframes regionUnlockOut {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8) translateY(-30px); opacity: 0; }
}

/* === SVG CONQUEST FLAG ANIMATION === */
.conquest-flag-text {
    opacity: 0;
    animation: flagPlantSVG 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes flagPlantSVG {
    0% { opacity: 0; font-size: 0px; }
    60% { opacity: 1; font-size: 14px; }
    100% { opacity: 1; font-size: 10px; }
}

/* === MAP ZOOM CURSOR === */
#map-container {
    cursor: grab;
}
#map-container:active {
    cursor: grabbing;
}

/* === MAP ENTRANCE ANIMATION === */
#turkey-map path {
    opacity: 0;
    animation: mapEntrance 0.6s ease-out forwards;
}
#turkey-map path.city-locked {
    animation: mapEntranceLocked 0.6s ease-out forwards;
}
@keyframes mapEntrance {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 0.75; transform: scale(1); }
}
@keyframes mapEntranceLocked {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 0.22; transform: scale(1); }
}
#turkey-map path.city-conquered {
    animation: mapEntranceConquered 0.6s ease-out forwards;
}
@keyframes mapEntranceConquered {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 0.92; transform: scale(1); filter: drop-shadow(0 0 2px currentColor); }
}

/* Staggered delay classes for entrance */
.map-stagger-1 { animation-delay: 0.03s !important; }
.map-stagger-2 { animation-delay: 0.06s !important; }
.map-stagger-3 { animation-delay: 0.09s !important; }
.map-stagger-4 { animation-delay: 0.12s !important; }
.map-stagger-5 { animation-delay: 0.15s !important; }
.map-stagger-6 { animation-delay: 0.18s !important; }
.map-stagger-7 { animation-delay: 0.21s !important; }

/* Newly conquered glow — when returning to map after win */
#turkey-map path.city-glow-new {
    animation: newConquestGlow 2s ease-in-out;
    filter: drop-shadow(0 0 8px currentColor) brightness(1.5);
}
@keyframes newConquestGlow {
    0% { filter: drop-shadow(0 0 12px currentColor) brightness(2); }
    40% { filter: drop-shadow(0 0 6px currentColor) brightness(1.3); }
    70% { filter: drop-shadow(0 0 10px currentColor) brightness(1.6); }
    100% { filter: drop-shadow(0 0 2px currentColor) brightness(1); }
}

/* Region wave — all cities in region pulse sequentially */
#turkey-map path.region-wave {
    animation: regionWavePulse 0.6s ease-out;
}
@keyframes regionWavePulse {
    0% { filter: brightness(1); transform: scale(1); }
    50% { filter: brightness(1.8) drop-shadow(0 0 6px currentColor); transform: scale(1.06); }
    100% { filter: brightness(1) drop-shadow(0 0 2px currentColor); transform: scale(1); }
}

/* Region complete celebration — shimmer effect */
#turkey-map path.region-complete-shimmer {
    animation: regionShimmer 1.5s ease-in-out;
}
@keyframes regionShimmer {
    0% { filter: brightness(1) drop-shadow(0 0 2px currentColor); }
    25% { filter: brightness(1.6) drop-shadow(0 0 10px rgba(245,158,11,0.8)); }
    50% { filter: brightness(1.2) drop-shadow(0 0 4px currentColor); }
    75% { filter: brightness(1.5) drop-shadow(0 0 8px rgba(245,158,11,0.6)); }
    100% { filter: brightness(1) drop-shadow(0 0 2px currentColor); }
}

/* Progress milestone animation */
.progress-bar.milestone-hit {
    animation: progressMilestone 1s ease-out;
}
@keyframes progressMilestone {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.8); }
    50% { box-shadow: 0 0 12px 4px rgba(22, 163, 74, 0.5); }
    100% { box-shadow: none; }
}

/* Suggested city indicator — pulsing beacon */
.suggested-indicator {
    fill: #f59e0b;
    opacity: 0.9;
    animation: suggestedPulse 1.5s ease-in-out infinite;
    pointer-events: none;
}
.suggested-label {
    fill: #fbbf24;
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
    animation: suggestedFloat 2s ease-in-out infinite;
}
#turkey-map path.city-suggested {
    animation: suggestedCityPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
}
@keyframes suggestedPulse {
    0%, 100% { r: 6; opacity: 0.7; }
    50% { r: 10; opacity: 1; }
}
@keyframes suggestedFloat {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(-3px); opacity: 1; }
}
@keyframes suggestedCityPulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(245,158,11,0.4)) brightness(1.1); }
    50% { filter: drop-shadow(0 0 10px rgba(245,158,11,0.8)) brightness(1.4); }
}

/* Map filter transition — smooth region filter */
#turkey-map path.filter-fade-in {
    animation: filterFadeIn 0.4s ease-out forwards;
}
#turkey-map path.filter-fade-out {
    animation: filterFadeOut 0.3s ease-out forwards;
}
@keyframes filterFadeIn {
    0% { opacity: 0.15; transform: scale(0.97); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes filterFadeOut {
    0% { opacity: 1; }
    100% { opacity: 0.15; }
}

/* === MAP ZOOM TRANSITION === */
#turkey-map {
    transition: transform 0.15s ease-out;
}

/* === ZOOM RESET HINT === */
.zoom-reset-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--text2);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}
.zoom-reset-hint.visible {
    opacity: 1;
}

/* === CONQUERED CITIES TOOLTIP === */
.city-tooltip {
    position: fixed;
    z-index: 300;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px 14px;
    pointer-events: none;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: tooltipFadeIn 0.2s ease;
    max-width: 200px;
}
.city-tooltip .tooltip-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 2px;
}
.city-tooltip .tooltip-status {
    font-size: 0.72rem;
    color: var(--text3);
}
.city-tooltip .tooltip-status.conquered {
    color: var(--green-light);
}
.city-tooltip .tooltip-status.locked {
    color: var(--red);
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ACHIEVEMENT SYSTEM STYLES
   ============================================================ */

/* Achievement list in stats */
.achievements-list {
    margin-bottom: 24px;
}

.ach-progress-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ach-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 40px;
}

.ach-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(31, 41, 55, 0.6);
    border-radius: 3px;
    overflow: hidden;
}

.ach-progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.ach-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 6px;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.2s, background 0.3s;
}

.ach-item.unlocked {
    opacity: 1;
    background: rgba(22, 163, 74, 0.06);
    border-color: rgba(22, 163, 74, 0.15);
}

.ach-item:hover {
    transform: translateX(4px);
}

.ach-icon {
    font-size: 1.5rem;
    min-width: 32px;
    text-align: center;
}

.ach-info {
    flex: 1;
}

.ach-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.ach-desc {
    font-size: 0.72rem;
    color: var(--text3);
    margin-top: 1px;
}

.ach-check {
    font-size: 1rem;
}

/* Achievement tier colors */
.ach-item.ach-diamond.unlocked { border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.08); }
.ach-item.ach-diamond .ach-name { color: #a855f7; }
.ach-item.ach-gold.unlocked { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.08); }
.ach-item.ach-gold .ach-name { color: #f59e0b; }
.ach-item.ach-silver.unlocked { border-color: rgba(148, 163, 184, 0.3); background: rgba(148, 163, 184, 0.08); }

.ach-item.hidden-ach { opacity: 0.35; }

/* Achievement popup notification */
.achievement-popup {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 500;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(17, 24, 39, 0.98));
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 40px rgba(245, 158, 11, 0.15);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 280px;
    backdrop-filter: blur(12px);
}

.achievement-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.achievement-popup.hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
}

.achievement-popup.achievement-diamond { border-color: rgba(168, 85, 247, 0.5); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 85, 247, 0.2); }
.achievement-popup.achievement-gold { border-color: rgba(245, 158, 11, 0.5); }
.achievement-popup.achievement-silver { border-color: rgba(148, 163, 184, 0.4); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
.achievement-popup.achievement-bronze { border-color: rgba(180, 130, 80, 0.4); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }

.ach-popup-icon {
    font-size: 2rem;
    animation: achIconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes achIconBounce {
    0% { transform: scale(0) rotate(-20deg); }
    60% { transform: scale(1.3) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

.ach-popup-info { flex: 1; }

.ach-popup-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    font-weight: 700;
}

.ach-popup-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.ach-popup-desc {
    font-size: 0.75rem;
    color: var(--text3);
}

/* ============================================================
   COLORBLIND MODE
   ============================================================ */
body.colorblind-mode .tile.correct {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6) !important;
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.35) !important;
}
body.colorblind-mode .key.correct {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.7)) !important;
    color: #60a5fa !important;
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.3) !important;
}

body.colorblind-mode .tile.present {
    background: linear-gradient(135deg, #c2410c, #ea580c) !important;
    box-shadow: 0 0 14px rgba(234, 88, 12, 0.3) !important;
}
body.colorblind-mode .key.present {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.7)) !important;
    color: #fb923c !important;
    border: 2px solid #ea580c !important;
    box-shadow: 0 0 6px rgba(234, 88, 12, 0.25) !important;
}

/* Add pattern indicators for colorblind */
body.colorblind-mode .tile.correct::before {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 0.55rem;
    opacity: 0.7;
}

body.colorblind-mode .tile.present::before {
    content: '○';
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 0.55rem;
    opacity: 0.7;
}

body.colorblind-mode .tile.absent::before {
    content: '✗';
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 0.55rem;
    opacity: 0.5;
}

/* ============================================================
   STREAK FREEZE INFO
   ============================================================ */
.streak-freeze-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text2);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
}

.streak-freeze-info #freeze-count {
    font-weight: 800;
    color: #3b82f6;
}

/* ============================================================
   STREAK RECOVERY DIALOG
   ============================================================ */
.streak-recovery-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 500;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(17, 24, 39, 0.98));
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 24px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.2);
    animation: regionUnlock 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    min-width: 300px;
}

.streak-recovery-dialog h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text);
}

.streak-recovery-dialog p {
    font-size: 0.85rem;
    color: var(--text2);
    margin-bottom: 16px;
}

.streak-recovery-dialog .streak-lost {
    font-size: 2rem;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 4px;
}

.streak-recovery-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.freeze-btn {
    background: var(--gradient-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.freeze-btn:hover { box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); transform: translateY(-1px); }
.freeze-btn:active { transform: scale(0.95); }

.skip-btn {
    background: var(--card);
    color: var(--text2);
    border: 1px solid var(--border2);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.skip-btn:hover { border-color: var(--border2); }

/* ─── Reward Ad Dialog ─── */
.ad-reward-dialog {
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: popIn 0.3s ease-out;
}
.ad-reward-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.ad-reward-header h3 {
    margin: 0;
    color: var(--text1);
    font-size: 1.1rem;
}
.ad-reward-icon {
    font-size: 1.8rem;
}
.ad-reward-body p {
    color: var(--text2);
    font-size: 0.85rem;
    margin: 0 0 12px;
}
.ad-reward-prize {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.05));
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #eab308;
    margin-bottom: 12px;
}
.ad-placeholder-note {
    font-size: 0.7rem;
    color: var(--text3);
    line-height: 1.4;
    margin-bottom: 16px;
}
.ad-reward-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.ad-btn-watch {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}
.ad-btn-watch:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}
.ad-btn-skip {
    background: var(--card);
    color: var(--text2);
    border: 1px solid var(--border2);
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.ad-btn-skip:hover {
    border-color: var(--text3);
}

/* ===== DIFFICULTY SELECTOR ===== */
.difficulty-selector {
    display: flex;
    gap: 4px;
    background: var(--bg2);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid var(--border);
}
.diff-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text2);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.diff-btn.active {
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.diff-btn[data-diff="easy"].active {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}
.diff-btn[data-diff="normal"].active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}
.diff-btn[data-diff="hard"].active {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}
.diff-btn:hover:not(.active) {
    background: var(--bg3);
    color: var(--text);
}
.difficulty-info {
    font-size: 0.75rem;
    color: var(--text3);
    text-align: center;
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

/* ===== HINT REVEAL (pre-filled letters on grid) ===== */
.tile.hint-reveal {
    animation: hintPulse 0.6s ease;
    opacity: 0.85;
}
.tile.locked {
    opacity: 0.9;
    pointer-events: none;
    position: relative;
}
.tile.locked::after {
    content: '🔒';
    position: absolute;
    bottom: 1px;
    right: 2px;
    font-size: 0.45rem;
    opacity: 0.5;
}
@keyframes hintPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 0 12px var(--green); }
    100% { transform: scale(1); }
}

/* ============================================================
   SOCIAL & LEADERBOARD STYLES (v4.0)
   ============================================================ */

/* === Stats Tabs === */
.stats-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg3);
    border-radius: 10px;
    padding: 3px;
}
.stats-tab {
    flex: 1;
    padding: 8px 4px;
    background: none;
    border: none;
    color: var(--text3);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.stats-tab.active {
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.stats-panel { display: none; }
.stats-panel.active { display: block; }

/* === Leaderboard === */
.leaderboard-container {
    min-height: 200px;
}
.lb-header {
    font-size: 0.8rem;
    color: var(--text3);
    margin-bottom: 12px;
    text-align: center;
}
.lb-loading, .lb-empty {
    text-align: center;
    color: var(--text3);
    padding: 40px 0;
    font-size: 0.85rem;
}
.lb-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg3);
    border-radius: 8px;
    font-size: 0.8rem;
}
.lb-row.lb-me {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.3);
}
.lb-rank {
    width: 28px;
    font-weight: 700;
    color: var(--text2);
    text-align: center;
    flex-shrink: 0;
}
.lb-avatar { font-size: 1.1rem; flex-shrink: 0; }
.lb-nick {
    flex: 1;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-stat { color: var(--text2); font-size: 0.75rem; flex-shrink: 0; }
.lb-time { color: var(--text3); font-size: 0.7rem; flex-shrink: 0; min-width: 36px; text-align: right; }
.lb-score { color: var(--gold); font-weight: 600; flex-shrink: 0; }
.lb-cities { color: var(--text2); font-size: 0.75rem; flex-shrink: 0; }

/* === Social Settings === */
.settings-section-title {
    font-size: 0.85rem;
    color: var(--text2);
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.nickname-input-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
}
.nickname-input {
    background: var(--bg3);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 120px;
    outline: none;
}
.nickname-input:focus { border-color: var(--blue-light); }
.nick-save-btn {
    background: var(--gradient-green);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.avatar-selector {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.avatar-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--bg3);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.avatar-btn.active {
    border-color: var(--green);
    background: rgba(22, 163, 74, 0.15);
    transform: scale(1.1);
}

/* === Result Overlay Social Buttons === */
.result-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: center;
}
.result-actions-secondary {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    justify-content: center;
}
.whatsapp-btn {
    background: #25D366 !important;
    border-color: #128C7E !important;
    color: #fff !important;
}
.image-btn {
    background: rgba(139, 92, 246, 0.2) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    color: #a78bfa !important;
}
.image-btn:hover {
    background: rgba(139, 92, 246, 0.35) !important;
}
.challenge-btn {
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--blue-light);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.challenge-btn:active { opacity: 0.7; }
.result-rank {
    font-size: 0.8rem;
    color: var(--gold);
    text-align: center;
    margin: 6px 0;
    font-weight: 600;
}

/* ===== NOTIFICATION SETTINGS ===== */
.kf-notif-section {
    margin: 8px 0 12px;
    background: var(--bg3);
    border-radius: var(--radius);
    padding: 12px;
    border: 1px solid var(--border);
}
.kf-notif-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.kf-notif-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.kf-notif-icon {
    font-size: 1.3rem;
}
.kf-notif-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.kf-notif-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.kf-notif-status-text {
    font-size: 0.75rem;
    font-weight: 500;
}
.kf-notif-status-text.on {
    color: var(--green-light);
}
.kf-notif-status-text.off {
    color: var(--text3);
}
/* Toggle switch */
.kf-notif-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.kf-notif-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.kf-notif-slider {
    position: absolute;
    inset: 0;
    background: var(--gray);
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s;
}
.kf-notif-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}
.kf-notif-switch input:checked + .kf-notif-slider {
    background: var(--green);
}
.kf-notif-switch input:checked + .kf-notif-slider::before {
    transform: translateX(20px);
}
/* Time row */
.kf-notif-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.kf-notif-time-label {
    font-size: 0.82rem;
    color: var(--text2);
}
.kf-notif-time-select {
    background: var(--bg2);
    color: var(--text);
    border: 1px solid var(--border2);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ===== WORD REPORT ===== */
.report-word-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 6px 10px;
    margin-top: 8px;
    transition: color 0.2s;
}
.report-word-btn:hover {
    color: rgba(239, 68, 68, 0.8);
}

.report-content {
    max-width: 360px;
    text-align: left;
}
.report-content h2 {
    text-align: center;
    margin-bottom: 12px;
}
.report-word-text {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 16px;
}
.report-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.report-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.report-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
.report-option input[type="radio"] {
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
}
.report-note {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text);
    padding: 10px 12px;
    font-size: 0.85rem;
    resize: none;
    font-family: inherit;
    margin-bottom: 12px;
}
.report-note:focus {
    outline: none;
    border-color: var(--gold);
}
.report-actions {
    display: flex;
    gap: 10px;
}
.report-submit-btn {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.report-submit-btn:hover { opacity: 0.9; }
.report-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.report-cancel-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.report-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== VICTORY OVERLAY — 81/81 ===== */
.victory-content {
    text-align: center;
    max-width: 420px;
    padding: 30px 24px;
    position: relative;
    overflow: hidden;
}
.victory-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(251,191,36,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.victory-trophy {
    font-size: 4rem;
    animation: victoryBounce 1s ease infinite alternate;
    filter: drop-shadow(0 0 20px rgba(251,191,36,0.5));
}
@keyframes victoryBounce {
    0% { transform: scale(1) rotate(-3deg); }
    100% { transform: scale(1.1) rotate(3deg); }
}
.victory-title {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 12px 0 6px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.victory-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}
.victory-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 20px;
}
.victory-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.victory-stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
}
.victory-stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.victory-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin-bottom: 20px;
}
.victory-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.prestige-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}
.prestige-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}
.victory-close-btn {
    width: 100%;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.victory-close-btn:hover {
    background: rgba(255,255,255,0.15);
}
.prestige-stars {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.prestige-star {
    font-size: 1.5rem;
    animation: starPulse 2s ease infinite;
}
.prestige-star:nth-child(2n) { animation-delay: 0.3s; }
.prestige-star:nth-child(3n) { animation-delay: 0.6s; }
@keyframes starPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Prestige badge on map header */
.prestige-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.1));
    border: 1px solid rgba(251,191,36,0.3);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    margin-left: 8px;
}

@media (max-width: 480px) {
    .victory-title { font-size: 1.4rem; }
    .victory-trophy { font-size: 3rem; }
    .victory-stat-value { font-size: 1.4rem; }
    .victory-content { padding: 24px 16px; }
}
