/* ===== ИМПОРТ ШРИФТА ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0b0e14;
    color: #f0f6fc;
    min-height: 100vh;
    padding: 20px 16px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: radial-gradient(circle at 20% 20%, rgba(88, 166, 255, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(247, 201, 72, 0.03) 0%, transparent 50%);
}

.game-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* ===== ХЕДЕР ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #f0f6fc, #8b949e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.back-btn {
    background: rgba(45, 53, 72, 0.6);
    backdrop-filter: blur(8px);
    color: #f0f6fc;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}
.back-btn:hover {
    background: rgba(45, 53, 72, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ===== СТАТИСТИКА (общий прогресс) ===== */
.progress-section {
    background: rgba(28, 35, 51, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.stat-item {
    flex: 1;
    background: rgba(13, 17, 23, 0.5);
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.04);
    transition: transform 0.2s;
}
.stat-item:hover {
    transform: translateY(-2px);
}
.stat-item .label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b949e;
    margin-bottom: 4px;
}
.stat-item .value {
    font-size: 24px;
    font-weight: 700;
    color: #f7c948;
}
.stat-item .value.points { color: #58a6ff; }
.stat-item .value.kisses { color: #f7c948; }

/* ===== ПРОГРЕСС-БАР (до поцелуя) ===== */
.progress-container {
    margin: 4px 0 0;
}
.progress-label {
    font-size: 13px;
    color: #8b949e;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}
.progress-label .current {
    color: #f0f6fc;
    font-weight: 600;
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #1c2333;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f7c948, #f0a030);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 12px rgba(247, 201, 72, 0.3);
}

/* ===== ТЕКУЩАЯ ИГРА (сессия) ===== */
.session-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.session-stats .stat-item {
    background: rgba(13, 17, 23, 0.4);
}
.session-progress {
    width: 100%;
    height: 4px;
    background: #1c2333;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}
.session-progress .fill {
    height: 100%;
    background: linear-gradient(90deg, #58a6ff, #1f6feb);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ===== МЕНЮ ===== */
.game-menu {
    text-align: center;
    padding: 40px 24px;
    background: rgba(28, 35, 51, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.05);
    margin: 20px 0;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    animation: menuFadeIn 0.5s ease;
}
.game-menu h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f0f6fc, #8b949e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.game-menu p {
    color: #8b949e;
    margin-bottom: 20px;
    font-size: 16px;
}
.menu-btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #238636, #1a7a2e);
    color: #fff;
    border: none;
    border-radius: 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin: 6px;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(35, 134, 54, 0.3);
}
.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35, 134, 54, 0.5);
}
.menu-btn:active {
    transform: scale(0.96);
}
.menu-btn.secondary {
    background: rgba(45, 53, 72, 0.8);
    box-shadow: none;
}
.menu-btn.secondary:hover {
    background: rgba(45, 53, 72, 1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== ФЛАГ ===== */
.flag-container {
    text-align: center;
    margin-bottom: 24px;
}
.flag {
    width: 80%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: contain;
    background: #0d1117;
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    transition: transform 0.3s ease;
}
.flag:hover {
    transform: scale(1.02);
}

/* ===== ВАРИАНТЫ ОТВЕТОВ ===== */
.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.option-btn {
    padding: 14px 10px;
    background: rgba(28, 35, 51, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    color: #f0f6fc;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}
.option-btn:active { transform: scale(0.94); }
.option-btn:hover {
    background: rgba(45, 53, 72, 0.9);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.option-btn.correct {
    background: linear-gradient(135deg, #238636, #1a7a2e);
    border-color: #238636;
    color: #fff;
    box-shadow: 0 0 24px rgba(35, 134, 54, 0.4);
}
.option-btn.wrong {
    background: linear-gradient(135deg, #da3633, #b22222);
    border-color: #da3633;
    color: #fff;
    box-shadow: 0 0 24px rgba(218, 54, 51, 0.4);
}
.option-btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* ===== РЕЗУЛЬТАТ ===== */
.result-message {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: resultPop 0.3s ease;
}
.result-message.hidden { display: none; }
.result-message .correct { color: #7ee787; }
.result-message .wrong { color: #da3633; }

@keyframes resultPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== КНОПКА "ДАЛЕЕ" ===== */
.next-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #238636, #1a7a2e);
    color: #fff;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(35, 134, 54, 0.3);
}
.next-btn.hidden { display: none; }
.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35, 134, 54, 0.5);
}
.next-btn:active {
    transform: scale(0.96);
}

/* ===== ТОСТ ===== */
.toast-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 35, 51, 0.9);
    backdrop-filter: blur(12px);
    color: #f0f6fc;
    padding: 14px 24px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 9999;
    font-size: 15px;
    font-weight: 500;
    animation: slideUp 0.4s ease;
    max-width: 90%;
    text-align: center;
}
@keyframes slideUp {
    from { transform: translateX(-50%) translateY(24px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ===== АДАПТИВ ===== */
@media (max-width: 480px) {
    .header h1 { font-size: 20px; }
    .stat-item .value { font-size: 20px; }
    .flag { max-width: 200px; }
    .option-btn { font-size: 14px; padding: 12px 8px; }
    .game-menu h2 { font-size: 24px; }
    .menu-btn { padding: 12px 24px; font-size: 16px; }
}
@media (max-width: 380px) {
    .stats-row { gap: 6px; }
    .stat-item { padding: 8px 4px; }
    .stat-item .value { font-size: 18px; }
    .option-btn { font-size: 13px; padding: 10px 6px; }
}