/* === Базовые стили === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f4f6f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Верхняя навигация === */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.6em;
    font-weight: 800;
    color: #1a202c;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: #0077FF;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0077FF;
}

.nav-link-primary {
    color: #0077FF;
    font-weight: 600;
}

/* === Основной контент === */
.main-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    flex: 1;
}

/* === Базовый стиль секций и анимация === */
section {
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    text-align: center;
    position: relative;
    overflow: hidden;

    /* Стили для плавного появления */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

section.in-view {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.15em;
    margin-bottom: 35px;
    opacity: 0.85;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* === Видео секция === */
.video-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.video-section h2, .video-section .section-subtitle {
    color: white;
}

.video-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.video-container video {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background: #000;
    display: block;
}

.video-autoplay-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.video-autoplay-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.video-autoplay-btn.playing {
    background: white;
    color: #1e3c72;
}

/* === Секция ссылок === */
.links-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    color: #1a202c;
}

.links-section h2 {
    color: #1a202c;
}

.link-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    width: 100%;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 16px 24px;
    background: #ffffff;
    color: #2d3748;
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    width: 100%;
    max-width: 380px;
}

/* ВАЖНО: Принудительно задаем размер иконок, чтобы 800px из SVG не ломали верстку */
.social-btn svg {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    color: white;
    border-color: transparent;
}

.social-btn:hover svg {
    transform: scale(1.1);
}

/* Цвета при наведении */
.btn-website:hover { background: #2d3748; }
.btn-telegram:hover { background: #2AABEE; }
.btn-instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.btn-max:hover { background: #0077FF; }
.btn-vk:hover { background: #0077FF; }

.links-section p[style*="font-size"] {
    font-size: 0.85em;
    color: #718096;
    margin-top: 20px;
    font-style: italic;
}

/* === Галерея / Карусель === */
.gallery-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #1a202c;
}

.gallery-section h2 {
    color: #1a202c;
}

.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 20px auto 0;
    overflow: hidden;
}

.carousel-wrapper {
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: #000;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 0;
    padding-bottom: 60%; /* Соотношение сторон 16:10 */
    position: relative;
    overflow: hidden;
}

.carousel-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #1a202c;
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #1a202c;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: #1a202c;
    transform: scale(1.3);
}

/* === Футер === */
footer {
    text-align: center;
    padding: 30px 20px;
    background: #1a202c;
    color: rgba(255, 255, 255, 0.7);
    margin-top: auto;
    font-size: 0.95em;
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .top-nav {
        padding: 15px 20px;
    }

    .nav-brand {
        font-size: 1.3em;
    }

    .main-content {
        margin: 20px auto;
        gap: 25px;
    }

    section {
        padding: 35px 20px;
        border-radius: 18px;
    }

    section h2 {
        font-size: 1.7em;
    }

    .section-subtitle {
        font-size: 1em;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn svg {
        width: 24px !important;
        height: 24px !important;
    }

    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }

    .carousel-slide {
        padding-bottom: 75%; /* 4:3 для мобильных */
    }
}

@media (max-width: 480px) {
    .carousel-btn {
        display: none; /* На телефонах удобнее свайпать */
    }
}

/* =========================================================
   СТИЛИ ДЛЯ ВНУТРЕННИХ СТРАНИЦ (Вход, Кабинет, Админка)
   ========================================================= */

/* Основной контейнер для форм */
.container {
    max-width: 480px;
    margin: 60px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    text-align: center;
}

/* Широкий контейнер для таблиц и дашборда */
.container.wide {
    max-width: 1100px;
    text-align: left;
}

.container h1 {
    font-size: 1.8em;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.container > p {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 1.05em;
}

/* Формы */
.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95em;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #1a202c;
}

.form-group input:focus {
    outline: none;
    border-color: #0077FF;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 119, 255, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #718096;
    font-size: 0.85em;
}

/* Кнопки (общие) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    gap: 8px;
}

.btn-primary {
    background: #0077FF;
    color: white;
    width: 100%; /* На формах кнопка во всю ширину */
}

.btn-primary:hover {
    background: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 119, 255, 0.3);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

/* Уведомления (Flash messages) */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* Информационные блоки */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 16px;
    margin: 25px 0;
    border-radius: 8px;
    color: #1e40af;
    text-align: left;
    font-size: 0.95em;
    line-height: 1.5;
}

.help-text {
    color: #718096;
    font-size: 0.9em;
    margin-top: 25px;
    font-style: italic;
}

/* Таблицы (Админка и Дашборд) */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.leaderboard-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tr:hover td {
    background: #f8fafc;
}

.leaderboard-table code {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: #0077FF;
    font-size: 0.9em;
    font-weight: 600;
}

/* Стили личного кабинета */
.referral-section, .qr-section, .info-section {
    background: #f8fafc;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.referral-section h2, .qr-section h2, .info-section h2 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #1a202c;
    font-weight: 700;
}

.link-box {
    display: flex;
    gap: 12px;
    margin: 15px 0;
}

.link-box input {
    flex: 1;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: monospace;
    font-size: 15px;
    background: white;
    color: #1a202c;
}

.btn-copy {
    background: #0077FF;
    color: white;
    width: auto;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #005bb5;
}

.stats {
    background: #dcfce7;
    color: #166534;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    font-weight: 600;
    border: 1px solid #86efac;
}

.qr-container {
    text-align: center;
    margin: 20px 0;
    padding: 25px;
    background: white;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.qr-image {
    max-width: 250px;
    border-radius: 8px;
}

.info-section ol {
    margin-left: 20px;
    color: #4a5568;
}

.info-section li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.actions {
    display: flex;
    gap: 15px;
    margin-top: 35px;
    flex-wrap: wrap;
    justify-content: center;
}

.actions .btn {
    width: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-style: italic;
    background: #f8fafc;
    border-radius: 12px;
}

/* Адаптивность для внутренних страниц */
@media (max-width: 768px) {
    .container {
        margin: 30px 15px;
        padding: 30px 20px;
    }

    .container.wide {
        padding: 20px;
    }

    .link-box {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
    }

    .leaderboard-table {
        display: block;
        overflow-x: auto;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn {
        width: 100%;
    }
}

/* Отменяем анимацию появления для секций внутри контейнеров админки */
.container section,
.container.wide section {
    opacity: 1 !important;
    transform: translateY(0) !important;
    text-align: left !important; /* Таблицы должны быть выровнены по левому краю */
}

/* Убираем центрирование заголовков в админке */
.container section h2,
.container.wide section h2 {
    text-align: left;
}

/* Дополнительные стили для секций в админке */
.container section,
.container.wide section {
    padding: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

/* === Секция процесса работы === */
.process-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 60px 40px;
}

.process-section h2,
.process-section .section-subtitle {
    color: white;
    position: relative;
    z-index: 2;
}

/* Фоновые плавающие иконки */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    font-size: 3em;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.icon-car { top: 10%; left: 10%; animation-delay: 0s; }
.icon-ship { top: 20%; right: 15%; animation-delay: 3s; }
.icon-money { bottom: 30%; left: 20%; animation-delay: 6s; }
.icon-road { bottom: 20%; right: 10%; animation-delay: 9s; }
.icon-key { top: 50%; left: 50%; animation-delay: 12s; }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(5deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(3deg);
    }
}

/* Таймлайн процесса */
.process-timeline {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 40px auto 0;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;

    /* Анимация появления */
    opacity: 0;
    transform: translateX(-50px);
}

.process-step.in-view {
    opacity: 1;
    transform: translateX(0);
}

.process-step:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.step-icon {
    font-size: 2.5em;
    min-width: 60px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.step-content {
    flex: 1;
    text-align: left;
}

.step-content h3 {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.step-content p {
    font-size: 1em;
    opacity: 0.9;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* Соединительная линия между шагами */
.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 55px;
    bottom: -30px;
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
}

/* Адаптивность для процесса */
@media (max-width: 768px) {
    .process-section {
        padding: 40px 20px;
    }

    .process-step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }

    .step-content {
        text-align: center;
    }

    .step-icon {
        font-size: 2em;
    }

    .step-content h3 {
        font-size: 1.1em;
    }

    .floating-icon {
        font-size: 2em;
    }
}

/* === Секция промокода и подарков === */
.promo-section {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #1a202c;
}

.promo-section h2,
.promo-section .section-subtitle {
    color: #1a202c;
    position: relative;
    z-index: 2;
}

.promo-code-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    z-index: 2;
}

.promo-label {
    display: block;
    font-size: 0.85em;
    font-weight: 700;
    color: #718096;
    margin-bottom: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.promo-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1a202c;
    color: #f6d365;
    padding: 15px 25px;
    border-radius: 12px;
    border: 2px dashed #f6d365;
    margin-bottom: 15px;
    gap: 15px;
}

#promoCodeDisplay {
    font-family: 'Courier New', monospace;
    font-size: 1.8em;
    font-weight: 800;
    letter-spacing: 2px;
    flex: 1;
    text-align: left;
}

.btn-copy-promo {
    background: #f6d365;
    color: #1a202c;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-copy-promo:hover {
    background: #fda085;
    transform: scale(1.05);
}

.promo-hint {
    font-size: 0.9em;
    color: #4a5568;
    font-style: italic;
    margin-top: 10px;
}

.promo-gifts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.gift-card {
    background: rgba(255, 255, 255, 0.85);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
}

.gift-card:hover {
    transform: translateY(-8px);
    background: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.gift-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.gift-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #1a202c;
    font-weight: 700;
}

.gift-card p {
    color: #4a5568;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Адаптивность для промо-секции */
@media (max-width: 600px) {
    .promo-code-box {
        flex-direction: column;
        gap: 15px;
    }

    #promoCodeDisplay {
        text-align: center;
        font-size: 1.5em;
    }

    .btn-copy-promo {
        width: 100%;
    }

    .promo-gifts {
        grid-template-columns: 1fr;
    }
}
/* === Админ-дашборд: карточки статистики === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0 40px;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 2em;
    line-height: 1;
    flex-shrink: 0;
}

.stat-content {
    min-width: 0;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.85em;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

.stat-card-blue { border-left: 4px solid #0077FF; }
.stat-card-green { border-left: 4px solid #16a34a; }
.stat-card-orange { border-left: 4px solid #f59e0b; }
.stat-card-purple { border-left: 4px solid #8b5cf6; }
.stat-card-teal { border-left: 4px solid #0d9488; }
.stat-card-pink { border-left: 4px solid #ec4899; }

/* Быстрые действия */
.admin-quick-actions {
    margin-bottom: 40px;
}

.admin-quick-actions h2 {
    font-size: 1.3em;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.quick-action-card:hover {
    border-color: #0077FF;
    box-shadow: 0 8px 24px rgba(0, 119, 255, 0.12);
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 1.6em;
    margin-bottom: 4px;
}

.quick-action-title {
    font-weight: 700;
    font-size: 1.05em;
    color: #1a202c;
}

.quick-action-desc {
    font-size: 0.88em;
    color: #64748b;
}

/* Две колонки: топ + последние переходы */
.admin-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 20px;
}

.admin-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.admin-section h2 {
    font-size: 1.15em;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
}

.admin-section .leaderboard-table {
    margin-top: 0;
    box-shadow: none;
}

.admin-section .no-data {
    color: #94a3b8;
    padding: 20px 0;
    text-align: center;
}

/* Навигация в админке */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-nav .btn {
    width: auto;
    padding: 10px 18px;
    font-size: 14px;
}

.admin-nav .btn.active {
    background: #0077FF;
    color: white;
}

/* Actions блок */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.actions .btn {
    width: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.top-3 td {
    background: #fffbeb;
}

.no-data {
    color: #94a3b8;
    text-align: center;
    padding: 30px;
}

@media (max-width: 800px) {
    .admin-two-cols {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Статусы бонусов */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-muted {
    background: #f1f5f9;
    color: #64748b;
}

.row-inactive td {
    opacity: 0.55;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #f8fafc;
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0077FF;
}

/* Медиа-форма */
.media-upload-form .form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 14px;
    cursor: pointer;
}

.media-upload-form .form-group input[type="file"]:hover {
    border-color: #0077FF;
    background: #eff6ff;
}

.media-preview {
    margin-top: 8px;
}

/* Активный пункт админ-навигации */
.admin-nav .btn.active {
    background: #0077FF;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 119, 255, 0.25);
}

.admin-nav .btn:not(.active) {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.admin-nav .btn:not(.active):hover {
    border-color: #0077FF;
    color: #0077FF;
}

/* Тексты: textarea в формах админки */
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #1a202c;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #0077FF;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 119, 255, 0.1);
}

.texts-form .admin-section h2 {
    margin-bottom: 16px;
}


/* =========================================================
   MIDNIGHT CORPORATE THEME (Variant 1)
   Главная + админка: тёмно-синий корпоративный стиль
   ========================================================= */

:root {
    --mc-bg: #0b1220;
    --mc-bg-soft: #111827;
    --mc-surface: #151e30;
    --mc-surface-2: #1a2438;
    --mc-border: rgba(148, 163, 184, 0.18);
    --mc-border-strong: rgba(148, 163, 184, 0.28);
    --mc-text: #e5eefb;
    --mc-text-muted: #94a3b8;
    --mc-accent: #3b82f6;
    --mc-accent-hover: #2563eb;
    --mc-accent-soft: rgba(59, 130, 246, 0.15);
    --mc-success: #22c55e;
    --mc-danger: #ef4444;
    --mc-warning: #f59e0b;
    --mc-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* --- База сайта --- */
body {
    background: linear-gradient(165deg, #0b1220 0%, #0f172a 45%, #111827 100%);
    background-attachment: fixed;
    color: var(--mc-text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(59, 130, 246, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(37, 99, 235, 0.08), transparent 45%);
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* Навигация */
.top-nav {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--mc-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.nav-brand {
    color: #f8fafc;
}

.nav-brand:hover {
    color: var(--mc-accent);
}

.nav-link {
    color: var(--mc-text-muted);
}

.nav-link:hover,
.nav-link-primary {
    color: #93c5fd;
}

/* Секции главной */
.main-content {
    max-width: 1040px;
}

section {
    background: var(--mc-surface) !important;
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow);
    color: var(--mc-text);
}

section h2 {
    color: #f8fafc !important;
}

.section-subtitle {
    color: var(--mc-text-muted) !important;
    opacity: 1 !important;
}

/* Видео-блок — чуть глубже синий */
.video-section {
    background: linear-gradient(145deg, #0f1c35 0%, #1e3a5f 55%, #1a2d4a 100%) !important;
    border-color: rgba(59, 130, 246, 0.25);
}

.video-section h2,
.video-section .section-subtitle {
    color: #f1f5f9 !important;
}

.video-container video {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

/* Промо */
.promo-section {
    background: linear-gradient(160deg, #152238 0%, #1a2740 100%) !important;
}

.promo-code-box {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

#promoCodeDisplay {
    color: #93c5fd !important;
}

.btn-copy-promo {
    background: var(--mc-accent) !important;
    color: #fff !important;
}

.btn-copy-promo:hover {
    background: var(--mc-accent-hover) !important;
}

.promo-label,
.promo-hint {
    color: var(--mc-text-muted) !important;
}

.gift-card {
    background: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid var(--mc-border) !important;
    box-shadow: none !important;
    color: var(--mc-text);
}

.gift-card:hover {
    border-color: rgba(59, 130, 246, 0.45) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3) !important;
}

.gift-card h3 {
    color: #f8fafc !important;
}

.gift-card p {
    color: var(--mc-text-muted) !important;
}

/* Соцсети: белые кнопки как до тёмной темы, цвет бренда при наведении */
.links-section {
    background: var(--mc-surface) !important;
}

.social-btn {
    background: #ffffff !important;
    color: #2d3748 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02) !important;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.btn-website:hover { background: #2d3748 !important; }
.btn-telegram:hover { background: #2AABEE !important; }
.btn-instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important; }
.btn-max:hover { background: #0077FF !important; }
.btn-vk:hover { background: #0077FF !important; }

.links-section p[style*="font-size"] {
    color: #94a3b8 !important;
}

/* Галерея / карусель */
.carousel-container,
.carousel-wrapper {
    background: transparent;
}

.carousel-btn {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid var(--mc-border);
    color: #fff;
}

.carousel-dot {
    background: rgba(148, 163, 184, 0.4);
}

.carousel-dot.active {
    background: var(--mc-accent);
}

/* Процесс */
.process-section {
    background: var(--mc-surface) !important;
}

.process-step {
    background: var(--mc-surface-2) !important;
    border: 1px solid var(--mc-border) !important;
    color: var(--mc-text);
}

.process-step h3 {
    color: #f8fafc !important;
}

.process-step p {
    color: var(--mc-text-muted) !important;
}

.process-step:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
}

/* Подвал */
footer {
    background: transparent;
    color: var(--mc-text-muted);
    border-top: 1px solid var(--mc-border);
    padding: 28px 20px;
    text-align: center;
}

/* Контейнеры форм / кабинета */
.container {
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow);
    color: var(--mc-text);
}

.container h1 {
    color: #f8fafc;
}

.container > p {
    color: var(--mc-text-muted);
}

.form-group label {
    color: #cbd5e1;
}

.form-group input,
.form-group textarea,
.form-group input[type="number"] {
    background: #0f172a !important;
    border-color: var(--mc-border-strong) !important;
    color: var(--mc-text) !important;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--mc-accent) !important;
    background: #0b1220 !important;
    box-shadow: 0 0 0 4px var(--mc-accent-soft) !important;
}

.form-group small,
.help-text {
    color: var(--mc-text-muted) !important;
}

/* Кнопки */
.btn {
    background: var(--mc-surface-2);
    color: var(--mc-text);
    border: 1px solid var(--mc-border);
}

.btn:hover {
    border-color: var(--mc-accent);
    color: #fff;
}

.btn-primary {
    background: var(--mc-accent) !important;
    color: #fff !important;
    border: none !important;
}

.btn-primary:hover {
    background: var(--mc-accent-hover) !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.btn-danger {
    background: #b91c1c !important;
    color: #fff !important;
    border: none !important;
}

.btn-copy {
    background: var(--mc-accent) !important;
}

/* Алерты */
.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.35);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.35);
}

/* Таблицы */
.leaderboard-table {
    background: var(--mc-surface-2);
    box-shadow: none;
    border: 1px solid var(--mc-border);
}

.leaderboard-table th {
    background: rgba(15, 23, 42, 0.9);
    color: var(--mc-text-muted);
    border-bottom-color: var(--mc-border);
}

.leaderboard-table td {
    border-bottom-color: var(--mc-border);
    color: var(--mc-text);
}

.leaderboard-table tr:hover td {
    background: rgba(59, 130, 246, 0.08);
}

.leaderboard-table code {
    background: rgba(15, 23, 42, 0.9);
    color: #93c5fd;
}

.top-3 td {
    background: rgba(59, 130, 246, 0.07) !important;
}

.no-data {
    color: var(--mc-text-muted);
}

/* Личный кабинет партнёра */
.referral-section,
.qr-section,
.info-section {
    background: var(--mc-surface-2) !important;
    border-color: var(--mc-border) !important;
}

.referral-section h2,
.qr-section h2,
.info-section h2 {
    color: #f8fafc !important;
}

.link-box input {
    background: #0f172a !important;
    border-color: var(--mc-border) !important;
    color: var(--mc-text) !important;
}

.stats {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #86efac !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.qr-container {
    background: #0f172a !important;
    border-color: var(--mc-border) !important;
}

.info-section ol,
.info-section li {
    color: var(--mc-text-muted) !important;
}

/* ===== Админ-панель (ещё плотнее) ===== */
body.admin-theme {
    background: #0a101c;
}

body.admin-theme .container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 12px;
    padding-right: 12px;
}

body.admin-theme .container.wide {
    max-width: 1180px;
}

body.admin-theme .admin-nav {
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 28px;
}

body.admin-theme .admin-nav .btn:not(.active) {
    background: transparent;
    border-color: transparent;
    color: var(--mc-text-muted);
}

body.admin-theme .admin-nav .btn:not(.active):hover {
    background: var(--mc-accent-soft);
    color: #93c5fd;
    border-color: transparent;
}

body.admin-theme .admin-nav .btn.active {
    background: var(--mc-accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.stat-card {
    background: var(--mc-surface) !important;
    border: 1px solid var(--mc-border) !important;
    box-shadow: var(--mc-shadow);
}

.stat-value {
    color: #f8fafc !important;
}

.stat-label {
    color: var(--mc-text-muted) !important;
}

.quick-action-card {
    background: var(--mc-surface) !important;
    border: 1px solid var(--mc-border) !important;
    box-shadow: none !important;
}

.quick-action-card:hover {
    border-color: var(--mc-accent) !important;
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.15) !important;
}

.quick-action-title {
    color: #f8fafc !important;
}

.quick-action-desc {
    color: var(--mc-text-muted) !important;
}

.admin-section {
    background: var(--mc-surface) !important;
    border: 1px solid var(--mc-border) !important;
    box-shadow: none !important;
}

.admin-section h2,
.admin-quick-actions h2,
.section-header h2 {
    color: #f8fafc !important;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.badge-muted {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.media-upload-form .form-group input[type="file"] {
    background: #0f172a !important;
    border-color: var(--mc-border-strong) !important;
    color: var(--mc-text-muted);
}

.media-upload-form .form-group input[type="file"]:hover {
    border-color: var(--mc-accent) !important;
    background: rgba(59, 130, 246, 0.08) !important;
}

.info-box {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--mc-accent);
    color: #93c5fd;
}

/* Login page container remains readable */
body:not(.admin-theme) .container {
    /* already themed above */
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.4);
    color: #fff;
}

/* Стеклянная кнопка Play по центру видео */
.video-play-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 88px;
    height: 88px;
    padding: 0;
    border: none;
    background: transparent;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.25s ease;
}

/* Круглый стеклянный диск */
.video-play-glass {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.42) 0%,
        rgba(255, 255, 255, 0.12) 45%,
        rgba(255, 255, 255, 0.2) 100%
    );
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.55),
        inset 0 -1px 1px rgba(0, 0, 0, 0.12);
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Треугольник play */
.video-play-icon {
    position: relative;
    z-index: 1;
    width: 150px;
    height: 150px;
    margin-left: 4px; /* визуальный центр треугольника */
    fill: #1339c1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
    transition: transform 0.25s ease;
}

.video-play-icon path {
    fill: #ffffff;
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.video-play-btn:hover .video-play-glass {
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.18) 45%,
        rgba(255, 255, 255, 0.28) 100%
    );
    border-color: #1339c1;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 1px 1px rgba(255, 255, 255, 0.65),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.video-play-btn:hover .video-play-icon {
    transform: scale(1.2);
}

.video-play-btn:active {
    transform: translate(-50%, -50%) scale(0.94);
}

.video-play-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 6px;
    border-radius: 50%;
}

.video-play-btn.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

@media (max-width: 600px) {
    .video-play-btn {
        width: 72px;
        height: 72px;
    }
    .video-play-icon {
        width: 28px;
        height: 28px;
        margin-left: 3px;
    }
}


/* === Форма консультации === */
.consultation-section {
    width: min(100% - 32px, 760px);
    margin: 48px auto;
    padding: clamp(24px, 5vw, 48px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(26, 32, 44, 0.08);
}
.consultation-section h2 { text-align: center; margin-bottom: 10px; }
.consultation-form { display: flex; flex-direction: column; gap: 10px; max-width: 520px; margin: 28px auto 0; }
.consultation-form > label:not(.consent-label) { font-weight: 600; margin-top: 5px; }
.consultation-form > input[type="text"],
.consultation-form > input[type="tel"] {
    width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #d7dce3;
    border-radius: 10px; font: inherit; background: #fff; color: #222;
}
.consultation-form > input:focus { outline: 2px solid #3182ce; outline-offset: 1px; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; font-size: .92rem; line-height: 1.5; }
.consent-label input { margin-top: 5px; flex: 0 0 auto; }
.consent-label a { color: #2b6cb0; text-decoration: underline; }
.consultation-submit { min-height: 50px; border: 0; border-radius: 10px; padding: 12px 20px; background: #1a202c; color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: opacity .2s ease; }
.consultation-submit:hover { opacity: .88; }
.consultation-submit:disabled { opacity: .65; cursor: wait; }
.consultation-message { min-height: 1.4em; margin-top: 4px; font-size: .95rem; }
.consultation-message.is-success { color: #218838; }
.consultation-message.is-error { color: #b42318; }


/* Юридическая подпись под ссылками на социальные сети */
.instagram-disclaimer {
    color: #ffffff !important;
    font-size: 0.85em;
    margin-top: 20px;
    font-style: italic;
}

/* Управление галереей в панели главного администратора */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.gallery-admin-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}
.gallery-admin-card img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 9px;
    background: #f1f5f9;
}
.gallery-admin-card form { margin-top: 10px; }
.gallery-admin-card .btn-danger { background: #b91c1c; color: #fff; border: 0; }
.gallery-upload-hint { color: #64748b; font-size: 0.9em; }


/* ===== Адаптивность главной страницы: исправление переполнения на телефонах ===== */
html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

@media (max-width: 768px) {
    .top-nav {
        width: 100%;
        min-width: 0;
        padding: 12px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .nav-brand {
        min-width: 0;
        font-size: 1.15rem;
        line-height: 1.25;
        white-space: nowrap;
    }

    .nav-links {
        min-width: 0;
        max-width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .nav-link {
        min-width: 0;
        padding: 4px 0;
        font-size: 0.82rem;
        white-space: normal;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 18px auto;
        padding-left: 12px;
        padding-right: 12px;
        gap: 20px;
    }

    .main-content > section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 28px 16px;
        border-radius: 18px;
    }

    .main-content section h2 {
        max-width: 100%;
        font-size: clamp(1.35rem, 5.2vw, 1.7rem);
        line-height: 1.25;
        letter-spacing: -0.35px;
        overflow-wrap: anywhere;
    }

    .main-content .section-subtitle,
    .main-content p {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .video-container,
    .video-section video,
    #welcomeVideo {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
    }

    .video-container {
        overflow: hidden;
        border-radius: 14px;
    }

    .promo-gifts {
        grid-template-columns: minmax(0, 1fr);
    }

    .gift-card,
    .promo-code-container,
    .promo-code-box,
    .consultation-section,
    .consultation-form,
    .links-section,
    .gallery-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .consultation-section {
        margin: 28px auto 0;
        padding: 22px 16px;
    }

    .consultation-form input,
    .consultation-form button {
        max-width: 100%;
    }

    .link-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .social-btn {
        min-width: 0;
        max-width: 100%;
    }

    .carousel-container,
    .carousel-wrapper,
    .carousel-track,
    .carousel-slide {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .carousel-slide {
        flex: 0 0 100%;
    }

    footer {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 22px 14px;
        text-align: center;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .top-nav {
        align-items: center;
        padding: 11px 12px;
        column-gap: 8px;
    }

    .nav-brand {
        font-size: 1.05rem;
    }

    .nav-links {
        gap: 4px 10px;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .main-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .main-content > section {
        padding: 24px 13px;
    }

    .main-content section h2 {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    .section-subtitle {
        margin-bottom: 22px;
    }

    .video-play-btn {
        width: 60px;
        height: 60px;
    }
}

/* =========================================================
   БЛОК «КАК НАС НАЙТИ»
   ========================================================= */
.location-section {
    background: linear-gradient(160deg, #0b1220 0%, #0f1a30 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: #e5eefb;
    padding: 50px 40px 40px;
}

.location-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    margin-bottom: 12px;
}

.location-eyebrow {
    display: block;
    font-size: 0.85em;
    letter-spacing: 0.3em;
    color: #60a5fa;
    margin-bottom: 8px;
}

.location-section h2 { color: #fff; }
.location-accent { color: #2f7bff; }

.location-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
    gap: 32px;
    padding: 24px;
    margin-top: 10px;
    text-align: left;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
}

.location-logo {
    display: flex;
    align-items: center;
    font-size: 2.2em;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    line-height: 1.1;
}

.location-logo-dash {
    display: inline-block;
    width: 10px;
    height: 4px;
    margin: 0 2px;
    border-radius: 2px;
    background: #2f7bff;
}

.location-tagline {
    font-size: 0.72em;
    letter-spacing: 0.2em;
    color: #60a5fa;
    margin: 6px 0 26px;
}

.location-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.location-item-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #16213a;
    color: #e5eefb;
}

.location-item-text { display: flex; flex-direction: column; gap: 2px; }
.location-item-text strong { color: #fff; font-size: 1.02em; }
.location-item-text span { color: #dbe7fb; line-height: 1.5; }
.location-item-text small { color: #94a3b8; font-size: 0.9em; }

.location-route-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 22px;
    padding: 16px 24px;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d6dff, #2f7bff);
    color: #fff;
    font-weight: 600;
    font-size: 1.05em;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.location-route-btn span { flex: 1; }
.location-route-arrow { opacity: 0.8; }

.location-route-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.5);
}

.location-note {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 0.95em;
    line-height: 1.4;
}

.location-note .location-item-icon { width: 46px; height: 46px; }

.location-map {
    min-height: 420px;
    border-radius: 14px;
    overflow: hidden;
    background: #1e293b;
}

.location-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
}

@media (max-width: 860px) {
    .location-section { padding: 36px 16px 24px; }
    .location-card { grid-template-columns: 1fr; padding: 18px; gap: 24px; }
    .location-map, .location-map iframe { min-height: 320px; }
    .location-logo { font-size: 1.9em; }
}
