:root {
    --bg-primary: #0f1729;
    --bg-secondary: #1a2340;
    --text-primary: #f0f0f0;
    --text-secondary: #8892a8;
    --accent: #4a9eff;
    --accent-glow: rgba(74, 158, 255, 0.3);
    --highlight: #ff8c42;
    --success: #4ecdc4;
    --danger: #ff6b6b;
    --font-title: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
}

#slide-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.slide {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 120px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.slide.active {
    display: flex;
    opacity: 1;
}

/* Cover */
.slide-cover { text-align: center; }

.slide-cover .chapter-number {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--accent);
    margin-bottom: 24px;
}

.slide-cover .slide-title {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    font-family: var(--font-title);
}

.slide-cover .slide-subtitle {
    font-size: 32px;
    color: var(--text-secondary);
    font-weight: 300;
}

.slide-cover .slide-speaker {
    margin-top: 32px;
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 2px;
    opacity: 0.7;
}

.fullscreen-hint {
    margin-top: 48px;
    font-size: 16px;
    color: var(--text-secondary);
    opacity: 0.5;
    letter-spacing: 1px;
    animation: hintPulse 3s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Agenda */
.slide-agenda { text-align: center; }

.slide-agenda .slide-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 50px;
    font-family: var(--font-title);
}

.agenda-list {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 40px;
}

.agenda-item {
    background: rgba(74, 158, 255, 0.06);
    border: 1px solid rgba(74, 158, 255, 0.15);
    border-radius: 16px;
    padding: 36px 32px;
    width: 260px;
    text-align: center;
    transition: border-color 0.2s;
}

.agenda-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.agenda-item-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent);
}

.agenda-item-desc {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.agenda-footer {
    font-size: 22px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Point */
.slide-point {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.slide-point .slide-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 40px;
    font-family: var(--font-title);
}

.slide-point .slide-body {
    font-size: 28px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Comparison */
.slide-comparison { padding: 60px 80px; }

.slide-comparison .slide-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    font-family: var(--font-title);
}

.comparison-columns {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.comparison-col {
    padding: 40px;
    border-radius: 16px;
}

.comparison-col.old {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.comparison-col.new {
    background: rgba(74, 158, 255, 0.08);
    border: 1px solid rgba(74, 158, 255, 0.2);
}

.comparison-col h3 {
    font-size: 28px;
    margin-bottom: 24px;
    font-weight: 600;
}

.comparison-col.old h3 { color: var(--danger); }
.comparison-col.new h3 { color: var(--accent); }

.comparison-col ul { list-style: none; padding: 0; }

.comparison-col li {
    font-size: 22px;
    line-height: 1.6;
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
}

.comparison-col.old li::before {
    content: '\2715';
    position: absolute;
    left: 0;
    color: var(--danger);
}

.comparison-col.new li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success);
}

.comparison-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--accent);
}

/* Diagram */
.slide-diagram {
    text-align: center;
    padding: 40px 60px;
}

.slide-diagram .slide-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 24px;
    font-family: var(--font-title);
}

.slide-diagram .diagram-container {
    max-width: 1200px;
    max-height: 65vh;
    margin: 0 auto;
    width: 90vw;
}

.slide-diagram .diagram-container svg {
    width: 100%;
    height: auto;
    max-height: 65vh;
}

.slide-diagram .diagram-caption {
    font-size: 22px;
    color: var(--text-secondary);
    margin-top: 20px;
}

/* Canvas3D */
.slide-canvas3d {
    text-align: center;
    padding: 40px 60px;
}

.slide-canvas3d .slide-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: var(--font-title);
}

.canvas3d-container {
    position: relative;
    max-width: 1100px;
    width: 85vw;
    height: 62vh;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

.canvas3d-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

.canvas3d-container canvas:active {
    cursor: grabbing;
}

.canvas3d-tooltip {
    display: none;
    position: absolute;
    background: rgba(26, 35, 64, 0.95);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.6;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
}

.canvas3d-legend {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(15, 23, 41, 0.85);
    border: 1px solid rgba(74, 158, 255, 0.15);
    border-radius: 8px;
    padding: 6px 14px;
}

.canvas3d-legend .leg-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.canvas3d-legend .leg-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.canvas3d-presets {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.canvas3d-preset-btn {
    background: rgba(15, 23, 41, 0.85);
    border: 1px solid rgba(74, 158, 255, 0.2);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.canvas3d-preset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.canvas3d-preset-btn.active {
    background: rgba(74, 158, 255, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.canvas3d-hint {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 1.5s;
}

/* Chart / Gantt */
.slide-chart,
.slide-gantt {
    text-align: center;
    padding: 40px 60px;
}

.slide-chart .slide-title,
.slide-gantt .slide-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: var(--font-title);
}

.chart-container {
    position: relative;
    max-width: 1100px;
    width: 85vw;
    height: 60vh;
    margin: 0 auto;
}

.chart-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.slide-gantt .chart-container canvas {
    cursor: grab;
}

.slide-gantt .chart-container canvas:active {
    cursor: grabbing;
}

/* Kanban */
.slide-kanban {
    padding: 30px 60px;
}

.slide-kanban .slide-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    font-family: var(--font-title);
}

.kanban-container {
    max-width: 1200px;
    width: 90vw;
    margin: 0 auto;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.kanban-person {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
}

.kanban-sprint {
    font-size: 16px;
    color: var(--text-secondary);
    background: rgba(74, 158, 255, 0.1);
    padding: 4px 14px;
    border-radius: 12px;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    height: 58vh;
}

.kanban-col {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kanban-col-header {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid;
}

.kanban-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 12px;
    margin-left: 6px;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
}

.kanban-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    transition: border-color 0.2s;
}

.kanban-card:hover {
    border-color: rgba(74, 158, 255, 0.3);
}

.kanban-card-key {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-family: monospace;
}

.kanban-card-title {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 6px;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-tag {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 8px;
    border: 1px solid;
}

.kanban-points {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 8px;
    border-radius: 8px;
}

/* Resource Dashboard */
.slide-resource-dashboard {
    padding: 30px 60px;
}

.slide-resource-dashboard .slide-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    font-family: var(--font-title);
}

.dashboard-container {
    max-width: 1100px;
    width: 85vw;
    margin: 0 auto;
}

.dash-person {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    margin-bottom: 20px;
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dash-kpi {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.dash-kpi-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 6px;
}

.dash-kpi-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.dash-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 32vh;
}

.dash-chart-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
}

.dash-chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dash-chart-box canvas {
    display: block;
    width: 100%;
}

/* Discussion */
.slide-discussion { text-align: center; }

.slide-discussion .discussion-icon {
    font-size: 48px;
    margin-bottom: 24px;
    color: var(--highlight);
}

.slide-discussion .slide-title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 40px;
    font-family: var(--font-title);
}

.slide-discussion .panel-hint {
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.slide-discussion .panel-hint:hover {
    color: var(--accent);
}

/* Panel */
#panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 100;
}

#panel-overlay.visible { display: flex; align-items: flex-end; }

#panel-overlay .panel-drawer {
    width: 100%;
    background: var(--bg-secondary);
    border-top: 3px solid var(--accent);
    padding: 40px 80px;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
}

#panel-overlay .panel-drawer h3 {
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 20px;
}

#panel-overlay .panel-body {
    font-size: 24px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-line;
}

#panel-overlay .panel-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
}

#panel-overlay .panel-close:hover {
    color: var(--text-primary);
}

/* Progress */
#progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--accent);
    transition: width 0.3s ease;
    z-index: 50;
}

#progress-chapters {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 50;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.4;
    transition: all 0.3s;
}

.progress-dot.active {
    background: var(--accent);
    opacity: 1;
    transform: scale(1.4);
}

/* Chapter Menu */
#chapter-menu {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 41, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

#chapter-menu.visible { display: flex; }

#chapter-menu h2 {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#chapter-menu .menu-item {
    font-size: 32px;
    color: var(--text-primary);
    padding: 16px 40px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
    min-width: 400px;
}

#chapter-menu .menu-item:hover {
    background: var(--accent-glow);
    color: var(--accent);
}

#chapter-menu .menu-item.current {
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

#chapter-menu .menu-close {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
}

#keyboard-hint {
    position: fixed;
    bottom: 24px;
    right: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.5;
    z-index: 50;
}

#chapter-indicator {
    position: fixed;
    top: 24px;
    right: 28px;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    z-index: 50;
    padding: 6px 16px;
    border-left: 3px solid var(--accent);
    background: rgba(74, 158, 255, 0.08);
    border-radius: 0 6px 6px 0;
    letter-spacing: 2px;
    display: none;
}

#chapter-indicator.visible { display: block; }

#page-number {
    position: fixed;
    bottom: 24px;
    left: 24px;
    font-size: 16px;
    color: var(--text-secondary);
    opacity: 0.7;
    z-index: 50;
    font-family: var(--font-body);
}

#lang-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(74, 158, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}
#lang-toggle:hover {
    background: rgba(74, 158, 255, 0.25);
    border-color: var(--accent);
}

/* ===== English mode font adjustments ===== */
.lang-en .slide-cover .slide-title { font-size: 56px; }
.lang-en .slide-cover .slide-subtitle { font-size: 26px; }
.lang-en .slide-point .slide-title { font-size: 42px; }
.lang-en .slide-point .slide-body { font-size: 20px; }
.lang-en .slide-comparison .slide-title { font-size: 34px; }
.lang-en .slide-comparison h3 { font-size: 24px; }
.lang-en .slide-comparison li { font-size: 17px; }
.lang-en .slide-diagram .slide-title,
.lang-en .slide-canvas3d .slide-title,
.lang-en .slide-chart .slide-title,
.lang-en .slide-gantt .slide-title,
.lang-en .slide-kanban .slide-title,
.lang-en .slide-resource-dashboard .slide-title { font-size: 34px; }
.lang-en .slide-discussion .slide-title { font-size: 40px; }
.lang-en .slide-agenda .slide-title { font-size: 38px; }
.lang-en .agenda-item-title { font-size: 20px; }
.lang-en .agenda-item-desc { font-size: 16px; }
.lang-en .agenda-footer { font-size: 16px; }
.lang-en .diagram-caption { font-size: 14px; }
.lang-en .diagram-container svg { font-size: 85%; }
.lang-en .kanban-card-title { font-size: 12px; }

/* Radar popup for capability matrix */
#radar-popup {
    position: fixed;
    display: none;
    width: 260px;
    height: 280px;
    background: rgba(15, 23, 41, 0.96);
    border: 1px solid rgba(74, 158, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 300;
    pointer-events: none;
    padding: 12px 12px 6px;
}
#radar-popup.visible { display: block; }
#radar-popup .radar-name {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}
#radar-popup canvas {
    display: block;
    width: 236px;
    height: 236px;
}
.diagram-container svg text.hoverable-name {
    cursor: pointer;
    transition: fill 0.15s;
}
.diagram-container svg text.hoverable-name:hover {
    fill: #4a9eff !important;
    text-decoration: underline;
}
