/* Основные стили AI Neiro - Общие для всего сайта */

/* ===== ШРИФТЫ ===== */
/* Локальное подключение шрифта Press Start 2P со всеми вариантами */
/* cyrillic-ext */
@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/PressStart2P-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/PressStart2P-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/PressStart2P-greek.woff2') format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/PressStart2P-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/PressStart2P-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Цветовая палитра на основе логотипа */
    --color-blue: #2563EB;
    --color-blue-light: #60A5FA;
    --color-pink: #EC4899;
    --color-pink-light: #F472B6;
    --color-purple: #8B5CF6;
    --color-purple-dark: #6D28D9;
    --color-cyan: #06B6D4;
    --color-cyan-light: #22D3EE;
    --color-orange: #F59E0B;
    --color-dark: #1a1a2e;
    --color-dark-lighter: #16213e;
    --color-dark-input: #0f1419;
    --color-light: #F5F5F5;
    --color-gray: #9CA3AF;
    --color-border: #374151;
}

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f1419 100%);
    color: var(--color-light);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Пиксельный эффект для всего */
* {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* ===== КОНТЕЙНЕРЫ ===== */
/* Контейнер приложения с боковой панелью */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Контейнер для страниц генерации без бокового меню */
.app-container-full {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

/* ===== БОКОВАЯ ПАНЕЛЬ (SIDEBAR) ===== */
.sidebar {
    width: 280px;
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border-right: 4px solid var(--color-cyan);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

/* Логотип */
.sidebar-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid var(--color-purple);
}

.sidebar-logo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--color-pink);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.5),
                0 0 40px rgba(139, 92, 246, 0.3);
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.5),
                    0 0 40px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(236, 72, 153, 0.8),
                    0 0 60px rgba(139, 92, 246, 0.5);
    }
}

/* Кнопки навигации */
.sidebar-nav {
    padding: 25px 15px;
    flex-shrink: 0;
}

.nav-button {
    display: block;
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-purple) 100%);
    color: white;
    border: none;
    border-radius: 0;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    position: relative;
    text-align: left;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

.nav-button:last-child {
    margin-bottom: 0;
}

.nav-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
}

.nav-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.nav-button.active {
    background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 100%);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}

.nav-button[href] {
    text-decoration: none;
    display: block;
}

/* История диалогов */
.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    border-top: 3px solid var(--color-purple);
}

.chat-history h3 {
    font-size: 10px;
    color: var(--color-gray);
    margin-bottom: 10px;
    text-align: center;
}

.history-placeholder {
    text-align: center;
    font-size: 8px;
    color: var(--color-gray);
    padding: 20px;
}

/* Нижние кнопки боковой панели */
.sidebar-footer {
    margin-top: auto;
    padding: 20px 15px;
    border-top: 3px solid var(--color-purple);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.footer-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    border: 3px solid;
    text-align: center;
    text-decoration: none;
}

.support-button {
    background: rgba(139, 92, 246, 0.2);
    color: var(--color-purple);
    border-color: var(--color-purple);
}

.support-button:hover {
    background: rgba(139, 92, 246, 0.4);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
}

.pricing-button {
    background: rgba(6, 182, 212, 0.2);
    color: var(--color-cyan);
    border-color: var(--color-cyan);
}

.pricing-button:hover {
    background: rgba(6, 182, 212, 0.4);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
}

.footer-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

/* Правовые ссылки в боковой панели */
.sidebar-legal-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-link {
    font-size: 7px;
    color: var(--color-gray);
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    padding: 8px 5px;
    line-height: 1.4;
}

.legal-link:hover {
    color: var(--color-cyan);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* ===== ХЕДЕР (для главной страницы) ===== */
.main-header {
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-bottom: 4px solid var(--color-blue);
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.main-header h1 {
    font-size: 20px;
    background: linear-gradient(135deg, var(--color-cyan), var(--color-pink), var(--color-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
}

.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.auth-button {
    padding: 14px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    border: 3px solid;
    text-align: center;
}

.login-button {
    background: rgba(139, 92, 246, 0.2);
    color: var(--color-purple);
    border-color: var(--color-purple);
}

.login-button:hover {
    background: rgba(139, 92, 246, 0.4);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
}

.register-button {
    background: rgba(6, 182, 212, 0.2);
    color: var(--color-cyan);
    border-color: var(--color-cyan);
}

.register-button:hover {
    background: rgba(6, 182, 212, 0.4);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
}

.auth-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

/* ===== SCROLLBAR ===== */
.chat-area::-webkit-scrollbar,
.generation-area::-webkit-scrollbar {
    width: 12px;
}

.chat-area::-webkit-scrollbar-track,
.generation-area::-webkit-scrollbar-track {
    background: var(--color-dark);
    border-left: 2px solid var(--color-purple);
}

.chat-area::-webkit-scrollbar-thumb,
.generation-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-purple), var(--color-pink));
    border-radius: 0;
}

.chat-area::-webkit-scrollbar-thumb:hover,
.generation-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-cyan), var(--color-blue));
}

/* ===== КНОПКА МЕНЮ (МОБИЛЬНАЯ) ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(6, 182, 212, 0.22);
    border: 3px solid var(--color-cyan);
    cursor: pointer;
    padding: 8px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-cyan);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(6, 182, 212, 0.4);
}

/* Оверлей для мобильного меню */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ===== АДАПТИВНОСТЬ (ПЛАНШЕТЫ) ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .sidebar-logo img {
        width: 80px;
        height: 80px;
    }
    
    .nav-button {
        font-size: 9px;
        padding: 14px 15px;
    }
}

/* ===== АДАПТИВНОСТЬ (МОБИЛЬНЫЕ) ===== */
@media (max-width: 768px) {
    /* Боковое меню - выдвижное */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        pointer-events: auto;
    }
    
    .sidebar-logo {
        padding: 15px;
    }

    .sidebar-logo img {
        width: 80px;
        height: 80px;
    }

    .nav-button {
        font-size: 9px;
        padding: 15px;
    }

    .chat-history {
        display: block;
    }
    
    .chat-history h3 {
        font-size: 9px;
    }

    .sidebar-footer {
        padding: 15px;
    }

    .footer-button {
        font-size: 8px;
        padding: 12px 15px;
    }

    .sidebar-legal-links {
        gap: 8px;
    }

    .legal-link {
        font-size: 7px;
        padding: 8px 5px;
    }
    
    /* Показываем кнопку меню */
    .menu-toggle {
        display: flex;
    }

    /* Хедер */
    .main-header {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 15px;
    }

    .main-header h1 {
        font-size: 10px;
        flex: 1;
        text-align: center;
    }

    /* Скрываем кнопку регистрации на мобильных */
    .register-button {
        display: none;
    }

    .auth-buttons {
        width: auto;
    }

    .auth-button {
        font-size: 7px;
        padding: 10px 14px;
    }
    
    /* Область чата */
    .app-container {
        flex-direction: column;
    }
}

/* ===== АДАПТИВНОСТЬ (МАЛЕНЬКИЕ МОБИЛЬНЫЕ) ===== */
@media (max-width: 480px) {
    .sidebar {
        width: 260px;
        left: -260px;
    }
    
    .sidebar-logo img {
        width: 60px;
        height: 60px;
    }
    
    .nav-button {
        font-size: 8px;
        padding: 12px;
    }
    
    .footer-button {
        font-size: 7px;
        padding: 10px 12px;
    }
    
    .legal-link {
        font-size: 6px;
    }

    .main-header {
        padding: 12px 10px;
    }

    .main-header h1 {
        font-size: 11px;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
        padding: 7px;
    }

    .auth-button {
        font-size: 6px;
        padding: 8px 12px;
    }
}
