* {
    box-sizing: border-box;
}

/* iOS: убираем синий цвет ссылок и системный стиль кнопок */
a {
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}
button {
    -webkit-appearance: none;
    appearance: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --accent-color: #c0152a;
    --accent-hover: #a01020;
    --bg-dark: #f2f3f5;
    --bg-card: #ffffff;
    --bg-option: #f0f2f4;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.08);
}

body, html {
    margin: 0; padding: 0;
    background-color: var(--bg-dark);
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

/* --- НАВИГАЦИЯ (светлая) --- */
.navbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 5%;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-btn {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 6px;
    transition: 0.3s;
    margin-left: 12px;
    border: 1px solid #d0d0d0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    min-width: 120px;
}

.navbar .nav-btn {
    margin-left: 12px;
}

.nav-btn:hover {
    background: #f4f4f4;
    border-color: #bbb;
}

.nav-btn.register {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

.nav-btn.register:hover {
    background-color: #a01020;
    border-color: #a01020;
    transform: translateY(-2px);
}

/* --- HERO SECTION --- */
.hero-wrap {
    overflow: hidden;
    border-bottom: 1px solid #e0e0e0;
}

.hero {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #1c1c1c;
}

/* Фото — вписываем целиком, выравниваем вправо */
.hero-bg-img {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: auto;
    max-width: 72%;
    object-fit: contain;
    object-position: right center;
    z-index: 0;
    display: block;
}

/* Цветной fade поверх стыка — #1c1c1c → прозрачный.
   Перекрывает жёсткий край фото, создаёт чистый переход */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        #1c1c1c 0%,
        #1c1c1c 30%,
        rgba(28,28,28,0.95) 36%,
        rgba(28,28,28,0.70) 44%,
        rgba(28,28,28,0.30) 52%,
        rgba(28,28,28,0.05) 60%,
        transparent 68%
    );
    z-index: 2;
    pointer-events: none;
}

/* Текстовая колонка */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 540px;
    padding: 70px 0 60px 6%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Бейдж */
.line-badge {
    display: inline-block;
    background: rgba(192,21,42,0.18);
    border: 1px solid rgba(192,21,42,0.45);
    color: #ff6b7a;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
    width: fit-content;
}

.line-main {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.0;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: -1.5px;
    color: #ffffff;
}

.line-sub {
    font-size: 16px;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    margin-bottom: 24px;
}

.event-date {
    display: inline-block;
    background: rgba(255,255,255,0.07);
    padding: 10px 20px;
    border-left: 4px solid var(--accent-color);
    font-size: 15px;
    margin-bottom: 32px;
    color: rgba(255,255,255,0.85);
}

.hero-prizes-count {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 8px;
}
.hero-prize-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-prize-num {
    font-size: 42px;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
}
.hero-prize-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}
.hero-prize-divider {
    width: 1px;
    height: 50px;
    background: rgba(255,255,255,0.2);
}

/* --- СЕКЦИЯ ПЛАНОВ --- */
.plans-section {
    padding: 60px 15px;
    background: var(--bg-dark);
}
.container { max-width: 1200px; margin: 0 auto; }

.plans-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 36px;
}
.plans-title {
    font-size: 52px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.05;
}
.plans-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: right;
    margin: 0;
    max-width: 200px;
    line-height: 1.6;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.plan-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 28px 32px;
    cursor: pointer;
    position: relative;
    border: 3px solid transparent;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    user-select: none;
}
.plan-card input[type="radio"] {
    display: none;
}
.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}
.plan-card.selected {
    border-color: #c0152a;
    box-shadow: 0 4px 20px rgba(192,21,42,0.12);
    transform: translateY(-2px);
}

.plan-badge {
    position: absolute;
    top: 0;
    right: 20px;
    background: #aaff00;
    color: #000000;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 0 0 12px 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.plan-badge--best {
    background: #aaff00;
}

.plan-top {
    margin-bottom: 22px;
}
.plan-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 6px;
}
.plan-desc {
    font-size: 13px;
    color: #999;
    line-height: 1.4;
}

.plan-price {
    margin-bottom: 10px;
    line-height: 1;
    white-space: nowrap;
}
.plan-amount {
    font-size: 52px;
    font-weight: 900;
    color: #111111;
    letter-spacing: -2px;
}
.plan-currency {
    font-size: 20px;
    font-weight: 700;
    color: #555;
    vertical-align: super;
    line-height: 1;
}
.plan-tickets {
    font-size: 14px;
    color: #777;
    margin-top: 6px;
}

/* --- ПАНЕЛЬ ЗАКАЗА --- */
.plans-order-bar {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 22px 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
}
.plans-qty {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.plans-qty-label {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    white-space: nowrap;
}
.plans-order-bar .quantity-selector {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    width: auto;
    margin-top: 0;
}
/* Более специфичный селектор, чтобы перебить .quantity-selector .manual-input */
.plans-order-bar .quantity-selector .manual-input {
    color: #ffffff !important;
    width: 52px;
}
.plans-order-bar .qty-btn {
    color: rgba(255,255,255,0.7);
}
.plans-order-bar .qty-btn:hover {
    background: rgba(255,255,255,0.1);
}

.plans-order-group {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}
.plans-total-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.plans-total-label {
    color: rgba(255,255,255,0.5);
    font-size: 15px;
    white-space: nowrap;
}
.plans-total-stickers {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}
.plans-total-sep {
    font-size: 15px;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
}
.plans-total-num {
    font-size: 26px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.plans-submit {
    width: auto;
    white-space: nowrap;
    padding: 16px 40px;
    font-size: 16px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* --- СТАРЫЕ КЛАССЫ (не используются, оставлены для совместимости) --- */
.selection-section { padding: 40px 15px; }
.selection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }

.car-card { 
    background: var(--bg-card); 
    border-radius: 20px; 
    overflow: hidden; 
    display: flex; flex-direction: column;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: 0.3s;
}

.car-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.car-card.wide {
    grid-column: 1 / -1;
    margin-bottom: 30px;
    flex-direction: row;
    background: #111111;
    border-color: #222;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.car-card.wide:hover {
    transform: none;
    border-color: var(--accent-color);
}
.car-card.wide .car-image {
    flex: 0 0 52%;
    max-width: 52%;
    position: relative;
    overflow: hidden;
}
.car-card.wide .car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.car-card.wide .car-info {
    flex: 1;
    justify-content: center;
    background: #111111;
    border-left: 1px solid rgba(255,255,255,0.06);
}

/* Текст внутри тёмной карточки */
.car-card.wide .car-title {
    color: #ffffff;
    font-size: 22px;
}
.car-card.wide .option-btn {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}
.car-card.wide .option-btn.selected {
    background: rgba(192,21,42,0.15);
    border-color: var(--accent-color);
}
.car-card.wide .opt-title {
    color: #ffffff;
}
.car-card.wide .opt-desc {
    color: rgba(255,255,255,0.45);
}
.car-card.wide .radio-custom {
    border-color: rgba(255,255,255,0.3);
}
.car-card.wide .quantity-selector {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}
.car-card.wide .manual-input {
    color: #ffffff;
}
.car-card.wide .qty-btn {
    color: var(--accent-color);
}
.car-card.wide .total-row {
    border-top: 1px solid rgba(255,255,255,0.08);
}
.car-card.wide .total-row > span:first-child {
    color: rgba(255,255,255,0.6);
}
.car-card.wide .total-sum {
    color: #ffffff;
}
.car-image img { width: 100%; height: auto; display: block; }
.car-info { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.car-title { color: var(--accent-color); font-size: 24px; margin-bottom: 15px; font-weight: 700; }

.option-btn {
    display: flex; align-items: center; background: var(--bg-option);
    padding: 14px; border-radius: 12px; margin-bottom: 10px; cursor: pointer;
    border: 2px solid transparent; transition: 0.2s;
}
.option-btn.selected { border-color: var(--accent-color); background: #fff3e8; }
.option-btn input { display: none; }
.option-content { flex-grow: 1; }
.opt-title { display: block; font-size: 14px; font-weight: 700; }
.opt-desc { display: block; font-size: 11px; color: #777; }

.radio-custom { width: 18px; height: 18px; border: 2px solid #ccc; border-radius: 50%; margin-left: 10px; position: relative; box-sizing: border-box; }
.option-btn.selected .radio-custom { background-color: var(--accent-color); border-color: var(--accent-color); }

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-option);
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 2px;
    margin-top: 10px;
    width: 100%;
    justify-content: space-between;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--accent-color);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.qty-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.quantity-selector .manual-input {
    flex-grow: 1;
    text-align: center;
    background: transparent;
    border: none;
    margin-top: 0;
    padding: 8px;
    font-weight: 700;
    font-size: 18px;
    width: 60px;
    color: var(--text-primary);
}
/* Скрытие стрелок у number input */
.manual-input::-webkit-outer-spin-button,
.manual-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.manual-input[type=number] {
    -moz-appearance: textfield;
}
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-top: 20px; }
.total-sum { font-size: 26px; font-weight: 900; }
.btn-submit { display: block; width: 100%; background: var(--accent-color); color: #ffffff; border: none; padding: 18px; border-radius: 10px; font-weight: 700; font-size: 18px; cursor: pointer; text-transform: uppercase; transition: 0.3s; }
.btn-submit:hover { background-color: #a01020; filter: brightness(1.1); }

/* Кнопка в панели заказа — не на всю ширину */
.plans-order-bar .btn-submit {
    width: auto;
    flex: 0 0 auto;
    padding: 16px 48px;
    border-radius: 12px;
    font-size: 16px;
}

/* --- БЛОК ГАРАНТИРОВАННЫХ ПОДАРКОВ --- */
.prizes-section { padding: 40px 15px 20px 15px; }
.prizes-wrapper {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.prizes-image { flex: 0 0 50%; max-width: 50%; }
.prizes-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prizes-info {
    flex: 1;
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}
.prizes-badge {
    display: inline-block;
    background: rgba(243, 166, 97, 0.15);
    border: 1px solid rgba(243, 166, 97, 0.4);
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    width: fit-content;
}
.prizes-big-num {
    font-size: 120px;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -4px;
}
.prizes-device {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-transform: uppercase;
}
.prizes-colors {
    font-size: 16px;
    font-weight: 400;
    color: #666;
    color: #888;
    text-transform: none;
}
.prizes-divider {
    width: 48px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
    margin-bottom: 20px;
}
.prizes-condition {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 24px 0;
}
.prizes-condition strong { color: #1a1a1a; }
.prizes-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}
.prizes-tip-icon {
    color: var(--accent-color);
    font-size: 14px;
}

/* --- БЛОК ДОПОЛНИТЕЛЬНЫХ ПРИЗОВ --- */
.extra-prizes-section { padding: 0 0 80px 0; }

/* Сплит-баннер: текст слева, фото справа */
.extra-split {
    display: flex;
    align-items: stretch;
    background: #1c1c1c;
    min-height: 280px;
    margin-bottom: 48px;
    overflow: hidden;
}
.extra-split-text {
    flex: 0 0 44%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 48px 48px 5%;
    gap: 16px;
}
.extra-split-count {
    display: flex;
    align-items: center;
    gap: 14px;
}
.extra-split-num {
    font-size: 96px;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
    letter-spacing: -4px;
}
.extra-split-word {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}
.extra-split-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
    max-width: 320px;
    margin: 0;
}
.extra-split-img-wrap {
    flex: 1;
    width: 0;
    position: relative;
    overflow: hidden;
}
.extra-split-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}


/* Топ-3 — горизонтальная полоса с большими номерами */
.extra-top3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.extra-top3-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-left: 3px solid var(--accent-color);
    border-radius: 14px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}
.extra-top3-card:hover { box-shadow: 0 4px 20px rgba(192,21,42,0.1); }
.extra-top3-num {
    font-size: 40px;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
    letter-spacing: -2px;
    opacity: 0.85;
}
.extra-top3-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

/* Нумерованный список призов — 4 колонки */
.extra-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    counter-reset: prize-counter 3;
}
.extra-list li {
    counter-increment: prize-counter;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #eeeeee;
    font-size: 13px;
    color: #444;
    line-height: 1.35;
}
.extra-list li::before {
    content: counter(prize-counter) ".";
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-color);
    padding-top: 1px;
}

/* --- НАВБАР: логотип и группировка ссылок --- */
.nav-brand {
    text-decoration: none;
    margin-right: auto;
    display: flex;
    align-items: center;
}
.nav-logo {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
}
.nav-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.nav-logo-text {
    font-size: 18px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -0.3px;
    text-transform: uppercase;
}
.nav-brand-text {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-color);
    letter-spacing: 1px;
    margin-left: 10px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-username {
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

/* --- АВТОРИЗАЦИЯ --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 80px);
    padding: 60px 20px;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.auth-back {
    display: inline-block;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 24px;
    transition: color 0.2s;
}
.auth-back:hover { color: var(--accent-color); }
.auth-hint { font-size: 13px; color: #888; margin: -8px 0 20px; line-height: 1.5; }
.auth-pending-notice { background: #fff8f0; border: 1px solid rgba(192,21,42,0.3); border-radius: 10px; padding: 12px 16px; font-size: 14px; color: #c0152a; margin-bottom: 20px; line-height: 1.5; }
.confirm-order-box { background: #f7f8fa; border: 1px solid #e8e8e8; border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.confirm-order-row { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid #ebebeb; }
.confirm-order-row:last-child { border-bottom: none; }
.confirm-order-label { font-size: 13px; color: #888; }
.confirm-order-value { font-size: 15px; font-weight: 600; color: #111; }
.confirm-order-price { font-size: 20px; color: var(--accent-color); }
.auth-title {
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 28px 0;
}
.auth-error {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
.auth-success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    font-weight: 600;
}
.form-required { color: var(--accent-color); }
.form-input {
    background: #ffffff;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    color: #111;
    font-size: 15px;
    font-family: inherit;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.form-input::placeholder { color: #aaa; }
.form-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(192,21,42,0.08);
}
.form-agree {
    margin-top: 4px;
}
.agree-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    line-height: 1.4;
}
.agree-checkbox { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent-color); }
.btn-auth {
    display: block;
    width: 100%;
    background: var(--accent-color);
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: inherit;
    color: #ffffff;
    transition: 0.3s;
    margin-top: 4px;
}
.btn-auth:hover { background-color: #a01020; filter: brightness(1.1); }
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #666;
}
.auth-link { color: var(--accent-color); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-forgot { text-align: center; margin-top: 8px; font-size: 14px; }
.auth-subtitle { color: #888; font-size: 14px; margin-bottom: 20px; line-height: 1.5; }

/* Яндекс OAuth кнопка */
.btn-yandex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    background: #f7f8fa;
    color: #000;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 4px;
}
.btn-yandex:hover { background: #eeeff1; border-color: #ccc; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 16px;
    color: #555;
    font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}
.auth-divider span { white-space: nowrap; }

/* --- ПОДВАЛ --- */
.footer { background-color: #0c0c0c; padding: 60px 5%; border-top: 1px solid #222; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px 40px; }
.footer-link { color: #888; text-decoration: none; font-size: 14px; transition: 0.3s; }
.footer-link:hover { color: var(--accent-color); }
.footer-info { color: #555; font-size: 14px; line-height: 1.6; }

/* --- ЛИЧНЫЙ КАБИНЕТ --- */
.cabinet-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 5%;
}

.cabinet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.user-welcome h1 {
    font-size: 32px;
    font-weight: 900;
    margin: 0;
}

.user-welcome p {
    color: var(--text-secondary);
    margin: 5px 0 0 0;
}

/* Блок соцсетей в кабинете */
.cabinet-socials { margin-bottom: 32px; }
.socials-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #666; margin-bottom: 12px; }
.socials-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.social-item { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--bg-card); border: 1px solid #e0e0e0; border-radius: 16px; }
.social-item.social-soon { opacity: 0.55; }
.social-item.social-telegram { border-color: rgba(0,136,204,0.4); background: rgba(0,136,204,0.06); }
.social-icon { flex-shrink: 0; }
.social-info { flex: 1; min-width: 0; }
.social-name { font-size: 14px; font-weight: 700; color: #111; }
.social-status { font-size: 11px; font-weight: 600; margin-top: 2px; }
.social-status--available { color: #0088cc; }
.social-status--soon { color: #777; }
.social-btn--connect { background: transparent; border: 1px solid #0088cc; color: #0088cc; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.social-btn--connect:hover { background: #0088cc; color: #fff; }
.social-badge-soon { flex-shrink: 0; font-size: 11px; font-weight: 700; color: #777; border: 1px solid #ddd; border-radius: 6px; padding: 4px 8px; white-space: nowrap; }
@media (max-width: 768px) { .socials-list { grid-template-columns: 1fr; } }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 36px;
    font-weight: 900;
    color: var(--accent-color);
}

.stat-desc {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.cabinet-sections {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

/* Блок данных пользователя */
.user-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.user-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 11px 0;
    border-bottom: 1px solid #272727;
    gap: 12px;
}
.user-info-row:last-of-type { border-bottom: none; }
.uinfo-label {
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}
.uinfo-value {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-align: right;
    word-break: break-all;
}
.uinfo-accent {
    color: var(--accent-color);
    font-weight: 700;
}
.uinfo-edit-btn {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.uinfo-edit-btn .nav-btn {
    margin-left: 0;
    width: 100%;
    box-sizing: border-box;
}

.cabinet-block {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.block-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 25px;
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 15px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-option);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.order-item:hover {
    border-color: #444;
}

.order-main {
    display: flex;
    flex-direction: column;
    flex: 1; /* Занимает всё свободное место */
}

.order-info {
    text-align: right;
    min-width: 100px; /* Фиксированная область для цены */
    margin-right: 40px; /* Отступ от статуса */
    font-size: 18px;
}

.order-id {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.order-tickets {
    font-weight: 700;
    font-size: 15px;
    color: #111;
}

.order-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 130px;
    margin-right: 0;
    font-size: 14px;
}

.order-info strong {
    color: #555;
    font-size: 13px;
    font-weight: 600;
}

.order-amount {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-color);
}

.order-date {
    font-size: 12px;
    color: #888;
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-win { background: rgba(76, 175, 80, 0.1); color: #4caf50; }
.status-pending { background: rgba(243, 166, 97, 0.1); color: var(--accent-color); }

/* Нижний блок кнопок истории */
.orders-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #eeeeee;
}

.btn-all-orders {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.2s;
}
.btn-all-orders:hover { opacity: 0.75; }

.btn-archive {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}
.btn-archive:hover { color: #999; }

/* Страница всех заказов */
.orders-page { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.orders-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.orders-page-header h1 { font-size: 24px; margin: 0; }
.orders-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}
.orders-summary-item { display: flex; flex-direction: column; gap: 4px; }
.orders-summary-num { font-size: 22px; font-weight: 700; color: var(--accent-color); }
.orders-summary-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

.orders-full-list { display: flex; flex-direction: column; gap: 12px; }

.order-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid #222;
    transition: border-color 0.2s;
}
.order-row:hover { border-color: #444; }
.order-row-left { display: flex; flex-direction: column; gap: 5px; }
.order-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

.order-row-tickets { font-size: 15px; font-weight: 700; }
.order-row-meta { font-size: 12px; color: #777; }
.order-row-car { font-size: 13px; color: #bbb; }
.order-row-price { font-size: 16px; font-weight: 700; color: var(--accent-color); }
.order-row-posters { font-size: 12px; color: #888; }

.orders-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}
.orders-empty a { color: var(--accent-color); }

/* Архив */
.archive-contest-group { margin-bottom: 36px; }
.archive-contest-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #222;
}
.archive-contest-title.current { color: var(--accent-color); }

/* ================================
   Детали заказа / скачивание
   ================================ */
.order-detail-page {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}
.order-detail-header { margin-bottom: 24px; }
.order-detail-back {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.order-detail-back:hover { text-decoration: underline; }

.order-detail-status {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(76,175,80,0.08);
    border: 1px solid rgba(76,175,80,0.3);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.order-detail-status-icon {
    width: 44px;
    height: 44px;
    background: #4caf50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}
.order-detail-status-title { font-size: 18px; font-weight: 800; }
.order-detail-status-sub { font-size: 13px; color: #888; margin-top: 2px; }

.order-detail-box {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
}
.order-detail-box-title {
    font-size: 15px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #222;
}
.order-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #1a1a1a;
}
.order-detail-row:last-child { border-bottom: none; }
.order-detail-label { color: #888; font-size: 14px; }
.order-detail-value { font-weight: 600; font-size: 15px; text-align: right; }
.order-detail-price { color: var(--accent-color); font-size: 18px; font-weight: 800; }

.order-detail-congrats {
    color: #bbb;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-color);
    color: #000;
    font-weight: 800;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.btn-download:hover { opacity: 0.85; }

.order-detail-pending {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 4px 0;
}
.order-detail-pending-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

/* Кликабельные элементы в списках заказов */
.order-amount--link {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(192,21,42,0.35);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 13px;
    transition: background 0.15s;
}
.order-amount--link:hover { background: rgba(192,21,42,0.06); }

.order-row--link {
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.order-row--link:hover { background: rgba(255,255,255,0.03); }

@media (max-width: 900px) {
    /* Plans section mobile */
    .plans-section { padding: 32px 12px; }
    .plans-header { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 20px; }
    .plans-title { font-size: 32px; }
    .plans-subtitle { text-align: left; max-width: 100%; font-size: 13px; }
    .plans-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .plan-card { padding: 14px 12px 18px; border-radius: 14px; }
    .plan-name { font-size: 14px; margin-bottom: 4px; }
    .plan-desc { display: none; }
    .plan-top { margin-bottom: 10px; }
    .plan-amount { font-size: 32px; letter-spacing: -1px; }
    .plan-currency { font-size: 14px; }
    .plan-tickets { font-size: 11px; margin-top: 4px; }
    .plan-badge { display: none; }
    .plans-order-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px 20px;
    }
    .plans-qty { justify-content: space-between; }
    .plans-order-group { margin-left: 0; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
    .plans-total-wrap { justify-content: space-between; }
    .plans-submit { width: 100%; text-align: center; padding: 16px; }

    /* Legacy car-card (unused but kept) */
    .car-card.wide { flex-direction: column; overflow: hidden; }
    .car-card.wide .car-image { flex: none; width: 100%; max-width: 100%; height: 240px; overflow: hidden; }
    .car-card.wide .car-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

    .navbar {
        justify-content: space-between !important;
        padding: 10px 14px !important;
        gap: 8px !important;
    }
    .nav-links {
        display: flex !important;
        gap: 6px !important;
        align-items: center !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    .navbar .nav-btn {
        margin: 0 !important;
        padding: 7px 10px !important;
        font-size: 11px !important;
        min-width: 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
    /* Скрываем имя пользователя — длинное имя ломает хедер */
    .nav-username { display: none !important; }
    /* === HEADER === */
    .nav-logo-text { display: none !important; }
    .nav-logo-img { height: 36px; }

    /* === HERO === */
    .hero { min-height: 420px; align-items: flex-end; padding-bottom: 0; }
    .hero-bg-img {
        top: 0; right: 0;
        width: 100%; max-width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        opacity: 0.45;
    }
    .hero::before {
        background: linear-gradient(
            to bottom,
            rgba(28,28,28,0.2) 0%,
            rgba(28,28,28,0.6) 40%,
            #1c1c1c 75%,
            #1c1c1c 100%
        );
    }
    .hero-content {
        padding: 24px 20px 40px;
        max-width: 100%;
        text-align: left;
        z-index: 3;
    }
    .line-main { font-size: 40px; letter-spacing: -1px; }
    .line-sub { font-size: 14px; }
    .hero-image { max-width: 250px; }
    .prizes-wrapper { flex-direction: column; }
    .prizes-image { max-width: 100%; flex: none; }
    .prizes-image img { height: 260px; }
    .prizes-info { padding: 30px 24px; }
    .prizes-big-num { font-size: 80px; }
    .prizes-device { font-size: 22px; }
    .extra-split { flex-direction: column; min-height: unset; }
    .extra-split-text { flex: unset; padding: 32px 20px 24px; }
    .extra-split-num { font-size: 64px; }
    .extra-split-word { font-size: 22px; }
    .extra-split-img-wrap { flex: none; width: 100%; height: 260px; }
    .extra-split-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
    .extra-prizes-section .container { padding-left: 16px; padding-right: 16px; box-sizing: border-box; width: 100%; }
    .extra-top3 { grid-template-columns: 1fr; gap: 8px; }
    .extra-top3-card { padding: 14px 16px; gap: 6px; }
    .extra-top3-num { font-size: 26px; letter-spacing: -1px; }
    .extra-top3-name { font-size: 14px; }
    .extra-list { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .selection-section { padding-top: 0; }
    .selection-grid { gap: 16px !important; }
    .car-card.wide { margin-bottom: 0 !important; }
    .cabinet-header { flex-direction: column; text-align: center; gap: 20px; }
    .stat-card { padding: 15px; }
    .stat-value { font-size: 24px; }
    .cabinet-sections { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .cabinet-container .stats-grid { 
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 20px !important;
    }
    .cabinet-container .stat-card {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: calc(50% - 4px) !important;
        padding: 12px 10px !important;
    }
    .cabinet-container .stat-card:last-child {
        flex: 1 1 100% !important;
    }
    .stat-label { font-size: 9px !important; }
    .stat-value { font-size: 20px !important; }
    .stat-desc { font-size: 9px !important; }

    .cabinet-block { padding: 15px !important; }
    .order-item { padding: 10px !important; gap: 5px !important; display: flex !important; align-items: center !important; }
    .order-main { flex: 1 !important; min-width: 0 !important; }
    .order-id { font-size: 11px !important; }
    .order-date { font-size: 9px !important; }
    
    .order-info { 
        margin-right: 5px !important; 
        min-width: 65px !important; 
        text-align: right !important;
        flex: 0 0 auto !important;
    }
    .order-info strong {
        font-size: 14px !important;
        text-align: right !important;
        display: block !important;
        width: 100% !important;
    }
    .order-status {
        padding: 3px 6px !important;
        font-size: 9px !important;
        min-width: 60px !important;
        text-align: center !important;
        flex: 0 0 auto !important;
    }
    .user-welcome h1 { font-size: 20px !important; }
}

/* ===== Юридические страницы ===== */
.legal-page {
    max-width: 820px;
    margin: 60px auto;
    padding: 0 24px 80px;
}
.legal-header {
    margin-bottom: 36px;
}
.legal-header h1 {
    font-size: 30px;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1.25;
    margin-bottom: 8px;
}
.legal-subtitle {
    color: #888;
    font-size: 15px;
    margin: 0;
}
.legal-body {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 40px 48px;
    line-height: 1.75;
    color: #333;
    font-size: 15px;
}
.legal-intro {
    color: #444;
    margin-bottom: 28px;
    font-size: 15px;
}
.legal-body p {
    margin-bottom: 14px;
}
.legal-body strong {
    color: #111;
}
.legal-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}
.legal-sub-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin: 22px 0 10px;
}
.legal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}
.legal-list li {
    padding: 6px 0 6px 20px;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}
.legal-list li:last-child {
    border-bottom: none;
}
.legal-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}
.legal-list a {
    color: var(--accent-color);
    text-decoration: none;
}
.legal-list a:hover {
    text-decoration: underline;
}
.legal-body a {
    color: var(--accent-color);
    text-decoration: none;
}
.legal-body a:hover {
    text-decoration: underline;
}
.legal-requisites {
    margin-top: 40px;
    padding: 24px;
    background: #f7f8fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    color: #555;
}
.legal-requisites h3 {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
}
.legal-requisites p {
    margin: 4px 0;
}
.legal-director {
    margin-top: 12px !important;
    color: #333;
    font-weight: 600;
}
.legal-date {
    margin-top: 8px !important;
    color: #888;
    font-size: 13px;
}
@media (max-width: 600px) {
    .legal-body { padding: 24px 20px; }
    .legal-header h1 { font-size: 22px; }
    .legal-section-title { font-size: 16px; }
}
