/* =========================================
   1. ПЕРЕМЕННЫЕ И НАСТРОЙКИ (VARIABLES)
   ========================================= */
:root {
    /* Палитра: Темная база */
    --bg-body: #121214;
    --bg-card: #1c1c21;
    --bg-card-hover: #232329;

    /* Текст */
    --text-main: #e1e1e6;
    --text-muted: #a8a8b3;

    /* Брендовые акценты */
    --brand-gradient: linear-gradient(90deg, #8257e5 0%, #d63384 100%);
    --brand-color: #8257e5;
    --brand-hover: #996dff;

    /* Цвета платформ */
    --color-android: #3ddc84;
    --color-ios: #007aff;

    /* UI Параметры */
    --radius-btn: 50px;
    --radius-card: 20px;
    --border-light: 1px solid rgba(255, 255, 255, 0.05);
    --shadow-glow: 0 4px 14px rgba(130, 87, 229, 0.4);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* =========================================
   2. СБРОС И БАЗА (RESET & BASE)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

/* =========================================
   3. ТИПОГРАФИКА (TYPOGRAPHY)
   ========================================= */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    color: #fff;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Градиентный текст для заголовков Hero */
.text-gradient {
    background: linear-gradient(90deg, #fff 0%, #e1e1e6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Fallback для старых браузеров */
@supports not (background-clip: text) {
    .text-gradient {
        background: none;
        color: #fff;
    }
}

/* =========================================
   4. КОМПОНЕНТЫ (UI COMPONENTS)
   ========================================= */

/* --- Container --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(130, 87, 229, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* --- Cards (Universal System) --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: var(--border-light);
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Интерактивная карточка (Hover эффект) */
.card-interactive:hover {
    transform: translateY(-5px);
    border-color: var(--brand-color);
    box-shadow: var(--shadow-hover);
    background: var(--bg-card-hover);
}

/* Мини-карточка (для списков) */
.card-mini {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: background 0.2s ease;
}

.card-mini:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* =========================================
   5. СЕКЦИИ (SECTIONS & LAYOUT)
   ========================================= */

/* Общие отступы секций */
section {
    padding: 80px 0;
}

/* Фоновые модификаторы */
.bg-dark {
    background-color: var(--bg-body);
}

.bg-soft {
    background: rgba(255, 255, 255, 0.02);
}

/* Сетки */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* --- Hero Section --- */
.hero-section {
    padding: 120px 0 100px;
    text-align: center;
    background: radial-gradient(circle at top center, rgba(130, 87, 229, 0.15), transparent 70%);
}

.hero-section h1 {
    margin-bottom: 24px;
}

.hero-section .subtitle {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* --- Feature Cards Specifics --- */
.feature-card h3 {
    color: #fff;
    margin-bottom: 15px;
}

/* --- Steps Section Specifics --- */
.step-card {
    padding: 40px 30px;
}

.step-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 20px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    opacity: 0.9;
}

.steps-cta {
    text-align: center;
    margin-top: 50px;
    font-size: 1.05rem;
}

.steps-cta a {
    color: #fff;
    border-bottom: 1px solid var(--brand-color);
    padding-bottom: 2px;
}

.steps-cta a:hover {
    color: var(--brand-color);
    border-bottom-color: transparent;
}

/* --- Footer --- */
.site-footer {
    padding: 60px 0 40px;
    text-align: center;
    border-top: var(--border-light);
    margin-top: 40px;
}

.site-footer h3 {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: var(--text-muted);
    margin: 0 10px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--brand-color);
}

/* =========================================
   6. СТРАНИЦА ГАЙДОВ (GUIDES SPECIFIC)
   ========================================= */

/* Навигация */
.simple-nav {
    padding: 20px 0;
    border-bottom: var(--border-light);
}

.nav-back {
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.8;
}

.nav-back:hover {
    opacity: 1;
    color: var(--brand-color);
}

/* Hero гайдов */
.guide-hero {
    padding: 60px 0 80px;
    text-align: center;
}

/* Выбор платформы */
.platform-selector {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 160px;
    text-decoration: none;
    /* Сброс подчеркивания ссылки */
}

.platform-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.platform-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
}

/* Контент гайдов */
.guide-section {
    border-top: var(--border-light);
}

.guide-content {
    max-width: 800px;
    margin: 0 auto;
}

.guide-intro {
    text-align: left !important;
    margin-bottom: 40px;
}

.instruction-step {
    margin-bottom: 40px;
    padding-left: 20px;
    border-left: 2px solid var(--brand-color);
}

/* Мобильные сценарии */
.platform-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.android-color {
    color: var(--color-android);
}

.ios-color {
    color: var(--color-ios);
}

/* Сетка сценариев */
.scenario-grid {
    margin-top: 20px;
}

.scenario-card ul {
    padding-left: 20px;
    color: var(--text-muted);
}

.scenario-card ul li {
    margin-bottom: 8px;
}

.scenario-card.warning {
    border-color: rgba(255, 100, 100, 0.3);
}

/* Troubleshooting highlight */
.trouble-item.highlight {
    background: rgba(130, 87, 229, 0.1);
    border: 1px solid rgba(130, 87, 229, 0.3);
}

/* =========================================
   7. АДАПТИВНОСТЬ (MEDIA QUERIES)
   ========================================= */
@media (max-width: 768px) {

    /* Typography adjust */
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 2rem !important;
    }

    /* Layout adjust */
    .hero-section,
    .guide-hero {
        padding: 80px 0 60px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Components adjust */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    /* Guides adjust */
    .platform-card {
        width: 100%;
        height: auto;
        padding: 30px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 20px;
    }

    .platform-icon {
        margin-bottom: 0;
        font-size: 2rem;
    }
}