/* ========== RESET & VARIABLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-yellow: #ffff00;
    --neon-purple: #a55eea;
    --dark-bg: #0a0a0a;
    --card-bg: #0f0f0f;
    --text-muted: #ff69b4;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background: var(--dark-bg);
    color: var(--neon-pink);
}

/* ========== Background Canvas ========== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========== Main Container ========== */
.main-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 10;
    background: rgba(10, 10, 10, 0.85);
}

/* ========== Side Navigation ========== */
.side-nav {
    width: 250px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-right: 2px solid var(--neon-cyan);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 20;
}

.nav-logo {
    margin-bottom: 40px;
    text-align: center;
}

.logo-main {
    font-weight: 900;
    font-size: 1.3em;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.logo-sub {
    font-weight: 700;
    font-size: 0.9em;
    color: var(--neon-pink);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.nav-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-btn {
    padding: 15px 20px;
    background: rgba(255, 0, 255, 0.05);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95em;
    text-align: left;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateX(5px);
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    color: var(--dark-bg);
    border-color: var(--neon-pink);
}

.nav-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid var(--neon-cyan);
}

.nav-footer a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 700;
}

.nav-footer a:hover {
    color: var(--neon-yellow);
}

/* ========== Content Area ========== */
.content-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

/* ========== Pages ========== */
.page {
    display: none;
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-content {
    text-align: center;
}

.page-title {
    font-size: 2.5em;
    font-weight: 900;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 3.5em;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.author-name {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.subtitle {
    font-size: 1.3em;
    color: var(--neon-cyan);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.btn {
    padding: 15px 30px;
    border: 2px solid var(--neon-cyan);
    background: rgba(255, 0, 255, 0.1);
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4);
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    border: none;
    color: var(--dark-bg);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9em;
    margin-top: 20px;
}

/* ========== Cards ========== */
.card {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid var(--neon-cyan);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(255, 0, 255, 0.3);
}

/* ========== Manifesto ========== */
.manifesto-list {
    list-style: none;
}

.manifesto-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 0, 255, 0.05);
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
}

.manifesto-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--neon-pink);
}

.manifesto-text {
    flex: 1;
    font-weight: 700;
    text-align: left;
    color: var(--neon-cyan);
}

.manifesto-hint {
    font-size: 0.85em;
    color: var(--neon-yellow);
}

/* ========== Features Grid ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature {
    background: rgba(255, 0, 255, 0.05);
    border: 2px solid var(--neon-cyan);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 255, 0.3);
    border-color: var(--neon-pink);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-title {
    font-size: 1.2em;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--neon-yellow);
}

/* ========== Reports ========== */
.reports-list {
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 10, 10, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-yellow);
}

/* ========== AI Assistant - КОМПАКТНЫЙ ========== */
.ai-assistant {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.6);
    z-index: 1000;
    animation: pulse 2s ease-in-out infinite;
    border: none;
}

.ai-window {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    max-height: 450px;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 15px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(255, 0, 255, 0.4);
    backdrop-filter: blur(20px);
}

.ai-window.active {
    display: flex;
}

.ai-header {
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 255, 0.2));
    border-bottom: 2px solid var(--neon-cyan);
    border-radius: 13px 13px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-header-icon {
    font-size: 1.5em;
    animation: bounce 2s ease-in-out infinite;
}

.ai-header h3 {
    margin: 0;
    color: var(--neon-cyan);
    font-size: 1em;
    font-weight: 900;
}

.ai-close {
    background: rgba(255, 0, 255, 0.2);
    border: none;
    color: var(--neon-pink);
    font-size: 1.2em;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-close:hover {
    background: rgba(255, 0, 255, 0.4);
    transform: rotate(90deg) scale(1.1);
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    min-height: 150px;
}

.ai-message {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    animation: messageSlide 0.3s ease;
    position: relative;
    line-height: 1.4;
    font-size: 0.9em;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-bot {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(165, 94, 234, 0.3));
    border: 1px solid var(--neon-pink);
    color: var(--neon-cyan);
    border-bottom-left-radius: 4px;
}

.ai-user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(0, 255, 255, 0.2));
    border: 1px solid var(--neon-cyan);
    color: var(--neon-pink);
    border-bottom-right-radius: 4px;
}

.ai-message-content {
    margin-bottom: 3px;
}

.ai-time {
    font-size: 0.65em;
    opacity: 0.6;
    text-align: right;
    display: block;
    margin-top: 3px;
}

.ai-typing {
    display: none;
    padding: 8px 12px;
    background: rgba(255, 0, 255, 0.1);
    border-top: 1px solid var(--neon-cyan);
}

.ai-typing.active {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-10px); opacity: 1; }
}

.ai-quick-questions {
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 0, 255, 0.3);
}

.ai-quick-questions button {
    padding: 6px 10px;
    background: rgba(255, 0, 255, 0.15);
    border: 1px solid var(--neon-cyan);
    border-radius: 15px;
    color: var(--neon-cyan);
    cursor: pointer;
    font-size: 0.75em;
    transition: all 0.3s;
    font-weight: 600;
}

.ai-quick-questions button:hover {
    background: rgba(0, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 255, 255, 0.4);
}

.ai-input-area {
    padding: 10px;
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--neon-cyan);
    border-radius: 0 0 13px 13px;
}

.ai-input-area input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    color: var(--neon-cyan);
    outline: none;
    font-size: 0.85em;
    transition: all 0.3s;
}

.ai-input-area input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.ai-input-area input::placeholder {
    color: rgba(0, 255, 255, 0.5);
}

.ai-send-btn {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    border: none;
    border-radius: 50%;
    color: var(--dark-bg);
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.ai-send-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 3px 15px rgba(255, 0, 255, 0.6);
}

/* ========== Graph on About Page ========== */
#graph-container {
    display: none;
    position: relative;
    width: 100%;
    height: calc(100vh - 200px);
    margin-top: 20px;
}

#graph-container.active {
    display: block;
}

#graph-canvas {
    border-radius: 20px;
    width: 100%;
    height: 100%;
}

.graph-tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    color: #0a0e27;
    padding: 12px 18px;
    border-radius: 10px;
    border: 2px solid #ff0080;
    box-shadow: 0 0 25px rgba(255, 0, 128, 0.6);
    max-width: 280px;
    font-size: 13px;
    line-height: 1.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.graph-tooltip.active {
    opacity: 1;
}

.graph-tooltip h4 {
    margin: 0 0 6px 0;
    color: #ff0080;
    font-size: 14px;
    font-weight: 700;
}

.graph-info-panel {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 25px;
    border-radius: 15px;
    border: 2px solid #00ffff;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
    text-align: center;
    max-width: 450px;
}

.graph-info-panel.active {
    opacity: 1;
}

.graph-toggle-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #0a0e27;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    z-index: 100;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255,215,0,0.4), 0 0 30px rgba(255,140,0,0.3);
}

.graph-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255,215,0,0.6), 0 0 40px rgba(255,140,0,0.5);
}

.simple-about {
    text-align: center;
    padding: 40px 20px;
}

.simple-about.hidden {
    display: none;
}

/* ========== Animations ========== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ========== Mobile ========== */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .side-nav {
        width: 100%;
        flex-direction: row;
        padding: 15px;
        border-right: none;
        border-bottom: 2px solid var(--neon-cyan);
    }

    .nav-logo {
        margin-bottom: 0;
    }

    .logo-main {
        font-size: 1em;
    }

    .logo-sub {
        font-size: 0.8em;
    }

    .nav-buttons {
        flex-direction: row;
        flex: none;
    }

    .nav-btn {
        padding: 10px 15px;
        font-size: 0.85em;
    }

    .nav-footer {
        display: none;
    }

    .content-area {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .author-name {
        font-size: 1.5em;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .ai-window {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 80px;
        max-height: 400px;
    }

    .ai-assistant {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
        right: 20px;
        bottom: 20px;
    }
}