/* ==========================================================================
   БЛОК 1: СБРОС СТИЛЕЙ И ГЛОБАЛЬНЫЕ НАСТРОЙКИ
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #fdfbf7;
    color: #2d2d2d;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   БЛОК 2: ШАПКА САЙТА (HEADER) И НАВИГАЦИЯ
   ========================================================================== */
.main-header {
    background: rgba(27, 60, 34, 0.96); /* Фирменный полупрозрачный темно-зеленый */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 12px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-logo {
    height: 42px;
    width: auto;
    display: block;
}

.header-nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 25px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: #c99a3c; /* Золотистый ховер */
}

/* ==========================================================================
   БЛОК 3: ГЛАВНЫЙ ЭКРАН С УЛУЧШЕННЫМ ФОНОМ И ТЕКСТОМ
   ========================================================================== */
.hero-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /* Установлен правильный .png фон с затемнением для читаемости текста */
    background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('images/main1.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 8% 40px 8%;
    gap: 50px;
}

/* Текстовый блок симулятора слева */
.hero-text-center {
    color: #ffffff;
    max-width: 580px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-text-center h1 {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #c99a3c;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-description {
    font-size: 16px;
    line-height: 1.7;
    color: #f5f5f5;
}

/* ==========================================================================
   БЛОК 4: ИНТЕРФЕЙС КАРТОЧКИ ВХОДА / РЕГИСТРАЦИИ
   ========================================================================== */
.auth-card-overlay {
    background: rgba(255, 255, 255, 0.96);
    padding: 35px;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #eef0ed;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #777;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #1b3c22;
    border-bottom: 3px solid #1b3c22;
}

/* Поля ввода и селекторы */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 11px;
    color: #333;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #1b3c22;
    box-shadow: 0 0 0 3px rgba(27, 60, 34, 0.1);
}

/* Кнопка отправки формы */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: #1b3c22;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.2s ease;
    margin-top: 10px;
}

.btn-submit:hover {
    background: #2c5e37;
}

.btn-submit:disabled {
    background: #8fa193;
    cursor: not-allowed;
}

/* ==========================================================================
   БЛОК 5: СЕКЦИИ СТРУКТУРЫ УРОКА И ОПИСАНИЯ
   ========================================================================== */
.section-padding {
    padding: 80px 0;
}

.shadow-section {
    background: #ffffff;
    border-top: 1px solid #eef0ed;
    border-bottom: 1px solid #eef0ed;
}

.section-title {
    font-size: 32px;
    color: #1b3c22;
    text-align: center;
    margin-bottom: 12px;
    font-weight: 800;
}

.section-subtitle {
    font-size: 16px;
    color: #666666;
    text-align: center;
    margin-bottom: 50px;
}

/* Сетка элементов структуры урока */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.feature-card-item {
    background: #fdfbf7;
    border: 1px solid #eef0ed;
    padding: 35px 25px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.01);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.icon-box {
    font-size: 42px;
    margin-bottom: 15px;
}

.feature-card-item h3 {
    font-size: 18px;
    color: #1b3c22;
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-card-item p {
    font-size: 14px;
    color: #555555;
    line-height: 1.6;
}

/* ==========================================================================
   БЛОК 6: СЕТКА ИИ-БИБЛИОТЕКИ И API КАНАЛОВ
   ========================================================================== */
.api-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.api-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    border-top: 4px solid #c99a3c; /* Золотая полоса сверху */
    border-left: 1px solid #eef0ed;
    border-right: 1px solid #eef0ed;
    border-bottom: 1px solid #eef0ed;
}

.api-card h3 {
    color: #1b3c22;
    font-size: 20px;
    margin-bottom: 8px;
}

.api-tech {
    font-size: 13px;
    color: #c99a3c;
    font-weight: bold;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-card p {
    font-size: 14.5px;
    color: #555555;
    line-height: 1.6;
}

/* ==========================================================================
   БЛОК 7: КАРТОЧКИ ПЕРСОНАЖЕЙ И БЕСКОНЕЧНАЯ АНИМАЦИЯ
   ========================================================================== */
.characters-showcase-section {
    padding: 60px 20px 100px 20px;
    max-width: 850px;
    margin: 0 auto;
}

.characters-showcase-section h2 {
    font-size: 28px;
    color: #1b3c22;
    text-align: center;
    margin-bottom: 45px;
    font-weight: 800;
}

.character-card {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #eef0ed;
    overflow: hidden;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.character-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

.char-left-animated {
    background: #1b3c22;
    padding: 20px;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.char-right-info {
    padding: 20px 30px;
    flex-grow: 1;
}

.char-right-info h3 {
    font-size: 19px;
    color: #1b3c22;
    margin-bottom: 6px;
    font-weight: 700;
}

.char-right-info p {
    font-size: 14px;
    color: #555555;
    line-height: 1.5;
    margin-bottom: 12px;
}

.badge {
    display: inline-block;
    background: #f0ede4;
    color: #c99a3c;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Бесконечная плавная ИИ-анимация покачивания */
@keyframes character-breath {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

.animated-hero-avatar {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: character-breath 4s ease-in-out infinite;
}

/* ==========================================================================
   БЛОК 8: СТИЛИ ОПТИМИЗАЦИИ И АДАПТИВНОСТИ ПОД МОБИЛКИ
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 130px;
        justify-content: center;
        gap: 35px;
    }
    
    .hero-text-center {
        max-width: 100%;
    }
    
    .hero-text-center h1 {
        font-size: 48px;
    }

    .auth-card-overlay {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .character-card {
        flex-direction: column;
    }
    
    .char-left-animated {
        width: 100%;
        height: 180px;
    }
    
    .main-header {
        padding: 8px 0;
    }
    
    .header-nav {
        display: none; /* Скрываем меню на смартфонах для экономии места */
    }
}
