/* ==========================================================================
   AI Conversation Analyzer — Pages
   ========================================================================== */

/* ===========================
   Docs Page — Layout
   =========================== */

.docs-layout {
    display: flex;
    max-width: var(--container);
    margin: 0 auto;
    height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
}

/* Sidebar */
.docs-sidebar {
    width: 260px;
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    padding: 32px 0 32px 24px;
    border-right: 1px solid var(--border-light);
}

/* Mobile Nav (hidden on desktop) */
.docs-mobile-bar { display: none; }
.docs-mobile-dropdown { display: none; }

.docs-nav-group {
    margin-bottom: 28px;
}

.docs-nav-heading {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.docs-nav-link {
    display: block;
    padding: 7px 12px 7px 27px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    text-decoration: none;
    transition: all var(--transition);
    line-height: 1.5;
}

.docs-nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.docs-nav-link.active {
    color: var(--primary);
    background: var(--primary-bg);
    border-left-color: var(--primary);
    font-weight: 500;
}

/* Main Content */
.docs-content {
    flex: 1;
    min-width: 0;
    padding: 32px 56px 80px;
    max-width: 820px;
    overflow-y: auto;
    height: 100%;
}

/* Search Bar */
.docs-search {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    margin-bottom: 32px;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color var(--transition);
}

.docs-search:focus-within {
    border-color: var(--primary-border);
}

.docs-search i {
    color: var(--muted);
    font-size: 14px;
    flex-shrink: 0;
}

.docs-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

.docs-search input::placeholder {
    color: var(--muted);
}

.docs-search kbd {
    padding: 2px 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--muted);
    background: var(--bg-2);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    flex-shrink: 0;
}

/* Search Results Dropdown */
.docs-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin-top: 6px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 100;
}
.docs-search-results.open { display: block; }

.docs-search-result {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}
.docs-search-result:last-child { border-bottom: none; }
.docs-search-result:hover { background: rgba(255,255,255,0.04); }
.docs-search-result-title { font-size: 14px; font-weight: 500; }
.docs-search-result-section { font-size: 12px; color: var(--muted); }
.docs-search-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* ===========================
   Docs — Rendered Markdown Content
   =========================== */

#docs-content-inner h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 16px; line-height: 1.2; }
#docs-content-inner h2 { font-size: 1.5rem; font-weight: 700; margin: 40px 0 12px; line-height: 1.25; }
#docs-content-inner h3 { font-size: 1.2rem; font-weight: 600; margin: 32px 0 10px; line-height: 1.3; }
#docs-content-inner h4 { font-size: 1.05rem; font-weight: 600; margin: 28px 0 8px; }

#docs-content-inner p { margin-bottom: 16px; line-height: 1.75; color: var(--text-secondary); }

#docs-content-inner ul,
#docs-content-inner ol { margin-bottom: 16px; padding-left: 24px; }
#docs-content-inner ul { list-style: disc; }
#docs-content-inner ol { list-style: decimal; }
#docs-content-inner li { margin-bottom: 8px; line-height: 1.7; color: var(--text-secondary); }
#docs-content-inner li:last-child { margin-bottom: 0; }

#docs-content-inner blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    border-left: 3px solid var(--primary);
    background: var(--primary-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}
#docs-content-inner blockquote p { margin-bottom: 0; }

#docs-content-inner hr { margin: 32px 0; border: none; border-top: 1px solid var(--border-light); }

#docs-content-inner pre { margin-bottom: 20px; }
#docs-content-inner pre code { display: block; }

#docs-content-inner table { margin-bottom: 20px; }

#docs-content-inner img { margin: 20px 0; border-radius: var(--radius); }

#docs-content-inner strong { font-weight: 600; color: var(--text); }

/* ===========================
   Docs Page — Sections
   =========================== */

.docs-section {
    padding: 8px 0 32px;
}

.docs-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    scroll-margin-top: calc(var(--nav-height) + 24px);
}

.docs-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.docs-lead {
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.7;
}

.docs-section p {
    margin-bottom: 16px;
    line-height: 1.75;
    color: var(--text-secondary);
}

.docs-section code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--surface-2);
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--primary);
    border: 1px solid var(--border-light);
}

/* ===========================
   Docs Page — Sidebar Scrollbar
   =========================== */

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ===========================
   Docs Page — Code Blocks
   =========================== */

.docs-code-block {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
}

.docs-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-light);
}

.docs-code-lang {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.docs-copy-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    transition: all var(--transition);
}

.docs-copy-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.docs-code-block pre {
    padding: 18px 20px;
    margin: 0;
    overflow-x: auto;
}

.docs-code-block pre code {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0;
    white-space: pre;
}

/* ===========================
   Docs Page — Callouts
   =========================== */

.docs-callout {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.7;
}

.docs-callout p { margin: 0; font-size: 14px; }
.docs-callout strong { display: block; margin-bottom: 2px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.docs-callout > i { margin-top: 2px; flex-shrink: 0; font-size: 16px; }

.docs-callout-tip {
    background: var(--green-bg);
    border-color: rgba(63, 185, 80, 0.25);
}
.docs-callout-tip i,
.docs-callout-tip strong { color: var(--green); }

.docs-callout-note {
    background: var(--primary-bg);
    border-color: var(--primary-border);
}
.docs-callout-note i,
.docs-callout-note strong { color: var(--primary); }

.docs-callout-warning {
    background: var(--amber-bg);
    border-color: rgba(210, 153, 34, 0.25);
}
.docs-callout-warning i,
.docs-callout-warning strong { color: var(--amber); }

/* ===========================
   Docs Page — Tables
   =========================== */

.docs-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.docs-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
}

.docs-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: top;
}

.docs-table tr:last-child td { border-bottom: none; }

.docs-table td code {
    font-size: 0.85em;
    white-space: nowrap;
}

/* ===========================
   Docs Page — Steps
   =========================== */

.docs-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.docs-steps li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.docs-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-bg);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.docs-steps li div { flex: 1; }
.docs-steps li strong { display: block; margin-bottom: 4px; font-size: 15px; }
.docs-steps li p { margin: 0; font-size: 14px; color: var(--muted); }

/* ===========================
   Docs Page — Lists
   =========================== */

.docs-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
}

.docs-list li i {
    color: var(--green);
    font-size: 14px;
    flex-shrink: 0;
}

/* ===========================
   Docs Page — Tabs
   =========================== */

.docs-tabs {
    margin-bottom: 24px;
}

.docs-tab-buttons {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0;
}

.docs-tab-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.docs-tab-btn:hover { color: var(--text); }
.docs-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.docs-tab-panel { display: none; }
.docs-tab-panel.active { display: block; padding-top: 16px; }

/* ===========================
   Docs Page — FAQ
   =========================== */

.docs-faq-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.docs-faq-item:last-child { border-bottom: none; }

.docs-faq-item h4 {
    margin-bottom: 8px;
    color: var(--text);
}

.docs-faq-item p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===========================
   Docs Page — Placeholder
   =========================== */

.docs-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    text-align: center;
}

.docs-placeholder i {
    font-size: 2rem;
    color: var(--muted-dim);
    margin-bottom: 12px;
}

.docs-placeholder p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

/* ===========================
   Docs Page — Prev / Next
   =========================== */

.docs-prev-next {
    display: flex;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}
.docs-prev, .docs-next {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}
.docs-prev:hover, .docs-next:hover {
    border-color: var(--primary-border);
    background: var(--primary-bg);
}
.docs-next { text-align: right; align-items: flex-end; }
.docs-prev-next-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.docs-prev-next-title { font-size: 15px; font-weight: 600; color: var(--text); }

/* ===========================
   Docs Page — Footer
   =========================== */

.docs-footer {
    display: flex;
    gap: 12px;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--border-light);
}

/* ===========================
   Docs Page — Loading
   =========================== */

.docs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    color: var(--muted);
}

.docs-loading i {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.docs-loading p {
    margin: 0;
    font-size: 14px;
}

/* ===========================
   Timeline / Roadmap
   =========================== */

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--primary);
}

.timeline-dot.done { background: var(--green); border-color: var(--green); }
.timeline-dot.planned { background: var(--surface); border-color: var(--muted-dim); }

.timeline-phase {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 10px;
}

.timeline-item h4 { margin-bottom: 6px; }
.timeline-item p { font-size: 14px; color: var(--muted); margin-bottom: 10px; }

.timeline-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-task {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.timeline-task.done { color: var(--green); border-color: rgba(63, 185, 80, 0.3); }
.timeline-task.planned { color: var(--muted); }

/* ===========================
   Changelog
   =========================== */

.release-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.release-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.release-version {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--primary);
}

.release-date {
    font-size: 13px;
    color: var(--muted);
}

.release-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.release-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.release-item::before {
    content: "•";
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ===========================
   About Page
   =========================== */

.about-hero {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 0;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* ===========================
   404 Page
   =========================== */

.page-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.page-404 h1 {
    font-size: 8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

.page-404 p {
    font-size: 1.2rem;
    margin-bottom: 36px;
}

/* ===========================
   Feature Illustration
   =========================== */

.feature-illustration {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    overflow: hidden;
}

.feature-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===========================
   Contributing Page
   =========================== */

/* Tag row inside cards */
.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Prerequisites list */
.prereq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.prereq-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prereq-list li i {
    color: var(--primary);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Code block */
.code-block {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    line-height: 1.9;
    overflow-x: auto;
    border: 1px solid var(--border-light);
    white-space: pre;
    max-width: 100%;
}

.code-block .comment { color: var(--muted); }
.code-block .highlight { color: var(--green); }

/* File tree */
.file-tree {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 2.2;
    text-align: left;
}

.file-tree .file { color: var(--primary); }
.file-tree .file-green { color: var(--green); }

/* Steps grid override for 5 items */
.steps-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
}

.steps-5::before {
    content: "";
    position: absolute;
    top: 36px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--purple), var(--green));
    opacity: 0.3;
}

/* PR timeline centering */
.timeline-centered {
    max-width: 700px;
    margin: 0 auto;
}
