/* ===== СТИЛИ МЕНЮ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    min-height: 100vh;
    padding: 20px;
}

.menu-wrapper {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

/* ===== ОСНОВНОЕ МЕНЮ ===== */
.menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

/* ===== ЛОГОТИП ===== */
.menu .logo {
    font-size: 22px;
    font-weight: 700;
    color: #0b2a4a;
    text-decoration: none;
    letter-spacing: 1px;
    padding: 10px 0;
}
.menu .logo span {
    color: #1a4b8c;
}

/* ===== СПИСОК ПУНКТОВ ===== */
.menu ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 8px;
    align-items: center;
}
.menu ul li {
    position: relative;
}

/* ===== ОСНОВНЫЕ ССЫЛКИ ===== */
.menu ul li a {
    display: block;
    padding: 10px 18px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.menu ul li a:hover {
    background: #eef2f7;
    color: #0b2a4a;
}

/* ===== ПУНКТЫ С ВЫПАДАЮЩИМ МЕНЮ ===== */
.menu ul li.dropdown > a::after {
    content: " ▾";
    font-size: 12px;
    color: #64748b;
}

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ===== */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    padding: 8px 0;
    z-index: 1000;
    border: 1px solid #edf2f7;
}
.dropdown-content a {
    padding: 10px 20px;
    font-weight: 400;
    font-size: 14px;
    color: #1e293b;
    border-radius: 0;
    transition: none;
}
.dropdown-content a:hover {
    background: #f1f5f9;
    color: #0b2a4a;
}

/* ===== ПОКАЗЫВАЕМ ВЫПАДАЮЩЕЕ МЕНЮ ПРИ НАВЕДЕНИИ ===== */
.menu ul li.dropdown:hover .dropdown-content {
    display: block;
}

/* ===== АКТИВНЫЙ ПУНКТ (ДЛЯ СТРАНИЦЫ, ГДЕ МЫ НАХОДИМСЯ) ===== */
.menu ul li a.active {
    background: #1a4b8c;
    color: white;
}
.menu ul li a.active:hover {
    background: #0f3b6e;
}

/* ===== НОВЫЙ ПУНКТ "AI-АНАЛИЗАТОР" С БЕЙДЖЕМ ===== */
.menu ul li a .badge-new {
    background: #16a34a;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 40px;
    margin-left: 8px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ ===== */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
    }
    .menu ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .menu ul li a {
        padding: 12px 16px;
    }
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: #f8fafc;
    }
    .menu ul li.dropdown:hover .dropdown-content {
        display: none;
    }
    /* На телефонах выпадайка открывается кликом (JS) */
    .dropdown-content.open {
        display: block !important;
    }
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: #7c3aed;
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

h2 {
    color: #7c3aed;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

input[type="text"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #7c3aed;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #7c3aed;
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #333;
    margin-right: 10px;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.ideas-list {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.idea-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.idea-card:hover {
    border-color: #7c3aed;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.idea-number {
    color: #7c3aed;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.idea-text {
    color: #333;
    line-height: 1.6;
}

.posts-container {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.post-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.post-title {
    color: #7c3aed;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
}

.post-content {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
}

.hashtags {
    color: #7c3aed;
    font-weight: 600;
    margin-bottom: 10px;
}

.call-to-action {
    color: #059669;
    font-weight: 600;
    margin-bottom: 10px;
}

.media-recommendation {
    color: #6b7280;
    font-style: italic;
}

.publishing-time {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.publishing-time h3 {
    color: #92400e;
    margin-bottom: 10px;
}

.time-item {
    margin-bottom: 8px;
    color: #78350f;
}

.buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.buttons-row button {
    flex: 1;
    min-width: 150px;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e5e7eb;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: #7c3aed;
    font-size: 1.2em;
    font-weight: 600;
}

footer {
    background: #f9fafb;
    padding: 20px;
    text-align: center;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    main {
        padding: 20px;
    }
    
    .buttons-row {
        flex-direction: column;
    }
    
    .buttons-row button {
        width: 100%;
    }
}