/* ==================== ШРИФТЫ ==================== */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Roboto:wght@400;700&display=swap');

/* ==================== ПЕРЕМЕННЫЕ ==================== */
:root {
    --bg-dark: #0d0d1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --border-color: #2a2a4a;
    --gold: #ffd700;
    --gold-dark: #b8960f;
    --red: #ff4757;
    --red-dark: #a83232;
    --green: #2ed573;
    --green-dark: #1e8449;
    --blue: #5352ed;
    --blue-light: #70a1ff;
    --purple: #a855f7;
    --text-primary: #e2e2e2;
    --text-secondary: #8888aa;
    --text-muted: #555577;
}

/* ==================== СБРОС И БАЗОВЫЕ СТИЛИ ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at top, #1a1a3e 0%, transparent 50%),
        radial-gradient(ellipse at bottom, #0d0d1a 0%, transparent 50%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Обычные страницы с навигацией */
body:not(.landing-page) {
    padding-bottom: 80px;
    padding-top: 60px;
}

/* Лендинг без отступов */
body.landing-page {
    padding: 0 !important;
}

input, button, select, textarea { -webkit-appearance: none; appearance: none; }
::selection { background: var(--gold); color: var(--bg-dark); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* ==================== ВЕРХНЯЯ ПАНЕЛЬ ==================== */
.top-bar {
    position: fixed; top: 0; left: 0; right: 0;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(26, 26, 46, 0.95) 100%);
    border-bottom: 2px solid var(--gold-dark);
    padding: 12px 15px; z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.top-stats { display: flex; justify-content: space-around; align-items: center; max-width: 480px; margin: 0 auto; }
.top-stats .stat { font-size: 13px; font-weight: bold; }

/* ==================== ОСНОВНОЙ КОНТЕНТ ==================== */
.main-content { max-width: 480px; margin: 0 auto; padding: 15px; min-height: calc(100vh - 140px); }

/* ==================== НИЖНЯЯ НАВИГАЦИЯ ==================== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: linear-gradient(0deg, var(--bg-card) 0%, rgba(26, 26, 46, 0.98) 100%);
    border-top: 2px solid var(--gold-dark);
    display: flex; justify-content: space-around; padding: 8px 5px; z-index: 1000;
}

.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-secondary); padding: 5px 10px; transition: all 0.3s; position: relative; }
.nav-item:hover, .nav-item.active { color: var(--gold); }
.nav-item.active::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 30px; height: 3px; background: var(--gold); border-radius: 0 0 3px 3px; }
.nav-icon { font-size: 20px; margin-bottom: 2px; }
.nav-label { font-size: 9px; font-weight: bold; text-transform: uppercase; }

/* ==================== ЗАГОЛОВКИ ==================== */
h1 { font-family: 'Press Start 2P', cursive; font-size: 16px; text-align: center; color: var(--gold); text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); margin-bottom: 20px; padding: 10px; }
h1::before, h1::after { content: '⚔️'; margin: 0 10px; }
h2 { font-size: 14px; color: var(--text-primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }
h3 { font-size: 14px; color: var(--gold); margin-bottom: 10px; }

/* ==================== КАРТОЧКИ ==================== */
.card { background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; margin-bottom: 12px; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: bold; font-size: 14px; }
.card-icon { font-size: 20px; }

/* ==================== СТРАНИЦА ГЕРОЯ ==================== */
.hero-card { padding: 20px; }
.hero-profile { display: flex; gap: 15px; align-items: flex-start; position: relative; }
.hero-avatar-container { position: relative; flex-shrink: 0; }
.hero-avatar { font-size: 70px; line-height: 1; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.hero-level-badge { position: absolute; bottom: -5px; right: -5px; background: linear-gradient(145deg, var(--gold) 0%, var(--gold-dark) 100%); color: var(--bg-dark); font-size: 12px; font-weight: bold; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-dark); }
.hero-info { flex: 1; min-width: 0; }
.hero-name { font-family: 'Press Start 2P', cursive; font-size: 14px; color: var(--gold); margin-bottom: 5px; }
.hero-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.logout-btn { position: absolute; top: 0; right: 0; font-size: 20px; text-decoration: none; opacity: 0.6; }
.logout-btn:hover { opacity: 1; }

/* Ресурсы */
.resources-row { display: flex; gap: 12px; margin-bottom: 15px; }
.resource-box { flex: 1; background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.resource-icon { font-size: 28px; }
.resource-value { font-size: 20px; font-weight: bold; color: var(--gold); }
.resource-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; }

/* Экипировка */
.equipment-slots { display: flex; gap: 10px; justify-content: center; }
.equipment-slot { width: 90px; background: var(--bg-dark); border: 2px dashed var(--border-color); border-radius: 12px; padding: 12px 8px; text-align: center; transition: all 0.3s; }
.equipment-slot:hover { border-color: var(--gold-dark); border-style: solid; }
.slot-icon { font-size: 28px; margin-bottom: 5px; }
.slot-label { font-size: 10px; color: var(--text-secondary); margin-bottom: 3px; }
.slot-empty { font-size: 9px; color: var(--text-muted); }

/* Достижения превью */
.achievements-card { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.achievements-preview { display: flex; align-items: center; gap: 15px; }
.achievements-icon { font-size: 40px; }
.achievements-info { flex: 1; }
.achievements-title { font-size: 14px; font-weight: bold; margin-bottom: 3px; }
.achievements-count { font-size: 18px; color: var(--gold); font-weight: bold; }
.achievements-arrow { font-size: 20px; color: var(--text-muted); }

/* Статистика */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-box { background: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; text-align: center; }
.stat-box-value { font-size: 22px; font-weight: bold; color: var(--gold); }
.stat-box-label { font-size: 10px; color: var(--text-secondary); margin-top: 3px; }

/* ==================== ПОЛОСКИ HP / EXP ==================== */
.bar-container { margin-bottom: 10px; }
.bar-label { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 3px; }
.bar { height: 14px; background: var(--bg-dark); border-radius: 7px; overflow: hidden; border: 2px solid var(--border-color); }
.bar-fill { height: 100%; border-radius: 5px; transition: width 0.5s ease; }
.hp-bar .bar-fill { background: linear-gradient(90deg, var(--red-dark) 0%, var(--red) 100%); }
.exp-bar .bar-fill { background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%); }

/* ==================== КНОПКИ ==================== */
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 8px; font-size: 13px; font-weight: bold; text-decoration: none; text-align: center; cursor: pointer; transition: all 0.3s; text-transform: uppercase; }
.btn-primary { background: linear-gradient(145deg, var(--gold) 0%, var(--gold-dark) 100%); color: var(--bg-dark); border: 2px solid var(--gold); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-secondary { background: linear-gradient(145deg, var(--bg-card-hover) 0%, var(--bg-card) 100%); color: var(--text-primary); border: 2px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: linear-gradient(145deg, var(--red) 0%, var(--red-dark) 100%); color: white; border: 2px solid var(--red); }
.btn-success { background: linear-gradient(145deg, var(--green) 0%, var(--green-dark) 100%); color: white; border: 2px solid var(--green); }
.btn-gold { background: linear-gradient(145deg, var(--gold) 0%, var(--gold-dark) 100%); color: var(--bg-dark); border: 2px solid var(--gold); box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn:disabled { background: var(--bg-card); color: var(--text-muted); border-color: var(--border-color); cursor: not-allowed; }

/* ==================== ФОРМЫ ==================== */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; color: var(--text-secondary); font-size: 14px; }
input[type="text"], input[type="password"], input[type="number"] { width: 100%; padding: 10px 12px; background: var(--bg-dark); border: 2px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 14px; }
input:focus { outline: none; border-color: var(--gold); }
input::placeholder { color: var(--text-muted); }
.input-row { display: flex; gap: 10px; }
.input-row input { flex: 1; }

/* ==================== КВЕСТЫ МИНИ ==================== */
.quest-mini { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 8px; }
.quest-mini-title { font-size: 13px; color: var(--text-primary); }
.quest-mini-progress { font-size: 13px; font-weight: bold; color: var(--gold); }

/* ==================== NPC КАРТОЧКИ ==================== */
.npc-card { display: flex; align-items: center; padding: 15px; background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 2px solid var(--border-color); border-radius: 12px; margin-bottom: 12px; cursor: pointer; transition: all 0.3s; text-decoration: none; color: inherit; }
.npc-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.npc-card.disabled { opacity: 0.5; cursor: not-allowed; }
.npc-avatar { font-size: 40px; margin-right: 15px; }
.npc-info { flex: 1; }
.npc-name { font-weight: bold; font-size: 14px; margin-bottom: 3px; }
.npc-description { font-size: 12px; color: var(--text-secondary); }
.npc-arrow { font-size: 20px; color: var(--text-muted); }

/* ==================== ЛОКАЦИИ ==================== */
.location-card { display: flex; align-items: center; padding: 15px; background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 2px solid var(--border-color); border-radius: 12px; margin-bottom: 12px; }
.location-card.current { border-color: var(--gold); }
.location-icon { font-size: 36px; margin-right: 15px; }
.location-info { flex: 1; }
.location-name { font-weight: bold; font-size: 14px; margin-bottom: 3px; }
.location-status { font-size: 12px; color: var(--text-secondary); }
.location-cost { font-size: 12px; color: var(--gold); margin-top: 3px; }

/* ==================== БОЙ ==================== */
.battle-screen { text-align: center; padding: 20px 0; max-width: 400px; margin: 0 auto; }
.battle-target { margin-bottom: 30px; }
.target-icon { font-size: 100px; line-height: 1; }
.target-icon.monster { animation: monster-bounce 2s ease-in-out infinite; }
@keyframes monster-bounce { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-15px) scale(1.05); } }
.target-name { font-family: 'Press Start 2P', cursive; font-size: 14px; color: var(--text-primary); margin-top: 15px; }
.target-type { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }

.timer-container { margin: 30px 0; }
.timer-circle { width: 180px; height: 180px; border: 4px solid var(--border-color); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); }
.timer-circle-done { border-color: var(--green) !important; box-shadow: 0 0 30px rgba(46, 213, 115, 0.4); }
.timer-value { font-family: 'Press Start 2P', cursive; font-size: 32px; color: var(--gold); }
.timer-done { color: var(--green) !important; }
.timer-label { font-size: 12px; color: var(--text-secondary); margin-top: 8px; text-transform: uppercase; }
.label-done { color: var(--green) !important; font-weight: bold; }

.battle-progress { margin: 25px 0; }
.progress-bar-container { height: 12px; background: var(--bg-dark); border-radius: 6px; overflow: hidden; border: 1px solid var(--border-color); }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%); border-radius: 6px; transition: width 1s linear; }
.progress-done { background: linear-gradient(90deg, var(--green) 0%, var(--green-dark) 100%) !important; }
.progress-text { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }

.battle-actions { display: flex; flex-direction: column; gap: 12px; margin: 25px 0; }
.btn-complete { padding: 16px 24px; font-size: 16px; background: linear-gradient(145deg, var(--bg-card-hover) 0%, var(--bg-card) 100%); color: var(--text-muted); border: 2px solid var(--border-color); border-radius: 12px; text-decoration: none; text-align: center; cursor: not-allowed; }
.btn-ready { background: linear-gradient(145deg, var(--green) 0%, var(--green-dark) 100%) !important; color: white !important; border-color: var(--green) !important; cursor: pointer !important; box-shadow: 0 0 20px rgba(46, 213, 115, 0.4); }
.btn-retreat { padding: 12px 20px; font-size: 14px; background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: 8px; text-decoration: none; text-align: center; }
.btn-retreat:hover { border-color: var(--red); color: var(--red); }

.battle-tips { background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px 20px; text-align: left; margin-top: 20px; }
.battle-tips .tip-title { font-weight: bold; margin-bottom: 10px; color: var(--gold); font-size: 14px; }
.battle-tips ul { margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 13px; }
.battle-tips li { margin-bottom: 5px; }

.result-screen { text-align: center; padding: 30px 0; }
.result-icon { font-size: 80px; margin-bottom: 20px; }
.result-title { font-family: 'Press Start 2P', cursive; font-size: 20px; margin-bottom: 20px; }
.result-title.victory { color: var(--gold); }
.result-title.defeat { color: var(--red); }
.result-rewards { background: var(--bg-card); border: 2px solid var(--gold-dark); border-radius: 12px; padding: 20px; margin: 20px 0; }
.reward-item { font-size: 18px; margin: 10px 0; color: var(--gold); }

/* ==================== ПРИВЫЧКИ ==================== */
.habit-item { display: flex; align-items: center; padding: 12px; background: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 10px; }
.habit-item.good { border-left: 4px solid var(--green); }
.habit-item.bad { border-left: 4px solid var(--red); }
.habit-item.done { opacity: 0.6; }
.habit-content { flex: 1; }
.habit-title { font-weight: bold; font-size: 14px; margin-bottom: 3px; }
.habit-streak { font-size: 11px; color: var(--gold); }
.habit-warning { font-size: 11px; color: var(--red); }
.habit-btn { width: 40px; height: 40px; border-radius: 50%; font-size: 18px; display: flex; align-items: center; justify-content: center; border: 2px solid; background: var(--bg-card); cursor: pointer; }
.habit-btn.good-btn { border-color: var(--green); color: var(--green); }
.habit-btn.good-btn:hover { background: var(--green); color: white; }
.habit-btn.bad-btn { border-color: var(--red); color: var(--red); }
.habit-btn.bad-btn:hover { background: var(--red); color: white; }

/* ==================== ЗАДАЧИ ==================== */
.task-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 10px; }
.task-item.overdue { border-left: 4px solid var(--red); }
.task-content { flex: 1; }
.task-title { font-weight: bold; font-size: 14px; margin-bottom: 3px; }
.task-timer { font-size: 11px; color: var(--text-secondary); }
.task-timer.warning { color: var(--gold); }
.task-timer.danger { color: var(--red); }
.task-actions { display: flex; gap: 8px; }

/* ==================== ДОСТИЖЕНИЯ ==================== */
.achievement { display: flex; align-items: center; padding: 10px; background: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 8px; }
.achievement.unlocked { border-color: var(--gold); background: rgba(255, 215, 0, 0.05); }
.achievement.locked { opacity: 0.6; }
.achievement-icon { font-size: 28px; margin-right: 12px; }
.achievement.locked .achievement-icon { filter: grayscale(100%); }
.achievement-info { flex: 1; }
.achievement-title { font-weight: bold; font-size: 13px; margin-bottom: 2px; }
.achievement-description { font-size: 11px; color: var(--text-secondary); }
.mini-progress { height: 4px; background: var(--bg-dark); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.mini-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 2px; }

/* ==================== ИНВЕНТАРЬ ==================== */
.inventory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.inventory-item { background: var(--bg-dark); border: 2px solid var(--border-color); border-radius: 12px; padding: 12px 8px; text-align: center; }
.inventory-item:hover { border-color: var(--gold-dark); }
.inventory-item-icon { font-size: 32px; margin-bottom: 8px; }
.inventory-item-name { font-size: 11px; font-weight: bold; margin-bottom: 4px; }
.inventory-item-quantity { font-size: 14px; color: var(--gold); font-weight: bold; }

/* ==================== КВЕСТЫ ==================== */
.quest-card { background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 2px solid var(--border-color); border-radius: 12px; padding: 15px; margin-bottom: 12px; }
.quest-card.active { border-color: var(--gold-dark); }
.quest-card.completed { border-color: var(--green); }
.quest-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.quest-icon { font-size: 28px; }
.quest-title { font-weight: bold; font-size: 14px; }
.quest-description { color: var(--text-secondary); font-size: 12px; margin-bottom: 10px; }
.quest-reward { display: flex; gap: 15px; font-size: 12px; color: var(--gold); margin-bottom: 10px; }
.quest-actions { display: flex; gap: 10px; }

/* ==================== ПУСТЫЕ СОСТОЯНИЯ ==================== */
.empty-state { text-align: center; padding: 30px 15px; color: var(--text-muted); }
.empty-state-icon { font-size: 50px; margin-bottom: 15px; opacity: 0.5; }
.empty-state-text { font-size: 13px; }

/* ==================== СООБЩЕНИЯ ==================== */
.alert { padding: 12px 15px; border-radius: 8px; margin-bottom: 15px; font-size: 13px; }
.alert-error, .alert-danger { background: rgba(255, 71, 87, 0.1); border: 1px solid var(--red); color: var(--red); }
.alert-success { background: rgba(46, 213, 115, 0.1); border: 1px solid var(--green); color: var(--green); }
.alert-warning { background: rgba(255, 215, 0, 0.1); border: 1px solid var(--gold); color: var(--gold); }

/* ==================== АВТОРИЗАЦИЯ ==================== */
.auth-container { max-width: 400px; margin: 50px auto; padding: 20px; }
.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo-icon { font-size: 60px; margin-bottom: 10px; }
.auth-card { background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 16px; padding: 30px; }
.auth-footer { text-align: center; margin-top: 20px; color: var(--text-secondary); }
.auth-footer a { color: var(--gold); text-decoration: none; }

/* ==================== ВЫБОР ПОЛА ==================== */
.gender-selection { display: flex; gap: 20px; justify-content: center; margin: 30px 0; }
.gender-option { cursor: pointer; }
.gender-option input { display: none; }
.gender-card { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 16px; padding: 25px 35px; text-align: center; transition: all 0.3s; }
.gender-option input:checked + .gender-card { border-color: var(--gold); box-shadow: 0 0 30px rgba(255, 215, 0, 0.3); transform: scale(1.05); }
.gender-avatar { font-size: 60px; margin-bottom: 10px; }
.gender-label { font-weight: bold; color: var(--text-primary); }

/* ==================== BADGES ==================== */
.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.badge-gold { background: rgba(255, 215, 0, 0.2); color: var(--gold); }
.badge-red { background: rgba(255, 71, 87, 0.2); color: var(--red); }
.badge-green { background: rgba(46, 213, 115, 0.2); color: var(--green); }

/* ==================== ЛЕНДИНГ ==================== */
.landing-container { max-width: 600px; margin: 0 auto; padding: 20px 20px 40px; }

.hero-section { text-align: center; padding: 40px 20px 30px; }
.hero-content { max-width: 500px; margin: 0 auto; }
.hero-icon { font-size: 60px; margin-bottom: 15px; animation: float 3s ease-in-out infinite; }
.hero-content h1 { font-family: 'Press Start 2P', cursive; font-size: 18px; margin-bottom: 15px; line-height: 1.4; color: var(--gold); }
.hero-content h1::before, .hero-content h1::after { display: none; }
.hero-subtitle { font-size: 16px; color: var(--text-secondary); margin-bottom: 20px; }
.hero-content .btn { display: block; margin: 10px auto; max-width: 280px; }

.info-section { padding: 30px 0; }
.info-section h2 { text-align: center; margin-bottom: 15px; color: var(--gold); font-size: 16px; border: none; }
.info-section > p { text-align: center; color: var(--text-secondary); margin-bottom: 25px; line-height: 1.6; font-size: 14px; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.feature-card { background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px 15px; text-align: center; transition: all 0.3s; }
.feature-card:hover { transform: translateY(-3px); border-color: var(--gold-dark); }
.feature-card .feature-icon { font-size: 36px; margin-bottom: 10px; }
.feature-card h3 { font-size: 14px; margin-bottom: 8px; color: var(--gold); border: none; padding: 0; }
.feature-card p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.how-section { padding: 30px 0; }
.how-section h2 { text-align: center; margin-bottom: 20px; color: var(--gold); font-size: 16px; border: none; }

.step-list { display: flex; flex-direction: column; gap: 12px; }
.step-item { display: flex; align-items: flex-start; gap: 15px; background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; }
.step-number { width: 32px; height: 32px; background: linear-gradient(145deg, var(--gold) 0%, var(--gold-dark) 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; flex-shrink: 0; color: var(--bg-dark); }
.step-content h3 { font-size: 14px; margin-bottom: 4px; color: var(--text-primary); border: none; padding: 0; }
.step-content p { font-size: 12px; color: var(--text-secondary); }

.features-section { padding: 30px 0; }
.features-section h2 { text-align: center; margin-bottom: 15px; color: var(--gold); font-size: 16px; border: none; }
.features-list { background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px 20px; }
.feature-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 13px; }
.feature-item:last-child { border-bottom: none; }
.feature-item .check { color: var(--green); font-size: 16px; font-weight: bold; }

.cta-section { padding: 30px 0 40px; text-align: center; }
.cta-content { background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%); border: 2px solid var(--gold-dark); border-radius: 16px; padding: 30px 20px; }
.cta-content h2 { margin-bottom: 10px; color: var(--gold); font-size: 18px; border: none; }
.cta-content p { color: var(--text-secondary); margin-bottom: 20px; font-size: 14px; }
.cta-content .btn { display: block; margin: 10px auto; max-width: 280px; }

.landing-footer { text-align: center; padding: 20px; color: var(--text-muted); font-size: 12px; border-top: 1px solid var(--border-color); }

/* ==================== АНИМАЦИИ ==================== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade { animation: fadeIn 0.3s ease; }

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 500px) {
    .feature-grid { grid-template-columns: 1fr; }
    .gender-selection { flex-direction: column; align-items: center; }
    h1::before, h1::after { display: none; }
    h1 { font-size: 14px; }
}

@media (max-width: 400px) {
    .main-content { padding: 10px; }
    .hero-avatar { font-size: 60px; }
    .inventory-grid { gap: 8px; }
    .nav-icon { font-size: 18px; }
    .nav-label { font-size: 8px; }
}

/* ==================== ПРИНУДИТЕЛЬНЫЙ ФИКС ШИРИНЫ ==================== */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.main-content {
    width: 100%;
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 15px !important;
    box-sizing: border-box;
}

.card,
.npc-card,
.location-card,
.quest-card,
.habit-item,
.task-item,
.achievement,
.resources-row,
.hero-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ==================== СТРАНИЦА ЛОКАЦИИ ==================== */
.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.back-link:hover {
    color: var(--gold);
    background: var(--bg-card);
}

.location-header {
    text-align: center;
    padding: 25px 20px;
}

.location-big-icon {
    font-size: 80px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

.location-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: var(--gold);
    margin-bottom: 10px;
}

.location-title::before,
.location-title::after {
    display: none;
}

.location-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Карточки действий */
.action-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.action-card:last-child {
    margin-bottom: 0;
}

.action-card:hover {
    border-color: var(--gold-dark);
    transform: translateY(-2px);
}

.action-left {
    flex-shrink: 0;
}

.action-icon-big {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, var(--bg-card) 0%, #151528 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.action-center {
    flex: 1;
    min-width: 0;
}

.action-title {
    font-weight: bold;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.action-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.action-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.target-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.target-badge.monster {
    background: rgba(255, 71, 87, 0.15);
    color: var(--red);
    border: 1px solid var(--red-dark);
}

.target-badge.resource {
    background: rgba(46, 213, 115, 0.15);
    color: var(--green);
    border: 1px solid var(--green-dark);
}

.action-right {
    flex-shrink: 0;
}

.btn-action {
    padding: 12px 16px;
    font-size: 12px;
    white-space: nowrap;
}

/* Инфо-карточка */
.info-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
    border: 1px solid var(--gold-dark);
}

.info-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--gold);
    margin-bottom: 5px;
}

.info-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==================== ПРИВЫЧКИ ==================== */
.habit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.habit-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.habit-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    background: var(--bg-dark);
}

.habit-type-option:hover {
    border-color: var(--text-secondary);
}

.habit-type-option.good.selected {
    border-color: var(--green);
    background: rgba(46, 213, 115, 0.1);
}

.habit-type-option.bad.selected {
    border-color: var(--red);
    background: rgba(255, 71, 87, 0.1);
}

.habit-type-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.habit-type-label {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.habit-type-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Карточка привычки */
.habit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.habit-item:last-child {
    margin-bottom: 0;
}

.habit-item:hover {
    border-color: var(--gold-dark);
}

.habit-item.good.completed {
    border-color: var(--green);
    background: rgba(46, 213, 115, 0.05);
}

.habit-item.good.overdue {
    border-color: var(--red);
    background: rgba(255, 71, 87, 0.05);
}

.habit-left {
    flex-shrink: 0;
}

.habit-status {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.habit-status.done {
    background: rgba(46, 213, 115, 0.2);
}

.habit-status.pending {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.habit-status.overdue {
    background: rgba(255, 71, 87, 0.2);
}

.habit-status.bad {
    background: rgba(255, 71, 87, 0.2);
}

.habit-center {
    flex: 1;
    min-width: 0;
}

.habit-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.habit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

.streak {
    color: var(--gold);
    font-weight: bold;
}

.done-label {
    color: var(--green);
}

.overdue-label {
    color: var(--red);
}

.time-left {
    color: var(--text-secondary);
}

.bad-label {
    color: var(--text-secondary);
    font-style: italic;
}

.habit-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Бейджи */
.badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.badge-green {
    background: rgba(46, 213, 115, 0.2);
    color: var(--green);
}

.badge-red {
    background: rgba(255, 71, 87, 0.2);
    color: var(--red);
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
}

/* Советы */
.tips-card {
    background: linear-gradient(145deg, rgba(155, 89, 182, 0.1) 0%, rgba(155, 89, 182, 0.05) 100%);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.tips-header {
    font-weight: bold;
    font-size: 14px;
    color: #9B59B6;
    margin-bottom: 12px;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tip-item {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 5px;
}

/* ==================== ЗАДАЧИ ==================== */
.task-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Мини-статистика */
.stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.stat-mini-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
}

.stat-mini-item.urgent {
    border-color: var(--red-dark);
    background: rgba(255, 71, 87, 0.1);
}

.stat-mini-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-mini-item.urgent .stat-mini-value {
    color: var(--red);
}

.stat-mini-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Карточка задачи */
.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.task-item:last-child {
    margin-bottom: 0;
}

.task-item:hover {
    border-color: var(--gold-dark);
    transform: translateY(-2px);
}

.task-item.overdue {
    border-color: var(--red);
    background: rgba(255, 71, 87, 0.08);
}

.task-item.urgent {
    border-color: var(--red-dark);
    background: rgba(255, 71, 87, 0.05);
}

.task-item.warning {
    border-color: var(--gold-dark);
    background: rgba(255, 215, 0, 0.05);
}

.task-left {
    flex-shrink: 0;
}

.task-status {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.task-status.normal {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
}

.task-status.warning {
    background: rgba(255, 215, 0, 0.2);
}

.task-status.urgent {
    background: rgba(255, 71, 87, 0.2);
    animation: pulse 1.5s infinite;
}

.task-status.overdue {
    background: rgba(255, 71, 87, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.task-center {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-wrap: break-word;
}

.task-meta {
    font-size: 12px;
}

.task-time.normal {
    color: var(--text-secondary);
}

.task-time.warning {
    color: var(--gold);
}

.task-time.urgent {
    color: var(--red);
    font-weight: bold;
}

.task-time.overdue {
    color: var(--red);
    font-weight: bold;
}

.task-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Золотой бейдж */
.badge-gold {
    background: rgba(255, 215, 0, 0.2);
    color: var(--gold);
}

/* ==================== ВЫБОР СЛОЖНОСТИ ==================== */
.difficulty-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 10px 0;
}

.difficulty-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    background: var(--bg-dark);
}

.difficulty-option:hover {
    border-color: var(--text-secondary);
}

.difficulty-option.easy.selected {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.difficulty-option.medium.selected {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

.difficulty-option.hard.selected {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.difficulty-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.difficulty-label {
    font-weight: bold;
    font-size: 12px;
    color: var(--text-primary);
}

.difficulty-reward {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* Статус задачи по сложности */
.task-status.easy {
    background: rgba(46, 204, 113, 0.2);
}

.task-status.medium {
    background: rgba(241, 196, 15, 0.2);
}

.task-status.hard {
    background: rgba(231, 76, 60, 0.2);
}

/* Награда в карточке задачи */
.task-reward {
    color: var(--gold);
    font-size: 11px;
    font-weight: bold;
}

/* ==================== МОДАЛЬНОЕ ОКНО ДОСТИЖЕНИЙ ==================== */
.achievement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.achievement-modal-content {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    border: 3px solid var(--gold);
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    max-width: 350px;
    width: 90%;
    position: relative;
    animation: achievementPop 0.5s ease;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.3),
        0 0 60px rgba(255, 215, 0, 0.1);
}

@keyframes achievementPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.achievement-modal-icon {
    font-size: 80px;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.achievement-modal-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: var(--gold);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.achievement-modal-name {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.achievement-modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.achievement-modal-close {
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.achievement-modal-close:hover {
    background: var(--gold-light);
    transform: scale(1.05);
}

/* Конфетти/салют */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Искры вокруг иконки */
.sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    animation: sparkle 1.5s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: -40px; left: 0; animation-delay: 0s; }
.sparkle:nth-child(2) { top: -30px; left: 30px; animation-delay: 0.2s; }
.sparkle:nth-child(3) { top: 0; left: 40px; animation-delay: 0.4s; }
.sparkle:nth-child(4) { top: 30px; left: 30px; animation-delay: 0.6s; }
.sparkle:nth-child(5) { top: 40px; left: 0; animation-delay: 0.8s; }
.sparkle:nth-child(6) { top: 30px; left: -30px; animation-delay: 1s; }
.sparkle:nth-child(7) { top: 0; left: -40px; animation-delay: 1.2s; }
.sparkle:nth-child(8) { top: -30px; left: -30px; animation-delay: 1.4s; }

@keyframes sparkle {
    0%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== ВЕРХНЯЯ ПАНЕЛЬ ==================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;  /* было 45px */
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--gold-dark);  /* было 2px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;  /* было 15px */
    z-index: 1000;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;  /* было 10px */
}

.top-bar-name {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 12px;  /* было 14px */
}

.top-bar-level {
    background: var(--gold);
    color: var(--bg-dark);
    padding: 1px 6px;  /* было 2px 8px */
    border-radius: 8px;  /* было 10px */
    font-size: 10px;  /* было 11px */
    font-weight: bold;
}

.top-bar-right {
    display: flex;
    gap: 10px;  /* было 12px */
}

.top-bar-stat {
    font-size: 11px;  /* было 13px */
    font-weight: bold;
}

.top-bar-stat.hp {
    color: var(--red);
}

.top-bar-stat.gold {
    color: var(--gold);
}

/* Полоски статуса под хедером */
.status-bars {
    position: fixed;
    top: 32px;  /* было 45px */
    left: 0;
    right: 0;
    background: var(--bg-dark);
    padding: 4px 12px;  /* было 8px 15px */
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
}

.status-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;  /* было 8px */
    margin-bottom: 3px;  /* было 5px */
}

.status-bar-row:last-child {
    margin-bottom: 0;
}

.bar-label {
    font-size: 9px;  /* было 10px */
    font-weight: bold;
    width: 20px;  /* было 25px */
    color: var(--text-secondary);
}

.bar-container {
    flex: 1;
    height: 8px;  /* было 12px */
    background: var(--bg-card);
    border-radius: 4px;  /* было 6px */
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.bar-container.hp-bar .bar-fill {
    background: linear-gradient(90deg, #e74c3c 0%, #ff6b6b 100%);
    height: 100%;
    border-radius: 3px;  /* было 5px */
    transition: width 0.5s ease;
}

.bar-container.exp-bar .bar-fill {
    background: linear-gradient(90deg, #3498db 0%, #5dade2 100%);
    height: 100%;
    border-radius: 3px;  /* было 5px */
    transition: width 0.5s ease;
}

.bar-value {
    font-size: 9px;  /* было 10px */
    color: var(--text-secondary);
    width: 50px;  /* было 60px */
    text-align: right;
}

/* Корректировка отступа для контента */
.main-content {
    padding-top: 68px;  /* top-bar (32px) + status-bars (~36px) */
    padding-bottom: 80px;
}

/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    border: 3px solid var(--gold);
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    position: relative;
    animation: modalPop 0.4s ease;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes modalPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.modal-content h2 {
    color: var(--gold);
    font-size: 16px;
    margin: 0 0 15px 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ==================== ДОСТИЖЕНИЕ ==================== */
.achievement-modal {
    border-color: var(--gold);
}

.achievement-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: glow 2s ease-in-out infinite;
    pointer-events: none;
    border-radius: 20px;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.achievement-unlocked {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.achievement-big-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.achievement-big-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}

.achievement-big-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.4;
    text-align: center;
    padding: 0 10px;
}

.achievement-big-rewards {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.achievement-big-rewards .reward {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid var(--gold-dark);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==================== LEVEL UP ==================== */
.levelup-modal {
    border-color: #3498db;
    box-shadow: 0 0 50px rgba(52, 152, 219, 0.3);
}

.levelup-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    animation: glow 2s ease-in-out infinite;
    pointer-events: none;
    border-radius: 20px;
}

.levelup-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.new-level {
    font-family: 'Press Start 2P', cursive;
    font-size: 48px;
    color: #3498db;
    text-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
    margin-bottom: 10px;
}

.levelup-text {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.levelup-bonus {
    font-size: 14px;
    color: var(--green);
}

/* ==================== КНОПКИ МОДАЛОК ==================== */
.modal-content .btn {
    width: 100%;
    max-width: 200px;
    padding: 14px 25px;
    font-size: 14px;
    margin-top: 5px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

/* ==================== ГОРОД - МЕНЮ ==================== */
.town-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.town-menu-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.town-menu-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
}

.town-menu-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.town-menu-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.town-menu-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ==================== ЗАНЯТИЯ ==================== */
.activity-card {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.activity-card:hover {
    border-color: var(--gold);
    transform: translateX(5px);
}

.activity-icon {
    font-size: 36px;
    margin-right: 15px;
}

.activity-info {
    flex: 1;
}

.activity-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.activity-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.activity-rewards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.reward-tag {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.activity-time {
    background: var(--bg-dark);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

/* ==================== ЭКРАН ЗАНЯТИЯ ==================== */
.activity-screen {
    text-align: center;
    padding: 20px 0;
}

.activity-header {
    margin-bottom: 30px;
}

.activity-big-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.activity-description {
    color: var(--text-secondary);
    font-size: 14px;
}

.timer-container {
    margin: 40px 0;
}

.timer-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border: 4px solid var(--gold);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.timer-display {
    font-family: 'Press Start 2P', monospace;
    font-size: 32px;
    color: var(--gold);
}

.timer-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.activity-actions {
    margin-top: 30px;
}

/* ==================== РЕЗУЛЬТАТ ЗАНЯТИЯ ==================== */
.result-screen {
    text-align: center;
    padding: 20px 0;
}

.result-header {
    margin-bottom: 30px;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.result-flavor {
    color: var(--text-secondary);
    font-style: italic;
}

.result-rewards {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-rewards h3 {
    margin-bottom: 15px;
    color: var(--gold);
}

.reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--bg-dark);
    border-radius: 10px;
}

.reward-icon {
    font-size: 24px;
}

.reward-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
}

.result-items {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.result-items h4 {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.levelup-notice {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Закрытые локации */
.location-card.locked {
    opacity: 0.6;
    background: var(--bg-tertiary);
}

.location-card.locked .location-icon {
    filter: grayscale(100%);
}