/* ========================================
   ГЛОБАЛЬНЫЕ СТИЛИ
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* ========================================
   1. ШАПКА (HEADER)
   ======================================== */

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-slogan {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

/* ✅ ИЗМЕНЕНИЕ №4: Отступ между каруселью и шапкой уменьшен в 2 раза */
header + .carousel-container {
    margin-top: 5px;
}

/* ========================================
   2. НАВИГАЦИЯ
   ======================================== */

.main-nav {
    display: block;
}

.desktop-nav {
    display: block;
}

.mobile-nav {
    display: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.main-nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
    font-size: 16px;
}

.main-nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   3. ГАМБУРГЕР МЕНЮ (МОБИЛЬНОЕ)
   ======================================== */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 35px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

/* Боковое меню для мобильных */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 280px;
    height: 100vh;
    background: #2c3e50;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 20px 0;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo-small img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.close-menu {
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mobile-menu-links {
    list-style: none;
    padding: 0 20px;
    margin: 0;
}

.mobile-menu-links li {
    margin-bottom: 15px;
}

.mobile-menu-links li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background 0.3s;
}

.mobile-menu-links li a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   4. КАРУСЕЛЬ (CAROUSEL) — ✅ ИСПРАВЛЕНИЕ: ВЫСОТА ×2 + КРАСНЫЕ ЛИНИИ СВЕРХУ/СНИЗУ
   ======================================== */

.carousel-container {
    background: white;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.carousel {
    max-width: 5400px; /* ✅ Возврат к предыдущему значению */
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    height: 180px; /* ✅ ВЫСОТА ×2 от 90px = 180px */
}

.carousel-track {
    display: flex;
    animation: scroll 10s linear infinite;
    width: 10800px; /* ✅ 6 слайдов × 1800px */
}

.carousel-slide {
    min-width: 1800px; /* ✅ Возврат к предыдущему значению */
    height: 180px; /* ✅ ВЫСОТА ×2 от 90px = 180px */
    background-size: cover;
    background-position: center;
    display: block;
    position: relative;
    /* ✅ КРАСНЫЕ ЛИНИИ ПО ВЕРХНЕМУ И НИЖНЕМУ КРАЯМ (2px) */
    border-top: 2px solid #ff0000;
    border-bottom: 2px solid #ff0000;
}

/* Убираем дублирование границ между слайдами по вертикали — оставляем только внешние */
.carousel-slide:not(:first-child) {
    border-top: none;
}
.carousel-slide:last-child {
    border-bottom: 2px solid #ff0000;
}

/* Ссылка внутри слайда — на весь размер, без границ */
.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-5400px); } /* ✅ Сдвиг на 3 оригинальных слайда × 1800px */
}

/* ========================================
   ✅ НОВОЕ: ВИДЖЕТ СТАТИСТИКИ "НАС УЖЕ ХХХ"
   ======================================== */

.stats-banner {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 50;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.stats-icon {
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.stats-text {
    color: #000000;
    font-size: 19px;
    font-weight: 600;
}

.stats-count {
    color: #000000;
    font-weight: 800;
    font-size: 23px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    display: inline-block;
    min-width: 60px;
}

.stats-subtext {
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 400;
}
/* ========================================
   5. ТЕЛО ЛЕНДИНГА (BODY)
   ======================================== */

.body-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2c3e50;
}

.photo-slider {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-slide.active {
    opacity: 1;
    z-index: 10;
}

.slide-content {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 80%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.slide-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-desc {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.95;
}

.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-dot.active {
    background: white;
}

/* ========================================
   6. РЕКЛАМА (ADS)
   ======================================== */

.advertising-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.ad-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .ad-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ad-zone {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.ad-title {
    font-size: 24px;
    font-weight: 700;
}

.ad-text {
    font-size: 16px;
    opacity: 0.9;
    max-width: 400px;
}

.ad-button {
    background: white;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease;
    display: inline-block;
}

.ad-button:hover {
    transform: scale(1.05);
}

/* ========================================
   7. ПОДВАЛ (FOOTER)
   ======================================== */

footer {
    background: #2c3e50;
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 80px;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.footer-copyright {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   8. КОНСТРУКТОР (BUILDER)
   ======================================== */

.builder-main {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.builder-container {
    background: white;
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.builder-title {
    font-size: 42px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.builder-desc {
    font-size: 20px;
    color: #666;
    margin-bottom: 40px;
}

.builder-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
}

.feature-card h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

.builder-action {
    margin-top: 40px;
}

/* ========================================
   9. АВТОРИЗАЦИЯ (AUTH)
   ======================================== */

.auth-main {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-container {
    background: white;
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.auth-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
}

.auth-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.auth-step {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.auth-step h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.auth-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #667eea;
}

.telegram-bot-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #2196f3;
}

.telegram-bot-info p {
    color: #1565c0;
    font-weight: 600;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ========================================
   10. КНОПКИ
   ======================================== */

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ========================================
   11. АДМИН-ПАНЕЛЬ (ADMIN)
   ======================================== */

/* Статусы аккаунта */
.status-active { background: #d4edda; color: #155724; }
.status-blocked { background: #f8d7da; color: #721c24; }

/* ✅ Семантические статусы бота (lifecycle) */
.status-bot-never { background: #e2e3e5; color: #383d41; }
.status-bot-no-token { background: #fff3cd; color: #856404; }
.status-bot-ready { background: #d1ecf1; color: #0c5460; }
.status-bot-running { background: #d4edda; color: #155724; }
.status-bot-unknown { background: #6c757d; color: white; }

/* ========================================
   12. АДАПТИВНОСТЬ
   ======================================== */

@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav {
        display: flex;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    .brand {
        width: 100%;
        justify-content: space-between;
    }

    .logo img {
        width: 50px;
        height: 50px;
    }

    .brand-name {
        font-size: 28px;
    }

    .brand-slogan {
        font-size: 13px;
    }

    .body-section,
    .advertising-section,
    .builder-main,
    .auth-main {
        margin: 40px auto;
    }

    .builder-container,
    .auth-container {
        padding: 40px 20px;
    }

    .builder-title,
    .auth-title {
        font-size: 28px;
    }
    
    /* Адаптив виджета статистики */
    .stats-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .stats-text {
        font-size: 16px;
    }
    
    .stats-count {
        font-size: 20px;
    }
    
    .stats-subtext {
        font-size: 13px;
    }
    
    /* ✅ Адаптив карусели для мобильных */
    .carousel {
        max-width: 100%;
        height: 120px; /* ✅ Масштабированная высота для мобильных */
    }
    .carousel-slide {
        min-width: 100%;
        height: 120px;
        border-top: 2px solid #ff0000;
        border-bottom: 2px solid #ff0000;
    }
    .carousel-slide:not(:first-child) {
        border-top: none;
    }
    .carousel-track {
        width: 300%;
        animation-duration: 15s;
    }
    @keyframes scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(-100%); }
    }
}

@media (max-width: 480px) {
    .logo img {
        width: 45px;
        height: 45px;
    }

    .brand-name {
        font-size: 24px;
    }

    .section-title {
        font-size: 28px;
    }

    .photo-slider {
        height: 350px;
    }

    .slide-content {
        padding: 25px 15px;
        max-width: 95%;
    }

    .slide-title {
        font-size: 20px;
    }

    .slide-desc {
        font-size: 14px;
    }

    .carousel-slide {
        min-width: 100%;
    }

    .ad-zone {
        padding: 30px 20px;
    }

    .builder-container,
    .auth-container {
        padding: 30px 15px;
    }

    .builder-title,
    .auth-title {
        font-size: 24px;
    }

    .btn-primary {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
    
    /* Мобильная адаптация виджета */
    .stats-banner {
        padding: 10px 15px;
    }
    
    .stats-icon {
        font-size: 20px;
    }
    
    .stats-text {
        font-size: 14px;
    }
    
    .stats-count {
        font-size: 18px;
    }
}