/* ==========================================================================
   Стили оформления веб-сайта «Ази: Энциклопедия карточной игры»
   Тематика: Тёмное игровое сукно, золотые акценты, glassmorphic элементы.
   ========================================================================== */

/* --- Базовые переменные и цветовая палитра --- */
:root {
    --bg-dark: #09130d;
    --bg-felt: #0d2316;
    --panel-bg: rgba(18, 43, 28, 0.75);
    --panel-border: rgba(212, 175, 55, 0.25);
    --accent-gold: #d4af37;
    --accent-gold-light: #f3cf65;
    --accent-green: #2ecc71;
    --accent-red: #e74c3c;
    --text-main: #e8f5e9;
    --text-muted: #a3c2ab;
    --text-heading: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-radius: 12px;
    --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* --- Сброс стилей и базовые параметры --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(20, 60, 38, 0.6) 0%, transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(13, 35, 22, 0.8) 0%, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

/* --- Сеточные контейнеры --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.margin-top-sm { margin-top: 12px; }
.margin-top-md { margin-top: 24px; }

/* --- Эффект стеклянной панели (Glassmorphism) --- */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--shadow-glow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(212, 175, 55, 0.45);
}

/* --- Типографика --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    line-height: 1.3;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

h3 {
    font-size: 1.4rem;
    color: var(--accent-gold-light);
    margin-bottom: 12px;
}

p {
    margin-bottom: 14px;
    color: var(--text-main);
}

strong {
    color: #ffffff;
}

/* --- Шапка сайта --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 19, 13, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--panel-border);
    padding: 16px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--accent-gold);
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 1px;
    display: flex;
    flex-direction: column;
}

.logo-text small {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--accent-gold);
}

/* --- Кнопки --- */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-heading);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f3cf65, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-heading);
    border: 1px solid var(--panel-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-gold);
}

.btn-gold {
    background: var(--accent-gold);
    color: #0d2316;
    font-weight: 700;
}

.btn-gold:hover {
    background: var(--accent-gold-light);
    transform: scale(1.03);
}

/* --- Бейджи --- */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-gold {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

/* --- Hero Секция --- */
.hero-section {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 20px 0 30px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid var(--panel-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-img:hover {
    transform: scale(1.03);
}

/* Показатели под Hero */
.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.stat-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Блоки контента --- */
.content-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-subtitle {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.feature-box {
    text-align: center;
}

.box-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

/* --- Секция правил --- */
.rules-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.step-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--border-radius);
    padding: 20px;
    border-left: 4px solid var(--accent-gold);
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--accent-gold);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-hierarchy {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-gold-light);
    letter-spacing: 2px;
    margin: 10px 0;
}

.highlight-block {
    background: rgba(212, 175, 55, 0.08);
    border: 1px dashed var(--accent-gold);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

/* --- Симулятор и Калькулятор --- */
.widget-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sim-trump-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sim-hands-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.sim-player {
    background: rgba(255, 255, 255, 0.05);
    padding: 14px;
    border-radius: 8px;
    text-align: center;
}

.card-hand {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 8px;
    letter-spacing: 3px;
}

.sim-result {
    padding: 14px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--accent-green);
    border-radius: 8px;
    color: var(--accent-green);
    font-weight: 600;
    text-align: center;
}

.calc-form .form-group {
    margin-bottom: 16px;
}

.calc-form label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.calc-form input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    color: #fff;
    font-size: 1rem;
}

.calc-form input[type="range"] {
    width: 80%;
    vertical-align: middle;
}

.range-val {
    margin-left: 10px;
    font-weight: bold;
    color: var(--accent-gold);
}

.calc-result-box {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.calc-res-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.calc-res-item strong {
    color: var(--accent-gold-light);
    font-size: 1.2rem;
}

/* --- Секция приложений --- */
.app-filter-notice {
    margin-bottom: 30px;
    border-left: 4px solid var(--accent-gold);
}

.main-app-card {
    position: relative;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
}

.main-app-badge {
    position: absolute;
    top: -14px;
    left: 28px;
    background: var(--accent-gold);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 14px;
    border-radius: 12px;
}

.app-card-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.app-platforms {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--accent-gold);
    margin-top: 4px;
}

.app-store-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-store {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
}

.store-svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.btn-google-play:hover {
    background: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
    color: #2ecc71;
}

.btn-app-store:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: #3498db;
    color: #3498db;
}

.app-features-list {
    margin-top: 16px;
}

.feature-item {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.app-stats-side {
    border-left: 1px solid var(--panel-border);
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-rating-box {
    text-align: center;
    margin-bottom: 20px;
}

.rating-val {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
}

.rating-stars {
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin: 6px 0;
}

.rating-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.review-quote {
    font-size: 0.85rem;
    font-style: italic;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
    border-left: 3px solid var(--accent-gold);
}

.app-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--accent-gold);
}

.filtered-apps-box {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--accent-red);
}

.filtered-apps-box h4 {
    color: var(--accent-red);
    margin-bottom: 10px;
}

.filtered-apps-box ul {
    list-style-position: inside;
    font-size: 0.9rem;
}

/* --- Секция сложности и шкалы навыков --- */
.skill-bars {
    margin-top: 20px;
}

.bar-item {
    margin-bottom: 16px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.bar-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f3cf65);
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

.strategy-list {
    list-style: none;
    margin-top: 14px;
}

.strategy-list li {
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 3px solid var(--accent-gold);
}

/* --- Секция Квиза --- */
.quiz-question {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-heading);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.quiz-opt-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 14px 20px;
    border-radius: 8px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-opt-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-gold);
}

.quiz-opt-btn.correct {
    background: rgba(46, 204, 113, 0.25) !important;
    border-color: var(--accent-green) !important;
    color: #fff;
}

.quiz-opt-btn.incorrect {
    background: rgba(231, 76, 60, 0.25) !important;
    border-color: var(--accent-red) !important;
    color: #fff;
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--panel-border);
    padding-top: 16px;
    color: var(--text-muted);
}

.quiz-result-screen {
    text-align: center;
    padding: 30px 0;
}

/* --- Подвал сайта --- */
.site-footer {
    background: #050c08;
    border-top: 1px solid var(--panel-border);
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Адаптивность под мобильные устройства --- */
@media (max-width: 902px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-card-grid {
        grid-template-columns: 1fr;
    }

    .app-stats-side {
        border-left: none;
        border-top: 1px solid var(--panel-border);
        padding-left: 0;
        padding-top: 20px;
    }

    .header-container {
        flex-direction: column;
        gap: 12px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
