/* ==========================================================================
   TrumorGPT — Cognee.ai Inspired Dark Theme
   Aesthetics: Pitch Black (#000000), Canvas 40px Tetris Grid, Soft Lavender/Purple (#C4B5FD, #A78BFA)
   ========================================================================== */

:root {
    --bg-black: #000000;
    --card-surface: #09090B;
    --card-border: #18181B;
    --card-border-active: #27272A;
    --purple-primary: #C4B5FD;
    --purple-hover: #DDD6FE;
    --purple-accent: #7C3AED;
    --purple-subtle: rgba(167, 139, 250, 0.12);
    --text-white: #ECECEE;
    --text-muted: #A1A1AA;
    --text-subtle: #71717A;
    --rose-dark: rgba(239, 68, 68, 0.15);
    --rose-border: #EF4444;
    --emerald-dark: rgba(16, 185, 129, 0.15);
    --emerald-border: #10B981;
    --amber-border: #F59E0B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* FULLSCREEN BACKGROUND CANVAS FOR TETRIS & GRID */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background-color: #000000;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 16px 0;
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-white);
}

.brand-dim {
    color: var(--text-muted);
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: var(--text-white);
}

.nav-arrow {
    font-size: 10px;
    margin-left: 2px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    padding: 4px 12px;
    border-radius: 100px;
}

.dot-purple {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--purple-primary);
    box-shadow: 0 0 6px var(--purple-primary);
}

.nav-cta-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.github-star-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    text-decoration: none;
    transition: all 0.15s ease;
}

.github-star-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-purple-pill {
    background: var(--purple-primary);
    color: #09090B;
    border: none;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-purple-pill:hover {
    background: var(--purple-hover);
    transform: translateY(-1px);
}

/* MAIN LAYOUT */
.container {
    max-width: 1080px;
    margin: 60px auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* HERO SECTION */
.hero {
    text-align: center;
    margin-bottom: 60px;
}

.hero-announcement {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    color: var(--purple-primary);
    margin-bottom: 28px;
}

.announcement-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--purple-primary);
}

.announcement-arrow {
    font-size: 11px;
}

.hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--text-white);
    margin-bottom: 20px;
}

.hero-subtext {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 36px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.btn-purple-lg {
    background: var(--purple-primary);
    color: #09090B;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.25);
}

.btn-purple-lg:hover {
    background: var(--purple-hover);
    transform: translateY(-2px);
}

.btn-outline-lg {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--card-border-active);
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.btn-outline-lg:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

/* WORKS WITH INTEGRATION STRIP */
.works-with {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-subtle);
    font-weight: 500;
}

.works-label {
    color: #52525B;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* INPUT CARD & WORKSPACE */
.editor-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border-active);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 13px;
}

.editor-title {
    color: var(--text-white);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-mode {
    color: var(--text-subtle);
}

textarea {
    width: 100%;
    background: #000000;
    border: 1px solid var(--card-border-active);
    border-radius: 10px;
    padding: 16px;
    color: var(--text-white);
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s ease;
}

textarea:focus {
    border-color: var(--purple-primary);
}

.preset-selector {
    margin: 16px 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.preset-label {
    font-size: 12px;
    color: var(--text-subtle);
}

.preset-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border-active);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preset-btn:hover {
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

.workspace-actions {
    display: flex;
    gap: 12px;
}

.btn-purple-full {
    flex: 2;
    background: var(--purple-primary);
    color: #09090B;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-purple-full:hover {
    background: var(--purple-hover);
}

.btn-outline-action {
    flex: 1;
    background: transparent;
    border: 1px solid var(--card-border-active);
    color: var(--text-white);
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.btn-outline-action:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

/* VERDICT CARD (COGNEE STYLE) */
.cognee-verdict-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border-active);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.cognee-verdict-card.verdict-false {
    border-color: var(--rose-border);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), var(--card-surface));
}

.cognee-verdict-card.verdict-true {
    border-color: var(--emerald-border);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), var(--card-surface));
}

.cognee-verdict-card.verdict-undetermined {
    border-color: var(--amber-border);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), var(--card-surface));
}

.verdict-media-box {
    width: 130px;
    height: 130px;
    min-width: 130px;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    border: 1px solid var(--card-border-active);
    display: flex;
    align-items: center;
    justify-content: center;
}

.verdict-media-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cognee-verdict-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.verdict-false .cognee-verdict-title { color: #EF4444; }
.verdict-true .cognee-verdict-title { color: #10B981; }
.verdict-undetermined .cognee-verdict-title { color: #F59E0B; }

.cognee-verdict-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* STATS ROW */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border-active);
    padding: 20px;
    border-radius: 14px;
    text-align: left;
}

.stat-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-subtle);
}

/* GRAPH VISUALIZER */
.visualizer-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.graphs-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 60px;
}

@media (max-width: 850px) {
    .graphs-wrapper, .metrics-row, .features-grid {
        grid-template-columns: 1fr;
    }
    .col-span-2 {
        grid-column: span 1 !important;
    }
}

.graph-box {
    background: var(--card-surface);
    border: 1px solid var(--card-border-active);
    border-radius: 14px;
    padding: 16px;
}

.graph-box-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-white);
}

.box-tag {
    font-size: 11px;
    color: var(--text-subtle);
    border: 1px solid var(--card-border-active);
    padding: 2px 8px;
    border-radius: 4px;
}

.box-tag.purple {
    color: var(--purple-primary);
    border-color: rgba(167, 139, 250, 0.3);
}

.mermaid-container {
    background: #000000;
    border: 1px solid var(--card-border-active);
    border-radius: 10px;
    padding: 16px;
    min-height: 220px;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
}

/* ARCHITECTURE SECTION (5 PAPER COMPONENTS GRID) */
.architecture-section, .developer-section {
    margin-bottom: 80px;
}

.section-title-box {
    text-align: center;
    margin-bottom: 40px;
}

.section-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--purple-primary);
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    padding: 4px 12px;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border-active);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.15s ease;
}

.feature-card:hover {
    border-color: rgba(167, 139, 250, 0.4);
    transform: translateY(-2px);
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    color: var(--purple-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 16px;
}

.feature-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-white);
}

.feature-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.col-span-2 {
    grid-column: span 2;
}

/* TERMINAL QUICKSTART WIDGET */
.terminal-card {
    background: #000000;
    border: 1px solid var(--card-border-active);
    border-radius: 16px;
    overflow: hidden;
}

.terminal-header {
    background: var(--card-surface);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #EF4444; }
.dot.yellow { background: #F59E0B; }
.dot.green { background: #10B981; }

.terminal-title {
    font-size: 12px;
    color: var(--text-subtle);
    font-family: 'JetBrains Mono', monospace;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy-btn:hover {
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.3);
}

.terminal-code {
    padding: 20px;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--purple-primary);
    line-height: 1.6;
    overflow-x: auto;
}

/* MODAL */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: var(--card-surface);
    border: 1px solid var(--card-border-active);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    padding: 24px;
}

.modal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-subtle);
    font-size: 22px;
    cursor: pointer;
}

.field {
    margin-bottom: 16px;
}

.field label {
    font-size: 12px;
    color: var(--text-subtle);
    display: block;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    background: #000000;
    border: 1px solid var(--card-border-active);
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-white);
    outline: none;
}

.triple-row {
    display: flex;
    gap: 8px;
}

/* FOOTER */
.footer {
    border-top: 1px solid var(--card-border);
    padding: 24px 0;
    font-size: 13px;
    color: var(--text-subtle);
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-subtle);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-white);
}

.hidden { display: none !important; }

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
