* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', Courier, monospace;
    background: #0a0a0a;
    color: #00ff41;
}
.terminal {
    background: #0d0d0d;
    padding: 32px 40px;
    border: 1px solid #1a3a1a;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.05);
    min-width: 420px;
    position: relative;
}
.terminal::before {
    content: '+---+---+---+---+---+---+---+---+---+';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    color: #1a3a1a;
    font-size: 10px;
    letter-spacing: 2px;
    overflow: hidden;
    white-space: nowrap;
}
.titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid #1a3a1a;
    margin-bottom: 20px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a3a1a;
}
.dot.r { background: #ff5555; }
.dot.y { background: #f1fa8c; }
.dot.g { background: #50fa7b; }
.title-text {
    font-size: 0.7rem;
    color: #444;
    margin-left: 12px;
}
.line {
    line-height: 1.8;
    font-size: 0.95rem;
}
.prompt {
    color: #00ff41;
}
.prompt::before {
    content: 'bima@terminal';
    color: #00ff41;
}
.prompt-colon {
    color: #444;
}
.prompt-path::before {
    content: ' ~';
    color: #569cd6;
}
.prompt-symbol {
    color: #00ff41;
}
.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #00ff41;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 4px;
}
@keyframes blink {
    50% { opacity: 0; }
}
.output {
    color: #ccc;
}
.output span.green { color: #00ff41; }
.output span.blue { color: #569cd6; }
.output span.gray { color: #666; }
.output a { text-decoration: none; }
.output a:hover { text-decoration: underline; }
.ascii-box {
    color: #444;
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 8px 0 16px;
}
.input-line {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #1a3a1a;
}

/* Dashboard */
.dashboard {
    max-height: 90vh;
    overflow-y: auto;
    min-width: 640px;
    scrollbar-width: thin;
    scrollbar-color: #1a3a1a transparent;
}
.dashboard::-webkit-scrollbar { width: 6px; }
.dashboard::-webkit-scrollbar-track { background: transparent; }
.dashboard::-webkit-scrollbar-thumb { background: #1a3a1a; border-radius: 3px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.subject-card {
    border: 1px solid #1a3a1a;
    padding: 12px;
    background: #0a0a0a;
}

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

.subject-name {
    color: #00ff41;
    font-weight: bold;
    font-size: 0.9rem;
}

.subject-count {
    color: #569cd6;
    font-size: 0.8rem;
}

.progress-bar {
    height: 4px;
    background: #1a1a1a;
    margin-bottom: 10px;
    border-radius: 0;
}

.progress-fill {
    height: 100%;
    background: #00ff41;
    transition: width 0.3s ease;
    border-radius: 0;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #ccc;
    padding: 2px 0;
}

.chapter-item:hover {
    background: #111;
}

.chapter-check {
    display: none;
}

.check-box {
    width: 12px;
    height: 12px;
    border: 1px solid #1a3a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 9px;
    color: #00ff41;
}

.chapter-check:checked + .check-box::after {
    content: 'x';
}

.chapter-check:checked ~ .chapter-name {
    color: #569cd6;
    text-decoration: line-through;
    text-decoration-color: #1a3a1a;
}

.overall-row {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #1a3a1a;
    font-size: 0.85rem;
}

/* === Theme Variables === */
:root,
[data-theme="vercel"] {
    --dash-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --dash-font-mono: 'JetBrains Mono', monospace;
    --dash-bg: #000000;
    --dash-surface: #0A0A0A;
    --dash-primary: #EDEDED;
    --dash-secondary: #8F8F8F;
    --dash-border: #1a1a1a;
    --dash-accent: #0070F3;
    --dash-item-name: #666;
    --dash-item-hover: #EDEDED;
    --dash-checked-name: #8F8F8F;
    --dash-box-border: #333;
    --dash-h1-size: 2.25rem;
    --dash-h1-ls: -0.025em;
    --dash-stat-radius: 8px;
    --dash-card-radius: 12px;
    --dash-box-radius: 4px;
}

[data-theme="aero"] {
    --dash-font: 'Quicksand', 'Nunito', -apple-system, sans-serif;
    --dash-font-mono: 'JetBrains Mono', monospace;
    --dash-bg: linear-gradient(135deg, #a8edea, #fed6e3);
    --dash-surface: rgba(255, 255, 255, 0.55);
    --dash-primary: #1a1a2e;
    --dash-secondary: #555;
    --dash-border: rgba(255, 255, 255, 0.6);
    --dash-accent: #06d6a0;
    --dash-item-name: #444;
    --dash-item-hover: #1a1a2e;
    --dash-checked-name: #aaa;
    --dash-box-border: rgba(0, 0, 0, 0.12);
    --dash-h1-size: 2.25rem;
    --dash-h1-ls: -0.025em;
    --dash-stat-radius: 16px;
    --dash-card-radius: 20px;
    --dash-box-radius: 8px;
    --dash-glass-blur: 16px;
}

[data-theme="aero"] .stat-card,
[data-theme="aero"] .dash-card,
[data-theme="aero"] .theme-toggle {
    backdrop-filter: blur(var(--dash-glass-blur));
    -webkit-backdrop-filter: blur(var(--dash-glass-blur));
}

[data-theme="aero"] .theme-btn.active {
    color: #fff;
}

[data-theme="aero"] .item-check:checked + .item-box::after {
    color: #fff;
}

[data-theme="tui"] {
    --dash-font: 'IBM Plex Mono', 'Courier New', monospace;
    --dash-font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --dash-bg: #0D1117;
    --dash-surface: #161B22;
    --dash-primary: #E6EDF3;
    --dash-secondary: #8B949E;
    --dash-border: #21262D;
    --dash-accent: #3FB950;
    --dash-item-name: #8B949E;
    --dash-item-hover: #E6EDF3;
    --dash-checked-name: #8B949E;
    --dash-box-border: #30363D;
    --dash-h1-size: 2rem;
    --dash-h1-ls: -0.02em;
    --dash-stat-radius: 6px;
    --dash-card-radius: 8px;
    --dash-box-radius: 4px;
}

/* === Dashboard === */
.dash-body {
    font-family: var(--dash-font);
    background: var(--dash-bg);
    color: var(--dash-primary);
    height: auto;
    min-height: 100vh;
    display: block;
    padding: 48px 32px;
    -webkit-font-smoothing: antialiased;
}

.dash-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Theme toggle */
.theme-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--dash-border);
}

.theme-toggle {
    display: flex;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 6px;
    overflow: hidden;
}

.theme-btn {
    font-family: var(--dash-font-mono);
    font-size: 0.75rem;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--dash-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.theme-btn.active {
    background: var(--dash-accent);
    color: var(--dash-bg);
}

.theme-btn:not(.active):hover {
    color: var(--dash-primary);
}

.dash-header h1 {
    font-size: var(--dash-h1-size);
    font-weight: 600;
    color: var(--dash-primary);
    letter-spacing: var(--dash-h1-ls);
    margin: 0;
}

.dash-subtitle {
    color: var(--dash-secondary);
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.55;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-stat-radius);
    padding: 20px 24px;
}

.stat-label {
    display: block;
    font-family: var(--dash-font-mono);
    font-size: 0.75rem;
    color: var(--dash-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dash-primary);
    letter-spacing: -0.025em;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
}

.dash-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-card-radius);
    overflow: hidden;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.card-head h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dash-primary);
    letter-spacing: -0.025em;
}

.card-count {
    font-family: var(--dash-font-mono);
    font-size: 0.75rem;
    color: var(--dash-secondary);
    font-weight: 500;
}

.card-progress {
    height: 2px;
    background: var(--dash-border);
    margin: 16px 24px 0;
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    background: var(--dash-accent);
    transition: width 0.3s ease;
}

.card-body {
    padding: 16px 24px 20px;
}

.card-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    cursor: pointer;
}

.card-item:hover .item-name {
    color: var(--dash-item-hover);
}

.item-check {
    display: none;
}

.item-box {
    width: 16px;
    height: 16px;
    border: 1px solid var(--dash-box-border);
    border-radius: var(--dash-box-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.item-check:checked + .item-box {
    background: var(--dash-accent);
    border-color: var(--dash-accent);
}

.item-check:checked + .item-box::after {
    content: '→';
    color: var(--dash-bg);
    font-size: 10px;
    font-weight: 600;
}

.item-check:checked ~ .item-name {
    color: var(--dash-checked-name);
}

.item-name {
    font-size: 0.85rem;
    color: var(--dash-item-name);
    transition: color 0.15s;
}

@media (max-width: 640px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-body {
        padding: 24px 16px;
    }
    .theme-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
