* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
}

body {
    font-family: 'instrument-sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0e17 0%, #1a1f2e 50%, #0f1419 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 16px;
    overflow-x: hidden;
}

.game-container {
    max-width: 520px;
    margin: 0 auto;
    background: #0f1824;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(100, 181, 246, 0.1);
    display: flex;
    flex-direction: column;
    height: auto;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2a3f5f 0%, #1a2f4d 100%);
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.5), transparent);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    flex: 1;
    min-width: 140px;
    text-align: left;
}

.header-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
}

.info-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(100, 181, 246, 0.15);
    border: 1px solid rgba(100, 181, 246, 0.3);
    color: #64b5f6;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.info-btn:hover {
    background: rgba(100, 181, 246, 0.25);
    transform: scale(1.05);
}

/* ===== Language Dropdown ===== */

.lang-dropdown {
    position: relative;
    flex-shrink: 0;
}

.lang-btn {
    width: 36px;
    height: 36px;
    background: rgba(100, 181, 246, 0.15);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 8px;
    color: #64b5f6;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
}

.lang-btn:hover {
   background: rgba(100, 181, 246, 0.25);
    transform: scale(1.05);
}

.lang-menu {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    width: 200px;
    background: #1b1f2a;
    border: 1px solid #3a4254;
    border-radius: 8px;
    overflow: hidden;
    z-index: 500;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
}

.lang-menu.active {
    display: block;
}

.lang-menu::-webkit-scrollbar {
    width: 6px;
}

.lang-menu::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 10px;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    transition: background .2s;
}

.lang-item:hover {
    background: #2a3140;
    color: #ffffff;
}

.lang-item.active {
    background: #374151;
    color: #ffffff;
    font-weight: 600;
}

.lang-item .flag {
    font-size: 18px;
}
/* ===== Daily / Unlimited Mode Toggle - compact, same row ===== */
.mode-toggle {
    display: inline-flex;
    background: rgba(15, 24, 36, 0.7);
    border: 1.5px solid rgba(100, 181, 246, 0.25);
    border-radius: 999px;
    padding: 3px;
    gap: 3px;
    flex-shrink: 0;
}

.mode-btn {
    border: none;
    background: transparent;
    color: rgba(224, 224, 224, 0.6);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.mode-btn:hover {
    color: #90caf9;
}

.mode-btn.active {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

/* Main Content */
.main-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(100, 181, 246, 0.6), rgba(76, 175, 80, 0.6));
    border-radius: 10px;
    transition: all 0.3s ease;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(100, 181, 246, 0.8), rgba(76, 175, 80, 0.8));
}

/* =========================================
   Stats Container
========================================= */

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
}

.stat-card {
    width: 100%;
}

/* =========================================
   Track
========================================= */

.stat-bar-container {
    position: relative;
    width: 100%;
    height: 38px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    overflow: hidden;
}

/* =========================================
   Filled Bar
========================================= */

.stat-bar {
    height: 100%;
    width: 0%;
    min-width: 120px;
    transition: width .5s ease;
    border-radius: 8px 0 0 8px;
    position: relative;
}

.stat-bar[style*="100%"] {
    border-radius: 8px;
}

/* =========================================
   Text
========================================= */

.stat-bar-text {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;

    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

/* =========================================
   Total
========================================= */

.stats-total {
    text-align: center;
    color: #7ec8ff;
    font-size: 15px;
    font-weight: 700;
    margin-top: 6px;
}

.stat-value {
    display: none;
}

/* ===== Stat Colors ===== */

#hpBar {
    background: #4caf50;
}

#atkBar {
    background: #ff7043;
}

#defBar {
    background: #8ecae6;
}

#spaBar {
    background: #fdd835;
}

#sdfBar {
    background: #ab47bc;
}

#spdBar {
    background: #ec407a;
}

/* =========================================
   Mobile
========================================= */

@media (max-width:768px){

    .stat-bar-container{
        height:36px;
    }

    .stat-bar{
        min-width:90px;
    }

    .stat-bar-text{
        font-size:12px;
        left:10px;
    }

}

@media (max-width:480px){

    .stat-bar-container{
        height:34px;
    }

    .stat-bar{
        min-width:80px;
    }

    .stat-bar-text{
        font-size:11px;
        left:8px;
    }

}

@media (max-width:360px){

    .stat-bar-container{
        height:32px;
    }

    .stat-bar{
        min-width:70px;
    }

    .stat-bar-text{
        font-size:10px;
        left:6px;
    }

}
/* Filter Section */
.filter-section {
    background: linear-gradient(135deg, rgba(26, 47, 77, 0.6) 0%, rgba(15, 35, 60, 0.6) 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.filter-group label {
    cursor: pointer;
    color: #90caf9;
    font-weight: 500;
}

.filter-group select,
.filter-group input[type="checkbox"] {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(20, 30, 45, 0.9) 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.4);
    color: #e0e0e0;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input[type="checkbox"]:focus {
    outline: none;
    border-color: rgba(100, 181, 246, 0.8);
    background: linear-gradient(135deg, rgba(42, 63, 95, 1) 0%, rgba(30, 45, 70, 1) 100%);
    box-shadow: 0 0 12px rgba(100, 181, 246, 0.3);
}

/* Guess Area */
.guess-area {
    margin-bottom: 16px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}

.guess-input {
    flex: 1;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(20, 30, 45, 0.9) 100%);
    border: 2px solid rgba(100, 181, 246, 0.4);
    color: #e0e0e0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.guess-input:focus {
    outline: none;
    border-color: rgba(100, 181, 246, 0.9);
    background: linear-gradient(135deg, rgba(42, 63, 95, 1) 0%, rgba(30, 45, 70, 1) 100%);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.guess-input::placeholder {
    color: rgba(224, 224, 224, 0.4);
}

.guess-btn {
    background: linear-gradient(135deg, #42a5f5 0%, #2196f3 50%, #1e88e5 100%);
    border: none;
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.4);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guess-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.guess-btn:hover::before {
    left: 100%;
}

.guess-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(30, 136, 229, 0.6);
}

.guess-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.message {
    height: auto;
    min-height: 32px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.3px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.info {
    display: block;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2) 0%, rgba(25, 118, 210, 0.2) 100%);
    color: #64d5ff;
    border: 1.5px solid rgba(100, 181, 246, 0.4);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.15);
}

.message.correct {
    display: block;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(56, 142, 60, 0.2) 100%);
    color: #81ff84;
    border: 1.5px solid rgba(129, 199, 132, 0.4);
    box-shadow: 0 4px 12px rgba(129, 199, 132, 0.15);
}

.message.incorrect {
    display: block;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.2) 0%, rgba(229, 57, 53, 0.2) 100%);
    color: #ff6b6b;
    border: 1.5px solid rgba(239, 83, 80, 0.4);
    box-shadow: 0 4px 12px rgba(239, 83, 80, 0.15);
}

.message.warning {
    display: block;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(245, 127, 23, 0.2) 100%);
    color: #ffd93d;
    border: 1.5px solid rgba(255, 183, 77, 0.4);
    box-shadow: 0 4px 12px rgba(255, 183, 77, 0.15);
}

/* Info Section */
.info-section {
    background: linear-gradient(135deg, rgba(26, 47, 77, 0.5) 0%, rgba(15, 35, 60, 0.5) 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    padding: 14px;
    margin-top: 16px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.info-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.guess-count,
.streak-count {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.7) 0%, rgba(20, 30, 45, 0.7) 100%);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    border: 2px solid #42a5f5;
    transition: all 0.3s ease;
    color: #64b5f6;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.guess-count::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.5), transparent);
}

.guess-count:hover,
.streak-count:hover {
    transform: translateY(-3px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 20px rgba(100, 181, 246, 0.2);
}

.button-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.secondary-btn {
    background: linear-gradient(135deg, rgba(66, 165, 245, 0.2) 0%, rgba(30, 136, 229, 0.1) 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.5);
    color: #64b5f6;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.secondary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(100, 181, 246, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

.secondary-btn:hover::before {
    left: 100%;
}

.secondary-btn:hover {
    background: linear-gradient(135deg, rgba(66, 165, 245, 0.3) 0%, rgba(30, 136, 229, 0.2) 100%);
    border-color: rgba(100, 181, 246, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.25);
}

.secondary-btn:active {
    transform: translateY(-1px);
}

.hint-text {
    padding: 14px;
    min-height: 32px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #22c55e;
    background: #1a1f2b;
    border: 3px solid #22c55e;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* History Section */
.history-section {
    background: linear-gradient(135deg, rgba(26, 47, 77, 0.5) 0%, rgba(15, 35, 60, 0.5) 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    padding: 14px;
    backdrop-filter: blur(10px);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.history-section h3 {
    font-size: 13px;
    font-weight: 700;
    color: #90caf9;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.95;
}

.guess-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.guess-history::-webkit-scrollbar {
    width: 6px;
}

.guess-history::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.guess-history::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(100, 181, 246, 0.5), rgba(76, 175, 80, 0.5));
    border-radius: 3px;
    transition: all 0.3s ease;
}

.guess-history::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(100, 181, 246, 0.7), rgba(76, 175, 80, 0.7));
}

.empty-history {
    text-align: center;
    color: rgba(224, 224, 224, 0.4);
    font-size: 12px;
    padding: 16px 8px;
    font-style: italic;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.6) 0%, rgba(20, 30, 45, 0.6) 100%);
    border-radius: 8px;
    border: 1.5px solid rgba(100, 181, 246, 0.3);
    font-size: 12px;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: slideInLeft 0.3s ease;
    position: relative;
    overflow: hidden;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.history-item:hover {
    background: linear-gradient(135deg, rgba(42, 63, 95, 0.8) 0%, rgba(30, 45, 70, 0.8) 100%);
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(100, 181, 246, 0.2);
}

.history-item.correct {
    border-color: rgba(76, 175, 80, 0.5);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(56, 142, 60, 0.05) 100%);
}

.history-item.correct:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(56, 142, 60, 0.1) 100%);
}

.history-item.incorrect {
    border-color: rgba(244, 67, 54, 0.5);
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.08) 0%, rgba(229, 57, 53, 0.03) 100%);
}

.history-item.incorrect:hover {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.12) 0%, rgba(229, 57, 53, 0.08) 100%);
}

.history-pokemon {
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
}

.history-generation {
    font-size: 11px;
    color: rgba(224, 224, 224, 0.5);
    font-weight: 500;
}

.history-result {
    font-weight: 700;
    color: #90caf9;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a2f5a 0%, #0d1f3d 50%, #1a2f5a 100%);
    border: 2px solid rgba(100, 181, 246, 0.3);
    border-radius: 18px;
    margin: auto;
    z-index: 2001;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2) 0%, rgba(66, 165, 245, 0.1) 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.4);
    color: #64b5f6;
    font-size: 24px;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.close-btn:hover {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.3) 0%, rgba(66, 165, 245, 0.2) 100%);
    border-color: rgba(100, 181, 246, 0.7);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.3);
}

/* Game Over Modal */
.game-over-modal {
    width: 90%;
    max-width: 440px;
    padding: 36px 28px;
    text-align: center;
}

.game-over-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-over-message {
    font-size: 16px;
    color: rgba(224, 224, 224, 0.85);
    margin-bottom: 24px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.game-over-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
    background: linear-gradient(135deg, rgba(26, 47, 77, 0.6) 0%, rgba(15, 35, 60, 0.6) 100%);
    padding: 18px;
    border-radius: 14px;
    border: 1.5px solid rgba(100, 181, 246, 0.2);
}

.game-over-stat {
    text-align: center;
}

.game-over-stat .label {
    font-size: 11px;
    text-transform: uppercase;
    color: #90caf9;
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.6px;
    opacity: 0.9;
}

.game-over-stat .value {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.game-over-streaks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
}

.game-over-streak {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.7) 0%, rgba(20, 30, 45, 0.7) 100%);
    padding: 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.game-over-streak:hover {
    transform: translateY(-3px);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
}

.game-over-streak .label {
    font-size: 11px;
    text-transform: uppercase;
    color: #90caf9;
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.game-over-streak .value {
    font-size: 24px;
    font-weight: 800;
    color: #81c784;
    letter-spacing: 0.5px;
}

.primary-btn {
    background: linear-gradient(135deg, #42a5f5 0%, #2196f3 50%, #1e88e5 100%);
    border: none;
    color: white;
    padding: 14px 36px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.4);
    margin-top: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 36px rgba(30, 136, 229, 0.6);
}

.primary-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Stats Popup Modal */
.stats-popup-modal {
    width: 90%;
    max-width: 400px;
    padding: 32px 28px;
}

.stats-popup-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.stats-popup-item {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.7) 0%, rgba(20, 30, 45, 0.7) 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.3);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 0;
}

.stats-popup-item:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 181, 246, 0.6);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.2);
}

.stats-popup-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #90caf9;
    margin-bottom: 8px;
    letter-spacing: 0.6px;
    opacity: 0.9;
    overflow-wrap: break-word;
}

.stats-popup-value {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Popup grid responsive breakpoints - wraps instead of squeezing/cutting off */
@media (max-width: 480px) {
    .stats-popup-modal {
        padding: 24px 16px;
    }

    .stats-popup-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stats-popup-item {
        padding: 12px 6px;
    }

    .stats-popup-label {
        font-size: 9px;
    }

    .stats-popup-value {
        font-size: 19px;
    }
}

@media (max-width: 360px) {
    .stats-popup-modal {
        padding: 20px 14px;
    }

    .stats-popup-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stats-popup-value {
        font-size: 18px;
    }
}

/* Info Modal */
.info-modal {
    width: 90%;
    max-width: 480px;
    padding: 32px 28px;
}

.info-modal h2 {
    font-size: 24px;
    margin-bottom: 18px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.info-content h3 {
    font-size: 14px;
    color: #ffd93d;
    margin-top: 14px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.info-content p,
.info-content li {
    font-size: 13px;
    color: rgba(224, 224, 224, 0.85);
    line-height: 1.7;
    font-weight: 500;
}

.info-content ul {
    margin-left: 18px;
    margin-bottom: 10px;
}

/* Confirm Modal */
.confirm-modal {
    width: 90%;
    max-width: 400px;
    padding: 32px 28px;
    text-align: center;
}

.confirm-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #ffd93d;
    letter-spacing: 0.5px;
}

.confirm-message {
    font-size: 14px;
    color: rgba(224, 224, 224, 0.85);
    margin-bottom: 28px;
    line-height: 1.7;
    font-weight: 500;
}

.confirm-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.confirm-btn {
    padding: 13px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
}

.confirm-no {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2) 0%, rgba(66, 165, 245, 0.1) 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.5);
    color: #64b5f6;
}

.confirm-no::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(100, 181, 246, 0.15);
    transition: left 0.3s ease;
}

.confirm-no:hover::before {
    left: 100%;
}

.confirm-no:hover {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.3) 0%, rgba(66, 165, 245, 0.2) 100%);
    border-color: rgba(100, 181, 246, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.25);
}

.confirm-yes {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 50%, #ee5a6f 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.4);
    border: none;
}

.confirm-yes:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 71, 87, 0.6);
}

.confirm-yes:active {
    transform: translateY(-1px) scale(1.02);
}

/* Autocomplete Styles */
#autocompleteList {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a2f5a 0%, #0d1f3d 100%);
    border: 1.5px solid rgba(100, 181, 246, 0.4);
    border-top: none;
    border-radius: 0 0 12px 12px;
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    margin-top: -3px;
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#autocompleteList::-webkit-scrollbar {
    width: 7px;
}

#autocompleteList::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#autocompleteList::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(100, 181, 246, 0.6), rgba(76, 175, 80, 0.6));
    border-radius: 10px;
    transition: all 0.3s ease;
}

#autocompleteList::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(100, 181, 246, 0.8), rgba(76, 175, 80, 0.8));
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-item {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.15);
    cursor: pointer;
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.autocomplete-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #42a5f5 0%, #64b5f6 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.autocomplete-item:hover {
    background: rgba(100, 181, 246, 0.15);
    padding-left: 20px;
    color: #64b5f6;
}

.autocomplete-item:hover::before {
    transform: scaleX(1);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item.selected {
    background: rgba(100, 181, 246, 0.25);
    padding-left: 20px;
    color: #64b5f6;
    font-weight: 700;
}

.autocomplete-item.selected::before {
    transform: scaleX(1);
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .game-container {
        border-radius: 16px;
    }

    .header {
        padding: 16px;
    }

    .title {
        font-size: 24px;
        letter-spacing: 0.5px;
    }

    .title {
        font-size: 17px;
        letter-spacing: 0.3px;
        min-width: 0;
    }

    .header-buttons {
        gap: 5px;
    }

    .info-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .lang-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .lang-menu {
        min-width: 165px;
        right: -6px;
        top: 38px;
    }

    .mode-toggle {
        padding: 2px;
    }

    .mode-btn {
        padding: 5px 9px;
        font-size: 9px;
    }
}

@media (max-width: 360px) {
    .header-content {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .title {
        flex-basis: 100%;
        text-align: center;
    }

    .header-buttons {
        flex-basis: 100%;
        justify-content: center;
    }


    .main-content {
        padding: 16px;
    }

    .filter-section {
        padding: 12px;
        gap: 10px;
    }

    .guess-input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .guess-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .button-group {
        gap: 8px;
    }

    .secondary-btn {
        padding: 8px 6px;
        font-size: 11px;
    }

    .hint-text {
        font-size: 16px;
        padding: 12px;
    }

    .game-over-modal {
        width: 95%;
        padding: 24px 20px;
    }

    .game-over-title {
        font-size: 26px;
    }

    .game-over-message {
        font-size: 14px;
    }

    .game-over-stats {
        gap: 10px;
        padding: 14px;
    }

    .game-over-stat .value {
        font-size: 18px;
    }

    .game-over-streak .value {
        font-size: 20px;
    }

    .info-modal {
        width: 95%;
        padding: 24px 20px;
    }

    .confirm-modal {
        width: 95%;
        padding: 24px 20px;
    }

    .confirm-title {
        font-size: 22px;
    }

    .confirm-buttons {
        gap: 10px;
    }

    #autocompleteList {
        max-height: 200px;
    }

    .autocomplete-item {
        padding: 11px 14px;
        font-size: 12px;
    }

    .history-item {
        padding: 9px 10px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .title {
        font-size: 20px;
    }

    .button-group {
        grid-template-columns: 1fr;
        grid-auto-flow: column;
    }

    .info-box {
        grid-template-columns: 1fr;
    }

    .game-over-stats {
        grid-template-columns: 1fr;
    }
}

.share-section {
    margin: 18px 0;
    text-align: center;
}
.share-label {
    font-size: 13px;
    color: #90caf9;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.share-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}
.share-btn:active {
    transform: translateY(0);
}
#shareTwitterBtn { background: #000000; }
#shareFacebookBtn { background: #1877F2; }
#shareInstagramBtn {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
#shareCopyBtn { background: #374151; }

/* Dropdown Options */
#generationFilter option {
    background: #2b2f3a;
    color: #fff;
    font-size: 15px;
}

/* Mobile */
@media (max-width: 768px) {
    #generationFilter {
        width: 100%;
        font-size: 15px;
    }
}

/* ===== Footer ===== */
.footer {
    margin-left: -20px;
    margin-right: -20px;
}
.footer {
    background: linear-gradient(135deg, #12203a 0%, #0a1526 100%);
    border-top: 1px solid rgba(100, 181, 246, 0.15);
    padding: 24px 20px 20px;
    text-align: center;
    margin-top: 12px;
}

.footer-share {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.footer-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.2s ease;
}

.footer-share-btn:hover {
    transform: translateY(-3px) scale(1.06);
    opacity: 0.92;
}

.footer-share-btn:active {
    transform: translateY(-1px) scale(1.02);
}

#footerShareX {
    background: #000000;
}
#footerShareX:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

#footerShareFacebook {
    background: #1877F2;
}
#footerShareFacebook:hover {
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

#footerShareInstagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
#footerShareInstagram:hover {
    box-shadow: 0 6px 16px rgba(220, 39, 67, 0.4);
}

.footer-copyright {
    font-size: 12px;
    color: rgba(224, 224, 224, 0.6);
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.footer-disclaimer {
    font-size: 11px;
    color: rgba(224, 224, 224, 0.4);
    font-weight: 500;
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto 14px;
}

.footer-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
}

.footer-links a {
    font-size: 11px;
    color: #64b5f6;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-links a:hover {
    color: #90caf9;
    text-decoration: underline;
}

.footer-links .divider {
    color: rgba(255, 255, 255, 0.15);
    font-size: 11px;
}

@media (max-width: 480px) {
    .footer {
        padding: 20px 16px 18px;
    }

    .footer-share-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .footer-disclaimer {
        font-size: 10.5px;
        max-width: 300px;
    }
}
.stats-popup-modal {
    width: min(92vw, 500px);
    padding: 55px 24px 24px;
    box-sizing: border-box;
}

.stats-popup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

/* =========================================
   Daily Countdown
========================================= */

.countdown-box {
    max-width: 500px;
    margin: 24px auto 18px;
    padding: 18px 22px;
    text-align: center;
    background: linear-gradient(180deg, #1f2937, #111827);
    border: 1px solid #374151;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    color: #e5e7eb;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .3px;
}

.countdown-value {
    display: inline-block;
    margin-left: 8px;
    padding: 6px 14px;
    background: #0f172a;
    border: 1px solid #4b5563;
    border-radius: 8px;
    color: #22c55e;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: monospace;
}

/* =========================================
   Daily Navigation
========================================= */

.daily-nav {
    max-width: 650px;
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.daily-nav a,
.daily-nav span {
    min-width: 170px;
    padding: 12px 18px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    transition: .25s ease;
    user-select: none;
}

/* Active Links */

.nav-link {
    text-decoration: none;
    color: #f8fafc;
    background: #2563eb;
    border: 1px solid #3b82f6;
}

.nav-link:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(37,99,235,.35);
}

/* Today's Button */

.nav-today {
    background: linear-gradient(135deg,#16a34a,#22c55e);
    border-color: #22c55e;
    color: #fff;
    font-weight: 700;
}

.nav-today:hover {
    background: linear-gradient(135deg,#15803d,#16a34a);
    box-shadow: 0 8px 20px rgba(34,197,94,.35);
}

/* Disabled */

.nav-disabled {
    background: #1f2937;
    color: #6b7280;
    border: 1px solid #374151;
    cursor: default;
}

/* =========================================
   Mobile
========================================= */

@media (max-width: 600px) {

    .daily-nav {
        flex-direction: column;
    }

    .daily-nav a,
    .daily-nav span {
        width: 100%;
        max-width: 320px;
    }

    .countdown-box {
        padding: 16px;
    }

    .countdown-value {
        display: block;
        margin: 12px auto 0;
        width: fit-content;
        font-size: 26px;
    }
}
.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    line-height: 1;
}

.mode-icon {
    font-size: 28px;
    line-height: 1;
}