/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES (Digital Portfolio - Le Duc Tien)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

:root {
    /* Theme: Dark (Default) */
    --bg-main: #060913;
    --bg-sidebar: rgba(10, 15, 30, 0.7);
    --bg-card: rgba(16, 24, 48, 0.45);
    --bg-card-hover: rgba(24, 36, 72, 0.6);
    --bg-modal: rgba(8, 12, 24, 0.9);
    --bg-input: rgba(30, 41, 59, 0.5);
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(99, 102, 241, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --primary: #6366f1; /* Indigo */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary: #10b981; /* Emerald */
    --secondary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --accent: #f59e0b; /* Amber */
    --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --danger: #ef4444;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
    
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
    --backdrop-blur: blur(16px);
}

.light-mode {
    /* Theme: Light */
    --bg-main: #f1f5f9;
    --bg-sidebar: rgba(255, 255, 255, 0.8);
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-modal: rgba(255, 255, 255, 0.95);
    --bg-input: rgba(241, 245, 249, 0.9);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(99, 102, 241, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    
    --primary: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --secondary: #059669;
    --secondary-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
    --accent: #d97706;
    --accent-gradient: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

/* App Shell container */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styling */
aside.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: all var(--transition-speed) ease;
}

.sidebar-header {
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.avatar-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    padding: 3px;
    background: var(--primary-gradient);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    overflow: hidden;
}

.student-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.student-class {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    display: inline-block;
}

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
}

.menu-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-left: 0.75rem;
    margin-bottom: 0.75rem;
}

.sidebar-menu ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.sidebar-menu li {
    margin-bottom: 0.4rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
}

.menu-item:hover, .menu-item.active {
    color: var(--text-main);
    background: var(--bg-card);
    box-shadow: var(--glass-shadow);
}

.menu-item.active {
    border-left: 3px solid var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.menu-item svg {
    margin-right: 0.85rem;
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.menu-item:hover svg {
    transform: translateX(3px);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.school-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

/* Main Content Area */
main.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-speed) ease;
}

/* ==========================================================================
   PAGE/SECTION WRAPPERS
   ========================================================================== */

.page-section {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-section.active {
    display: block;
}

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

.section-header {
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: var(--glass-shadow);
    transition: border-color var(--transition-speed) ease, transform 0.2s ease, box-shadow var(--transition-speed) ease;
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.08);
}

/* ==========================================================================
   DASHBOARD / INTRO PAGE
   ========================================================================== */

.intro-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.8rem;
    margin-bottom: 1.8rem;
}

.profile-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%), var(--bg-card);
    position: relative;
    overflow: hidden;
}

.profile-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.profile-title-group h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.profile-badge {
    background: var(--secondary-gradient);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    display: inline-block;
}

.profile-info-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.profile-info-list li {
    font-size: 0.9rem;
}

.profile-info-list strong {
    color: var(--text-muted);
    font-weight: 500;
}

.profile-info-list span {
    color: var(--text-main);
    font-weight: 600;
}

/* Quick Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.stat-card {
    text-align: center;
    padding: 1.2rem;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
}

.stat-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Objectives Card */
.objectives-card ul {
    list-style: none;
}

.objectives-card li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.objectives-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary);
    font-weight: 900;
    font-size: 1.1rem;
}

/* Skills Cards & Tech Stack */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.8rem;
}

.radar-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.skills-list-wrapper h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.2rem;
}

.skills-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-category-item {
    margin-bottom: 0.5rem;
}

.skill-category-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.skill-bar-outer {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar-inner {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    width: 0;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

/* ==========================================================================
   TUAN 1: INTERACTIVE FILE TREE & LIGHTBOX
   ========================================================================== */

.tuan1-split {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.8rem;
}

/* File Tree Styles */
.file-tree-container {
    font-family: var(--font-code);
    font-size: 0.85rem;
    user-select: none;
}

.tree-node {
    margin-left: 1.2rem;
    margin-top: 0.35rem;
}

.tree-root {
    margin-left: 0;
}

.node-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: background 0.1s ease;
}

.node-label:hover {
    background: rgba(255, 255, 255, 0.04);
}

.light-mode .node-label:hover {
    background: rgba(0, 0, 0, 0.04);
}

.node-icon {
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
}

.tree-folder > .node-children {
    display: none;
}

.tree-folder.expanded > .node-children {
    display: block;
}

.node-label.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
    font-weight: 600;
}

/* Gallery and Image Showcase */
.screenshot-viewer-card {
    display: flex;
    flex-direction: column;
}

.screenshot-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

.screenshot-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    stroke: var(--text-muted);
}

.active-screenshot-display {
    display: none;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

.active-image-container {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.active-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.active-image-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.active-image-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.image-thumbnails-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.thumb-item {
    aspect-ratio: 16/9;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.thumb-item:hover, .thumb-item.active {
    opacity: 1;
    border-color: var(--primary);
    transform: scale(1.05);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-modal);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-caption {
    margin-top: 1rem;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: var(--danger);
    transform: rotate(90deg);
}

/* ==========================================================================
   TUAN 2: ACADEMIC SEARCH & SOURCES TABLE
   ========================================================================== */

.search-intro-box {
    margin-bottom: 1.8rem;
}

.operators-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.operator-badge {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
}

.operator-code {
    font-family: var(--font-code);
    color: var(--primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.operator-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

table.sources-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

table.sources-table th {
    background: rgba(99, 102, 241, 0.04);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-main);
}

table.sources-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    line-height: 1.4;
}

table.sources-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.light-mode table.sources-table tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

.score-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-block;
}

.rank-badge {
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-block;
}

.rank-badge.very-high {
    background: var(--secondary-gradient);
}

.rank-badge.high {
    background: var(--primary-gradient);
}

.cite-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.cite-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Toast Notification */
.toast-notif {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--secondary-gradient);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-notif.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   TUAN 3: PROMPTS & CODE EDITOR
   ========================================================================== */

.prompts-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

.prompt-box {
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.prompt-box.initial {
    background: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.prompt-box.improved {
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.prompt-tag {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-bottom-left-radius: 8px;
    color: white;
}

.prompt-box.initial .prompt-tag {
    background: var(--danger);
}

.prompt-box.improved .prompt-tag {
    background: var(--secondary);
}

.prompt-box h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.prompt-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.prompt-meta {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--border-color);
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.tuan3-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tuan3-tab-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.tuan3-tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(99,102,241,0.25);
}

/* IDE Code Viewer Styling */
.code-editor-card {
    background: #0a0d16;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    font-family: var(--font-code);
    margin-bottom: 1.8rem;
}

.editor-header {
    background: #0e1220;
    padding: 0.75rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-dots {
    display: flex;
    gap: 0.4rem;
}

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

.editor-dot.red { background: #ef4444; }
.editor-dot.yellow { background: #f59e0b; }
.editor-dot.green { background: #10b981; }

.editor-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

.editor-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.editor-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.editor-body {
    position: relative;
    max-height: 400px;
    overflow-y: auto;
}

.code-block {
    display: none;
    margin: 0;
    padding: 1.2rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #a9b2c3;
    white-space: pre;
}

.code-block.active {
    display: block;
}

/* Basic inline code highlighting classes */
.code-keyword { color: #c792ea; font-weight: 500; }
.code-string { color: #c3e88d; }
.code-comment { color: #546e7a; font-style: italic; }
.code-function { color: #82aaff; }
.code-class { color: #ffcb6b; }
.code-number { color: #f78c6c; }

/* Metrics Section Tuan 3 */
.efficiency-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.metrics-table-wrapper {
    flex: 1;
}

.metrics-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-highlight {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   TUAN 4: KANBAN BOARD & TIMELINE
   ========================================================================== */

/* Kanban Board Styling */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.2rem;
}

.kanban-col {
    background: rgba(10, 15, 30, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.kanban-col-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.kanban-col-count {
    background: var(--bg-input);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    color: var(--text-muted);
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.kanban-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99,102,241,0.1);
}

.kanban-card-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kanban-card-tags {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.kanban-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    color: white;
}

.kanban-tag.content { background: #3b82f6; }
.kanban-tag.pm { background: #a855f7; }
.kanban-tag.storage { background: #10b981; }
.kanban-tag.comms { background: #f59e0b; }

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.kanban-card-assignee {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.6rem;
}

/* Kanban Details Modal */
.kanban-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.kanban-modal-content {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.kanban-modal-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.kanban-modal-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.kanban-modal-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Interactive Timeline */
.timeline-container {
    position: relative;
    padding: 1.5rem 0;
    margin-top: 1rem;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-progress {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.5s ease;
}

.timeline-items {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 3;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 60px;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 3px solid var(--text-muted);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.timeline-item:hover .timeline-dot, .timeline-item.active .timeline-dot {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transform: scale(1.25);
}

.timeline-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.timeline-item.active .timeline-label {
    color: var(--primary);
}

.timeline-detail-box {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-height: 90px;
    animation: fadeIn 0.3s ease;
}

.timeline-detail-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.timeline-detail-content {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-main);
}

/* ==========================================================================
   TUAN 5 & 6: INFOGRAPHICS & ETHICS
   ========================================================================== */

.infographic-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.8rem;
}

.infographic-wrapper {
    max-width: 480px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.infographic-wrapper:hover {
    transform: scale(1.02);
}

.infographic-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tuan 6 Policies Tab */
.policy-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.2rem;
}

.policy-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
}

.policy-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    transition: all 0.2s ease;
}

.policy-tab-btn.active {
    color: var(--primary);
}

.policy-tab-btn.active::after {
    background: var(--primary);
}

.policy-content {
    display: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.policy-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Ethics Checklist */
.rules-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.rules-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.8rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.rules-checklist li.checked {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.02);
}

.rules-checklist input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--text-muted);
    cursor: pointer;
    margin-top: 0.1rem;
}

.rule-text-container {
    display: flex;
    flex-direction: column;
}

.rule-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
}

.rule-desc {
    font-size: 0.85rem;
    font-weight: 500;
}

.integrity-badge-container {
    margin-top: 1.5rem;
    text-align: center;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.integrity-badge-container.show {
    opacity: 1;
    transform: scale(1);
}

.integrity-badge {
    background: var(--secondary-gradient);
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: inline-block;
}

/* ==========================================================================
   CONCLUSION PAGE
   ========================================================================== */

.conclusion-cards {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.8rem;
}

.reflection-item {
    margin-bottom: 1.2rem;
}

.reflection-item h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.reflection-item p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ==========================================================================
   DOWNLOAD CENTER
   ========================================================================== */

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.download-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.download-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.download-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.download-info h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.download-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.download-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.6rem;
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99,102,241,0.25);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE ADAPTATION)
   ========================================================================== */

@media (max-width: 1024px) {
    aside.sidebar {
        width: 80px;
    }
    
    .student-name, .student-class, .menu-item span, .menu-label, .school-tag {
        display: none;
    }
    
    .avatar-wrapper {
        width: 50px;
        height: 50px;
        padding: 2px;
    }
    
    .avatar {
        font-size: 1.2rem;
    }
    
    .menu-item {
        justify-content: center;
        padding: 0.8rem;
    }
    
    .menu-item svg {
        margin-right: 0;
    }
    
    main.main-content {
        margin-left: 80px;
        padding: 1.8rem;
    }
    
    .intro-grid, .skills-container, .tuan1-split, .efficiency-metrics, .conclusion-cards {
        grid-template-columns: 1fr;
    }
    
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    aside.sidebar {
        display: none; /* Hide sidebar completely, implement hamburger or bottom bar */
    }
    
    main.main-content {
        margin-left: 0;
        padding: 1.2rem;
    }
    
    /* Simple top mobile navigation bar */
    .mobile-nav {
        display: flex !important;
        background: var(--bg-sidebar);
        backdrop-filter: var(--backdrop-blur);
        border-bottom: 1px solid var(--border-color);
        padding: 0.8rem 1.2rem;
        position: sticky;
        top: 0;
        z-index: 90;
        align-items: center;
        justify-content: space-between;
    }
    
    .kanban-board, .download-grid, .operators-container {
        grid-template-columns: 1fr;
    }
}

.mobile-nav {
    display: none;
}
