:root {
    --bg-light: #e0e5ec;
    --card-bg: #e0e5ec;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e0e5ec;
    --accent-blue: #3182ce;
    --accent-blue-hover: #2b6cb0;
    --success-color: #38a169;
    --shadow-sm: 5px 5px 10px #a3b1c6, -5px -5px 10px #ffffff;
    --shadow-md: 9px 9px 16px #a3b1c6, -9px -9px 16px #ffffff;
    --shadow-inner: inset 5px 5px 10px #a3b1c6, inset -5px -5px 10px #ffffff;
}

body.dark-theme {
    --bg-light: #1a1b1e;
    --card-bg: #1a1b1e;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --border-color: #1a1b1e;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #60a5fa;
    --success-color: #10b981;
    --shadow-sm: 5px 5px 10px #0b0c0d, -5px -5px 10px #292a2f;
    --shadow-md: 9px 9px 16px #0b0c0d, -9px -9px 16px #292a2f;
    --shadow-inner: inset 5px 5px 10px #0b0c0d, inset -5px -5px 10px #292a2f;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 { 
    font-weight: 700; 
    line-height: 1.2; 
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.content-card {
    background: var(--card-bg);
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

/* Header */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.navbar .logo {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}
.navbar .logo i { color: var(--accent-blue); }

.header-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.time-badge {
    background: var(--card-bg);
    box-shadow: var(--shadow-inner);
    color: var(--accent-blue);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.theme-btn {
    background: var(--card-bg);
    border: none;
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    outline: none;
}
.theme-btn:hover {
    color: var(--accent-blue);
    box-shadow: var(--shadow-inner);
}

/* Progress Bar */
.progress-wrapper {
    max-width: 1000px;
    margin: 1rem auto 0;
}
.progress-info {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.3rem;
}
#progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
}
.progress-container {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--success-color));
    transition: width 0.4s ease-out;
}

/* Main Content */
.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    padding: 60px 20px 40px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 { 
    font-size: 3rem; 
    margin-bottom: 1rem; 
}
.hero p { 
    font-size: 1.1rem; 
    color: var(--text-secondary); 
    margin-bottom: 2.5rem; 
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Personalization Panel */
.personalization-panel {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-end;
    text-align: left;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-group input, .control-group select {
    padding: 0.6rem 1rem;
    background: var(--bg-light);
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-inner);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    min-width: 180px;
}

.control-group input:focus, .control-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-secondary {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-secondary:hover { 
    box-shadow: var(--shadow-inner);
    color: var(--accent-blue);
}

/* Roadmap Section */
.roadmap-section {
    padding: 0 20px 80px;
    max-width: 800px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding-top: 2rem;
}

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

.timeline-item { 
    position: relative; 
    padding-left: 60px; 
    margin-bottom: 2.5rem; 
}
.timeline-item.hidden { display: none; }

.timeline-icon {
    position: absolute; 
    left: 4px; 
    top: 0; 
    width: 34px; 
    height: 34px;
    border-radius: 50%; 
    background: var(--card-bg); 
    border: none;
    box-shadow: var(--shadow-sm);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary); 
    z-index: 1;
}

.timeline-content { 
    padding: 1.5rem 2rem; 
}
.timeline-content:hover {
    box-shadow: var(--shadow-md);
}

.phase-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 0.5rem; 
    flex-wrap: wrap; 
    gap: 1rem;
}

.timeline-content h2 { 
    font-size: 1.4rem; 
}

.phase-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.time-estimate { 
    color: var(--text-secondary); 
    font-size: 0.85rem; 
    font-weight: 500;
}

/* Custom Checkboxes and Links */
.skills-list { 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    gap: 0.8rem; 
}

.task-container {
    display: flex; 
    align-items: flex-start; 
    position: relative; 
    cursor: pointer;
    user-select: none; 
    padding: 0.8rem; 
    border-radius: 8px;
    transition: background 0.2s;
    margin-left: -0.8rem;
}

.task-container:hover { 
    background: transparent; 
}

.task-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }

.checkmark {
    height: 22px; 
    width: 22px; 
    background-color: var(--card-bg);
    border: none;
    box-shadow: var(--shadow-inner);
    border-radius: 50%;
    margin-right: 12px; 
    margin-top: 2px;
    position: relative; 
    flex-shrink: 0; 
    transition: all 0.2s;
}

.task-container:hover input ~ .checkmark { border-color: #cbd5e1; }

.task-container input:checked ~ .checkmark {
    background-color: var(--success-color); 
    border-color: var(--success-color);
}

.checkmark:after {
    content: ""; position: absolute; display: none; left: 6px; top: 3px;
    width: 4px; height: 9px; border: solid white; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.task-container input:checked ~ .checkmark:after { display: block; }

.task-text { 
    font-size: 0.95rem; 
    color: var(--text-primary); 
    transition: all 0.3s; 
    line-height: 1.5;
}
.task-text strong {
    font-weight: 600;
}
.task-text a {
    color: var(--accent-blue); 
    text-decoration: none; 
    font-weight: 500;
}
.task-text a:hover { 
    text-decoration: underline; 
}

.task-text a.video-link {
    font-size: 0.85rem; 
    margin-left: 10px; 
    color: #ef4444;
    display: inline-flex; 
    align-items: center; 
    gap: 4px;
    font-weight: 400;
}
.task-text a.video-link:hover { 
    color: #dc2626; 
    text-decoration: none;
}

/* Completed Task State */
.task-container.completed .task-text { 
    color: #94a3b8;
    text-decoration: line-through; 
}
.task-container.completed .task-text a { 
    color: #94a3b8; 
}

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(15px); transition: all 0.6s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Footer */
footer { 
    padding: 40px 5%; 
    text-align: center; 
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}
.footer-content p { 
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.modal-content {
    max-width: 450px;
    padding: 2rem;
    text-align: center;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transform: translateY(0);
    transition: transform 0.3s ease;
}
.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}
.modal-content h3 {
    font-size: 1.3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.modal-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.modal-content strong {
    color: var(--text-primary);
}
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.btn-primary {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: var(--card-bg);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    box-shadow: var(--shadow-inner);
}

/* Quiz specific modal styles */
.quiz-content {
    max-width: 600px;
    width: 90%;
}
.quiz-scroll-area {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
    margin: 1.5rem 0;
    padding-right: 10px;
}
.quiz-question-block {
    margin-bottom: 1.5rem;
}
.quiz-question-block p {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.quiz-question-block textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.8rem;
    background: var(--bg-light);
    border: none;
    box-shadow: var(--shadow-inner);
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
    outline: none;
}
.quiz-question-block textarea:focus {
    border-color: var(--accent-blue);
}
.quiz-feedback {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: left;
}
.quiz-feedback h4 {
    margin-bottom: 0.5rem;
}
.quiz-feedback.pass h4 { color: var(--success-color); }
.quiz-feedback.fail h4 { color: #ef4444; }

.verdict-content {
    max-width: 700px;
}
.verdict-loading {
    padding: 2rem;
    color: var(--accent-blue);
    font-size: 1.1rem;
    font-weight: 600;
}
.verdict-content h4 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 40px 20px; }
    .hero h1 { font-size: 2.5rem; }
    .personalization-panel { flex-direction: column; align-items: stretch; }
    .control-group input, .control-group select { min-width: 100%; }
}

/* --- Notes Modal --- */
.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    z-index: 10;
}
.close-btn:hover {
    color: #ef4444; /* Red on hover */
}

.notes-modal-content {
    position: relative;
    max-width: 900px;
    height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    background: #000000;
    color: #e2e8f0;
    text-align: left;
}

.markdown-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #ffffff;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.3em;
}

.markdown-body p {
    margin-bottom: 1.2em;
}

.markdown-body code {
    background-color: #1e293b;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    color: #38bdf8;
}

.markdown-body pre {
    background-color: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #334155;
    margin-bottom: 1.5em;
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    color: #e2e8f0;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.markdown-body hr {
    border: 0;
    border-bottom: 1px solid #334155;
    margin: 2em 0;
}

.markdown-body .mermaid {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5em;
    display: flex;
    justify-content: center;
}
