/* =====================================================================
   🎯 ULTRA DARK TECH DESIGN SYSTEM (ООО "НЕКСТ ТАЙМ")
   ===================================================================== */

:root {
    --bg-main: #060913;       /* Наглухо темный космический фон */
    --bg-card: rgba(13, 18, 33, 0.75); /* Полупрозрачное стекло */
    --text-main: #f8fafc;     /* Белоснежный премиальный текст */
    --text-muted: #64748b;    /* Глубокий серый */
    --neon-cyan: #06b6d4;     /* ИИ-Циан (Свечение) */
    --neon-green: #10b981;    /* Финтех-Изумруд */
    --border-glass: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* 🎨 ИМПОРТ ФИРМЕННОГО ШРИФТА DOBROZRACHNIY */
@font-face {
    font-family: 'Dobrozrachniy';
    src: url('/static/fonts/dobrozrachniy.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    background-color: var(--bg-main) !important; /* Жесткий приоритет темного фона */
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 🧭 Умная Фиксированная Шапка */
.header {
    background: rgba(6, 9, 19, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav {
    display: flex;
    gap: 28px;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s, text-shadow 0.2s;
}

.nav a:hover, .nav a.active {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* 🧱 Главный Ограничитель Контента (Убирает размазывание по центру) */
.main-wrapper {
    max-width: 900px; /* Жестко фиксируем ширину текстового контура */
    margin: 140px auto 60px auto; /* Четкий отступ сверху от шапки */
    padding: 0 20px;
}

/* 💳 Стекло-Карточки (Glassmorphism) */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 30px 60px -15px rgba(6, 182, 212, 0.1);
}

/* ⚡ Футуристичные Кнопки */
.btn {
    background: linear-gradient(135deg, #06b6d4 0%, #0d9488 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: box-shadow 0.2s, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
    opacity: 0.95;
}

/* 🤖 Контур ИИ-Чата Архитектора */
.chat-window {
    height: 380px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.msg {
    padding: 14px 18px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.msg.user {
    background: #1e293b;
    color: var(--text-main);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    border-right: 3px solid var(--neon-green);
}

.msg.ai {
    background: rgba(6, 182, 212, 0.08);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border-left: 3px solid var(--neon-cyan);
}