/* ============================================
   ANAXIMANDER INTERACTIVE TEACHER MENTOR
   Complete Styles — Green theme (#10b981)
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.5);
    --primary-light: #34d399;
    --primary-dark: #059669;
    --primary-bg: rgba(16, 185, 129, 0.08);
    --primary-border: rgba(16, 185, 129, 0.2);
    --accent: #818cf8;
    --accent-bg: rgba(129, 140, 248, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --bg: #000000;
    --bg-raised: #0a0a0a;
    --bg-card: #111111;
    --text: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
    --nav-height: 72px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    padding: 0;
    height: var(--nav-height);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.nav-logo img {
    height: 50px;
    width: auto;
    transition: transform var(--transition);
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
}

.breadcrumb-item {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-item:hover {
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.breadcrumb-ellipsis {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 0 6px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
    transition: color var(--transition), background var(--transition);
}

.breadcrumb-ellipsis:hover {
    color: var(--text-secondary);
    background: var(--glass-hover);
}

.breadcrumb-expanded {
    flex-wrap: wrap;
    overflow: visible;
    white-space: normal;
}

/* Search */
.search-wrapper {
    position: relative;
    max-width: 320px;
    width: 100%;
    flex-shrink: 0;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all var(--transition);
}

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

.search-input:focus {
    border-color: var(--primary-border);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    max-height: 400px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--glass-hover);
}

.search-result-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.search-result-path {
    font-size: 12px;
    color: var(--text-muted);
}

.search-result-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.search-result-type.guide {
    background: var(--primary-bg);
    color: var(--primary);
}

.search-result-type.quiz {
    background: var(--accent-bg);
    color: var(--accent);
}

.search-result-type.diagnostic {
    background: var(--warning-bg);
    color: var(--warning);
}

/* Nav Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-btn svg {
    width: 20px;
    height: 20px;
}

.nav-icon-btn:hover {
    color: var(--text-secondary);
    background: var(--glass);
}

.nav-icon-btn.active {
    color: var(--primary);
    background: var(--primary-bg);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.lang-btn:hover {
    color: var(--text-secondary);
    background: var(--glass);
}

.lang-btn.active {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
}

.lang-divider {
    color: var(--text-muted);
    font-size: 12px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 8px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { margin-bottom: 6px; }
.hamburger span:nth-child(3) { margin-top: 6px; }

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    z-index: 99;
    border-bottom: 1px solid var(--glass-border);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 15px;
}

/* ============================================
   SIDE PANELS (Bookmarks & Progress)
   ============================================ */
.side-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--glass-border);
    z-index: 150;
    transition: right var(--transition);
    display: flex;
    flex-direction: column;
}

.side-panel.active {
    right: 0;
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.side-panel-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.side-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition);
}

.side-panel-close:hover {
    color: var(--text);
    background: var(--glass);
}

.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 140;
}

.panel-overlay.active {
    display: block;
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    line-height: 1.7;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--glass);
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0;
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.progress-category {
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

.progress-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.progress-category-name {
    font-size: 14px;
    font-weight: 500;
}

.progress-category-count {
    font-size: 12px;
    color: var(--text-muted);
}

.progress-category-bar {
    width: 100%;
    height: 4px;
    background: var(--glass);
    border-radius: 2px;
    overflow: hidden;
}

.progress-category-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Bookmark Item */
.bookmark-item {
    padding: 12px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bookmark-item:hover {
    background: var(--glass-hover);
    border-color: var(--primary-border);
}

.bookmark-item-title {
    font-size: 14px;
    font-weight: 500;
}

.bookmark-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--transition);
}

.bookmark-item-remove:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    min-height: 100vh;
    padding-top: var(--nav-height);
}

/* ============================================
   WELCOME SCREEN
   ============================================ */
.welcome-screen {
    padding: 60px 0 80px;
}

.welcome-header {
    text-align: center;
    margin-bottom: 48px;
}

.welcome-title {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.category-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity var(--transition);
}

.category-card:hover {
    background: var(--glass-hover);
    border-color: var(--primary-border);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1);
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
    display: block;
    color: var(--primary);
}

.category-icon svg {
    width: 100%;
    height: 100%;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.category-count {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Quick Tools */
.quick-tools {
    margin-top: 20px;
}

.quick-tools-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

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

.tool-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.tool-card:hover {
    background: var(--glass-hover);
    border-color: var(--primary-border);
    transform: translateY(-2px);
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: var(--primary-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.tool-card-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tool-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   CONTENT VIEW — QUESTION NODES
   ============================================ */
.content-view {
    padding: 40px 0 80px;
}

.node-header {
    margin-bottom: 32px;
}

.node-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.node-description {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
}

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

.option-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.option-card:hover {
    background: var(--glass-hover);
    border-color: var(--primary-border);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

.option-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all var(--transition);
}

.option-card:hover .option-arrow {
    background: var(--primary);
    color: #fff;
}

.option-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.option-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   CONTENT VIEW — GUIDE NODES
   ============================================ */
.guide-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 40px;
    align-items: start;
}

.guide-main {
    min-width: 0;
}

.guide-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.guide-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.guide-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.guide-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.guide-action-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
}

.guide-action-btn svg {
    width: 16px;
    height: 16px;
}

.guide-action-btn:hover {
    background: var(--glass-hover);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.12);
}

.guide-action-btn.bookmarked {
    color: var(--primary);
    border-color: var(--primary-border);
    background: var(--primary-bg);
}

/* Guide Sections */
.guide-section {
    margin-bottom: 36px;
}

.guide-section-heading {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
    scroll-margin-top: calc(var(--nav-height) + 20px);
}

.guide-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.guide-text p {
    margin-bottom: 16px;
}

.guide-text p:last-child {
    margin-bottom: 0;
}

/* Theory Cards */
.theory-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.theory-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.theory-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.theory-application {
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
    padding-left: 16px;
    border-left: 3px solid var(--primary);
}

/* Strategy Cards */
.strategy-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.strategy-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.strategy-when {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-style: italic;
}

.strategy-steps {
    list-style: none;
    counter-reset: step;
}

.strategy-steps li {
    counter-increment: step;
    padding: 8px 0 8px 36px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.strategy-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 8px;
    width: 24px;
    height: 24px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Scenario / Case Study */
.scenario-block {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.scenario-label {
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 20px;
}

.scenario-content {
    padding: 20px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.scenario-analysis {
    border-top: 1px solid var(--glass-border);
}

/* Checklist */
.checklist {
    list-style: none;
}

.checklist li {
    padding: 10px 0 10px 32px;
    position: relative;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid var(--glass-border);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-border);
    border-radius: 4px;
}

/* Reflection Questions */
.reflection-list {
    list-style: none;
}

.reflection-list li {
    padding: 12px 0 12px 24px;
    position: relative;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

.reflection-list li::before {
    content: '?';
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--primary);
    font-weight: 700;
    font-style: normal;
}

/* Pitfalls */
.pitfalls-list {
    list-style: none;
}

.pitfalls-list li {
    padding: 10px 0 10px 28px;
    position: relative;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.pitfalls-list li::before {
    content: '!';
    position: absolute;
    left: 0;
    top: 10px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* References */
.references-list {
    list-style: none;
}

.references-list li {
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 16px;
    border-left: 2px solid var(--glass-border);
    margin-bottom: 8px;
}

/* Related Guides */
.related-guides {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
}

.related-guides h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

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

.related-link {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.related-link:hover {
    background: var(--glass-hover);
    border-color: var(--primary-border);
    color: var(--text);
}

/* Guide Sidebar TOC */
.guide-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

.guide-toc {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
}

.guide-toc-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.guide-toc-list {
    list-style: none;
}

.guide-toc-list li {
    margin-bottom: 4px;
}

.guide-toc-link {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
}

.guide-toc-link:hover {
    color: var(--text-secondary);
    background: var(--glass);
}

.guide-toc-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: var(--primary-bg);
}

/* Reflection button in guide */
.reflection-btn {
    margin-top: 12px;
    background: var(--glass);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    cursor: pointer;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--transition);
}

.reflection-btn:hover {
    background: var(--primary-bg);
}

/* ============================================
   QUIZ NODES
   ============================================ */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.quiz-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Quiz Progress */
.quiz-progress {
    margin-bottom: 32px;
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--glass);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.quiz-progress-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
}

/* Quiz Question */
.quiz-question {
    margin-bottom: 24px;
}

.quiz-question-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: left;
    font-family: inherit;
}

.quiz-option:hover {
    background: var(--glass-hover);
    border-color: var(--primary-border);
    color: var(--text);
}

.quiz-option.selected {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--text);
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.quiz-result-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--primary-bg);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.quiz-result-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.quiz-result-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 32px;
}

.quiz-recommended {
    text-align: left;
    margin-top: 32px;
}

.quiz-recommended h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

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

/* ============================================
   DIAGNOSTIC NODES
   ============================================ */
.diagnostic-container {
    max-width: 800px;
    margin: 0 auto;
}

.diagnostic-header {
    margin-bottom: 32px;
}

.diagnostic-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.diagnostic-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.diagnostic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 32px;
}

.diagnostic-checkbox {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    cursor: pointer;
    transition: all var(--transition);
}

.diagnostic-checkbox:hover {
    background: var(--glass-hover);
}

.diagnostic-checkbox.checked {
    background: var(--primary-bg);
    border-color: var(--primary-border);
}

.diagnostic-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.diagnostic-checkbox label {
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.diagnostic-results {
    border-top: 1px solid var(--glass-border);
    padding-top: 32px;
}

.diagnostic-results h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.diagnostic-results-empty {
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
}

.diagnostic-reco {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.diagnostic-reco:hover {
    background: var(--glass-hover);
    border-color: var(--primary-border);
}

.diagnostic-reco-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.diagnostic-reco-title {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   THEORY TIMELINE
   ============================================ */
.timeline-container {
    max-width: 900px;
    margin: 0 auto;
}

.timeline-header {
    text-align: center;
    margin-bottom: 40px;
}

.timeline-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    padding-left: 24px;
}

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

.timeline-year {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.timeline-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-theorist {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.timeline-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-link {
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    transition: opacity var(--transition);
}

.timeline-link:hover {
    opacity: 0.8;
}

/* ============================================
   STRATEGY FINDER
   ============================================ */
.strategy-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.filter-group select {
    width: 100%;
    padding: 8px 12px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.filter-group select option {
    background: var(--bg-card);
    color: var(--text);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--glass-hover);
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    padding: 8px 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}

.btn-back:hover {
    color: var(--text-secondary);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text);
    background: var(--glass);
}

.modal-body {
    padding: 24px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Journal */
.journal-textarea {
    width: 100%;
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition);
}

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

.journal-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: rgba(0, 0, 0, 0.6);
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
}

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

.footer-tagline {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}

.footer-links {
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition);
}

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

.footer-sep {
    color: var(--text-muted);
    margin: 0 12px;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .nav, .footer, .side-panel, .panel-overlay, .modal-overlay,
    .guide-sidebar, .guide-actions, .btn-back, .related-guides,
    .reflection-btn, .search-wrapper, .nav-right {
        display: none !important;
    }

    body {
        background: white;
        color: #1a1a1a;
        font-size: 12pt;
    }

    .main-content {
        padding-top: 0;
    }

    .guide-layout {
        grid-template-columns: 1fr;
    }

    .guide-title {
        font-size: 24pt;
        color: #1a1a1a;
    }

    .guide-section-heading {
        font-size: 16pt;
        color: #1a1a1a;
        border-bottom: 1pt solid #ccc;
    }

    .guide-text, .theory-summary, .theory-application,
    .strategy-steps li, .checklist li, .reflection-list li,
    .pitfalls-list li, .scenario-content {
        color: #333;
    }

    .theory-card, .strategy-card, .scenario-block {
        border: 1pt solid #ddd;
        background: #f9f9f9;
    }

    .checklist li::before {
        border-color: #999;
    }

    .references-list li {
        color: #666;
        border-left-color: #ccc;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .guide-layout {
        grid-template-columns: 1fr;
    }

    .guide-sidebar {
        position: static;
        order: -1;
    }

    .guide-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-center {
        display: none;
    }

    .nav-icon-btn {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .lang-toggle {
        margin-left: 0;
    }

    .welcome-title {
        font-size: 28px;
    }

    .welcome-subtitle {
        font-size: 16px;
    }

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

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

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

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

    .node-title {
        font-size: 28px;
    }

    .guide-title {
        font-size: 24px;
    }

    .guide-header-top {
        flex-direction: column;
    }

    .quiz-question-text {
        font-size: 18px;
    }

    .strategy-filters {
        flex-direction: column;
    }

    .side-panel {
        width: 100%;
        right: -100%;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .footer-sep {
        display: none;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 24px;
    }

    .node-title {
        font-size: 24px;
    }

    .guide-title {
        font-size: 22px;
    }

    .quiz-title {
        font-size: 22px;
    }

    .diagnostic-title {
        font-size: 22px;
    }
}
