:root {
    /* Мягкая темная палитра (как в iOS/Android) */
    --bg: #121214;
    --surface: #1C1C1F;
    --surface-hover: #252529;
    --text: #E1E1E6;
    --text-dim: #A8A8B3;
    
    /* Динамический акцент (по умолчанию - теплый оранжево-красный, он лучше конвертит, чем чистый красный) */
    --accent: #FF453A;
    --accent-glow: rgba(255, 69, 58, 0.3);
    
    --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Утилиты */
.clip-angle {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 95% 100%, 0 100%);
}

/* Типографика */
h1, h2, h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
    color: var(--text);
}

.tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Кнопки с четким акцентом и свечением */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 32px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.btn-accent {
    background: var(--accent);
    color: #000;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 95% 100%, 0 100%);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-accent:hover, .btn-accent:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.1);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--surface-hover);
    clip-path: polygon(0 0, 100% 0, 100% 80%, 95% 100%, 0 100%);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn.small {
    padding: 12px 20px;
    font-size: 12px;
    width: auto;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 20, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.logo {
    font-size: 18px;
    letter-spacing: 0.1em;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text);
}
.logo span { color: var(--accent); transition: color 0.3s; }
.user-menu { display: flex; align-items: center; gap: 12px; }
.user-name {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

/* Контейнер */
.container {
    width: 100%;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Секции */
.section-block { padding: 60px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-header h2 { font-size: 28px; }
.section-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

/* Формы и инпуты (исправлен контраст) */
.input-group { margin-bottom: 24px; }
.input-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.input-group input, .input-group select {
    width: 100%;
    background: var(--surface);
    border: 2px solid transparent;
    color: var(--text);
    padding: 16px;
    font-size: 16px;
    font-family: var(--font-main);
    font-weight: 600;
    border-radius: var(--radius);
    outline: none;
    transition: all 0.3s ease;
}
.input-group input::placeholder { color: #55555A; }
.input-group input:focus, .input-group select:focus {
    border-color: var(--accent);
    background: var(--surface-hover);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Выбор вида спорта с динамическим цветом */
.sport-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.sport-option { cursor: pointer; position: relative; }
.sport-option input { display: none; }
.sport-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 20px 10px;
    transition: all 0.3s ease;
    height: 100%;
}
.sport-code {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    transition: all 0.3s ease;
}
.sport-name {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-top: 8px;
    transition: all 0.3s ease;
}
/* Активное состояние карточки спорта */
.sport-option input:checked + .sport-card,
.sport-option.active .sport-card {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 20px var(--accent-glow);
}
.sport-option input:checked + .sport-card .sport-code,
.sport-option.active .sport-card .sport-code {
    color: var(--accent);
}
.sport-option input:checked + .sport-card .sport-name,
.sport-option.active .sport-card .sport-name {
    color: var(--text);
}

/* Выбор пакета */
.package-selector { display: grid; grid-template-columns: 1fr; gap: 16px; }
.package-option { cursor: pointer; position: relative; }
.package-option input { display: none; }
.package-card {
    background: var(--surface);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 24px 20px;
    transition: all 0.3s ease;
}
.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.package-name { font-size: 14px; font-weight: 800; letter-spacing: 0.05em; }
.package-price { font-family: var(--font-mono); font-size: 24px; font-weight: 900; color: var(--accent); transition: color 0.3s; }
.package-features { list-style: none; }
.package-features li {
    font-size: 13px;
    color: var(--text-dim);
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
}
.package-features li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 10px;
    transition: background 0.3s;
}
.package-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent);
    color: #000;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.1em;
    transition: background 0.3s;
}
.package-option input:checked + .package-card,
.package-option.active .package-card {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

/* Карточки заказов и галерей */
.orders-grid, .galleries-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.order-card, .gallery-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 24px 20px;
    transition: all 0.3s ease;
}
.order-card:hover, .gallery-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.order-top { display: flex; justify-content: space-between; margin-bottom: 16px; }
.order-sport {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent);
    transition: color 0.3s;
}
.order-status {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.order-status.confirmed { background: var(--accent); color: #000; }
.order-card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 800; }
.order-meta { font-size: 14px; color: var(--text-dim); margin-bottom: 4px; }
.order-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.05em; margin-bottom: 20px; }
.order-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}
.order-price { font-family: var(--font-mono); font-size: 22px; font-weight: 900; }

/* Статистика */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 40px; }
.stat-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
}
.stat-num { display: block; font-size: 28px; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 8px; transition: color 0.3s; }
.stat-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.15em; color: var(--text-dim); }

/* Авторизация */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-page main { flex: 1; display: flex; align-items: center; padding: 40px 0; }
.auth-form {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}
.auth-form h1 { font-size: 32px; margin-bottom: 12px; }
.auth-subtitle { color: var(--text-dim); font-size: 14px; margin-bottom: 32px; }
.auth-error { color: var(--accent); font-family: var(--font-mono); font-size: 12px; margin-top: 16px; min-height: 20px; text-align: center; }
.auth-link { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-dim); }
.auth-link a { color: var(--accent); text-decoration: none; font-weight: 700; }

/* Лоадер */
.btn-loader {
    display: none; width: 18px; height: 18px;
    border: 3px solid rgba(0,0,0,0.2); border-top-color: #000;
    border-radius: 50%; animation: spin 0.6s linear infinite; margin: 0 auto;
}
.btn.loading .btn-text { display: none; }
.btn.loading .btn-loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Пустые состояния */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
}
.empty-icon { font-size: 40px; display: block; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: 0.05em; }

/* =========================================
   СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ (index.html)
   ========================================= */
.hero {
    min-height: 85dvh;
    display: flex;
    align-items: center;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #1a1a1e;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(18, 18, 20, 1) 0%,
        rgba(18, 18, 20, 0.9) 20%,
        rgba(18, 18, 20, 0.7) 40%,
        rgba(18, 18, 20, 0.4) 60%,
        rgba(18, 18, 20, 0.1) 80%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}
.hero h1 { font-size: clamp(36px, 10vw, 64px); margin-bottom: 16px; }
.hero .subtitle { font-size: 16px; color: var(--text-dim); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.trust-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 32px;
}
.trust-row span::before { content: "■ "; color: var(--accent); font-size: 8px; vertical-align: middle; }

.steps { display: flex; flex-direction: column; gap: 20px; }
.step {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: var(--radius);
}
.step-num { font-family: var(--font-mono); font-size: 14px; color: var(--accent); display: block; margin-bottom: 12px; font-weight: 700; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14px; }

footer { padding: 40px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); text-align: center; }
.footer-grid { display: flex; flex-direction: column; gap: 32px; margin-bottom: 32px; text-align: left; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-bottom: 16px; letter-spacing: 0.1em; }
.footer-grid a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; display: block; margin-bottom: 12px; }
.footer-grid a:hover { color: var(--accent); }
.copy { font-family: var(--font-mono); font-size: 11px; color: #55555A; }

/* =========================================
   DESKTOP ENHANCEMENTS
   ========================================= */
@media (min-width: 768px) {
    .header { padding: 20px 40px; }
    .logo { font-size: 22px; }
    .container { padding: 0 40px; }
    
    .section-block { padding: 100px 0; }
    .section-header h2 { font-size: 42px; }
    
    .btn { width: auto; }
    
    .sport-selector { grid-template-columns: repeat(3, 1fr); }
    .package-selector { grid-template-columns: repeat(3, 1fr); }
    
    .orders-grid, .galleries-grid { grid-template-columns: repeat(2, 1fr); }
    
    .stats { gap: 20px; }
    .stat-card { padding: 24px; }
    .stat-num { font-size: 40px; }
    
    .auth-form { padding: 48px; }
    .auth-form h1 { font-size: 42px; }
    
    .steps { flex-direction: row; }
    .step { flex: 1; }
    
    .trust-row { flex-direction: row; gap: 32px; justify-content: center; }
    .footer-grid { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (min-width: 1024px) {
    .orders-grid, .galleries-grid { grid-template-columns: repeat(3, 1fr); }
}
