:root {
    --bg-base: #000000;
    --bg-secondary: #111111;
    --python-blue: #4B8BBE;
    --python-yellow: #FFD43B;
    --accent-light: rgba(75, 139, 190, 0.15);
    --text-main: #FFFFFF;
    --text-muted: #888888;
    --border-hard: 1px solid #222222;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; min-height: 100%; background: var(--bg-base); color: var(--text-main); font-family: var(--font-body); line-height: 1.6; }

/* ============ NAVBAR ============ */
.navbar { background: var(--bg-base); border-bottom: var(--border-hard); padding: 0.75rem 0; position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; }
.nav-logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.logo-accent { color: var(--python-yellow); }
.nav-menu { display: flex; gap: 2rem; }
.nav-link { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.2s ease; }
.nav-link:hover { color: var(--text-main); }
.btn-signin { background: transparent; border: 1px solid var(--text-main); color: var(--text-main); padding: 0.5rem 1.2rem; border-radius: 4px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s ease; }
.btn-signin:hover { background: var(--text-main); color: var(--bg-base); }

/* ============ BUTTONS & TEXT ============ */
.btn { border: none; border-radius: 4px; padding: 0.75rem 1.5rem; font-family: var(--font-body); font-weight: 600; cursor: pointer; transition: all 0.2s ease; font-size: 1rem; }
.btn-primary { background: var(--python-blue); color: white; border: 1px solid var(--python-blue); }
.btn-primary:hover { background: transparent; color: var(--python-blue); }
.btn-secondary { background: transparent; border: 1px solid var(--python-yellow); color: var(--python-yellow); }
.btn-secondary:hover { background: var(--python-yellow); color: var(--bg-base); }
.btn-full { width: 100%; }
.accent-text-blue { color: var(--python-blue); }
.accent-text-yellow { color: var(--python-yellow); }

/* ============ HERO SECTION ============ */
.hero { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-left { animation: slideUpFade 0.8s ease-out; }
.badge { display: inline-block; background: rgba(255, 212, 59, 0.1); color: var(--python-yellow); padding: 0.5rem 1rem; border-radius: 4px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem; border: 1px solid var(--python-yellow); }
.hero-title { margin: 0 0 1.25rem; font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.2; }
.hero-subtitle { margin: 0 0 2rem; color: var(--text-muted); font-size: 1.1rem; line-height: 1.8; }
.cta-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-right { position: relative; display: flex; align-items: center; justify-content: center; }

/* ============ MACOS TERMINAL ============ */
.macos-terminal { background: #1e1e1e; border: 1px solid #333333; border-radius: 8px; width: 100%; max-width: 500px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); font-family: 'Courier New', Courier, monospace; overflow: hidden; }
.macos-header { background: #2d2d2d; padding: 0.75rem 1rem; display: flex; gap: 0.5rem; border-bottom: 1px solid #333333; }
.macos-btn { width: 12px; height: 12px; border-radius: 50%; }
.macos-close { background: #ff5f56; }
.macos-min { background: #ffbd2e; }
.macos-max { background: #27c93f; }
.macos-body { padding: 1.5rem; color: #d4d4d4; font-size: 1rem; min-height: 200px; display: flex; flex-direction: column; }
.python-prompt { color: var(--python-yellow); margin-right: 0.5rem; }
.output-text { color: #ce9178; margin-top: 0.5rem; min-height: 1.5em; }
.cursor { display: inline-block; width: 8px; height: 1.1em; background-color: #d4d4d4; vertical-align: middle; margin-left: 4px; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ============ STATS BANNER ============ */
.stats-banner { background: var(--bg-secondary); border-top: var(--border-hard); border-bottom: var(--border-hard); padding: 3rem 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: center; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.stat-icon { font-size: 2.5rem; }
.stat-text { font-weight: 600; color: var(--text-main); font-size: 1.05rem; }

/* ============ SECTIONS (CURRICULUM & PRICING) ============ */
.content-section { padding: 5rem 2rem; background: var(--bg-base); }
.pricing-section { background: var(--bg-secondary); border-top: var(--border-hard); }
.section-container { max-width: 1200px; margin: 0 auto; text-align: center; }
.section-title { font-family: var(--font-heading); font-size: 2.5rem; margin: 0 0 1rem; color: var(--text-main); }
.section-subtitle { color: var(--text-muted); font-size: 1.1rem; margin: 0 auto 3rem; max-width: 600px; }
.curriculum-grid, .pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; text-align: left; }
.curriculum-card, .pricing-card { background: var(--bg-secondary); border: var(--border-hard); padding: 2rem; border-radius: 8px; }
.curriculum-card h3 { color: var(--python-blue); margin-top: 0; }
.pricing-card { background: var(--bg-base); text-align: center; display: flex; flex-direction: column; }
.pricing-card.premium { border-color: var(--python-yellow); box-shadow: 0 0 20px rgba(255, 212, 59, 0.05); }
.pricing-card h3 { margin: 0 0 1rem; font-size: 1.5rem; }
.price { font-size: 3rem; font-weight: 800; font-family: var(--font-heading); margin-bottom: 2rem; color: var(--text-main); }
.features-list { list-style: none; padding: 0; margin: 0 0 2rem; text-align: left; flex-grow: 1; }
.features-list li { padding: 0.5rem 0; border-bottom: 1px solid #222222; color: var(--text-muted); }
.features-list li::before { content: '✓'; color: var(--python-yellow); margin-right: 0.5rem; font-weight: bold; }

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
}

/* ============ SIGN IN PAGE ============ */
.signin-container { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg-base); }
.signin-card { background: var(--bg-secondary); border: var(--border-hard); border-radius: 8px; padding: 3rem; width: 100%; max-width: 400px; animation: slideUpFade 0.6s ease-out; }
.signin-title { margin: 0 0 0.5rem; font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
.signin-subtitle { margin: 0 0 2rem; color: var(--text-muted); font-size: 0.95rem; }
.signin-form { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-weight: 600; color: var(--text-main); font-size: 0.9rem; }
.form-group input { padding: 0.75rem; background: var(--bg-base); border: var(--border-hard); color: var(--text-main); border-radius: 4px; font-family: var(--font-body); font-size: 1rem; transition: border-color 0.2s ease; }
.form-group input:focus { outline: none; border-color: var(--python-blue); }
.divider { text-align: center; color: var(--text-muted); margin: 1.5rem 0; position: relative; font-size: 0.85rem; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 45%; height: 1px; background: #333333; }
.divider::before { left: 0; } .divider::after { right: 0; }
.btn-social { width: 100%; background: var(--bg-base); border: var(--border-hard); color: var(--text-main); padding: 0.75rem; border-radius: 4px; cursor: pointer; font-weight: 600; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-social:hover { border-color: var(--python-yellow); }
.signin-footer { margin-top: 2rem; text-align: center; font-size: 0.9rem; }
.signin-footer p { margin: 0.5rem 0; color: var(--text-muted); }
.link-signup, .link-back { color: var(--python-blue); text-decoration: none; font-weight: 600; transition: color 0.2s ease; }
.link-signup:hover, .link-back:hover { color: var(--python-yellow); }

/* ============ DASHBOARD PAGE ============ */
.dashboard-container { min-height: 100vh; background: var(--bg-base); padding: 2rem; }
.dashboard-header { max-width: 1200px; margin: 0 auto 2rem; display: flex; justify-content: space-between; align-items: center; }
.dashboard-title { margin: 0; font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--text-main); }
.logout-btn { background: transparent; border: 1px solid var(--text-muted); color: var(--text-muted); padding: 0.6rem 1.2rem; border-radius: 4px; cursor: pointer; font-weight: 600; transition: all 0.2s ease; }
.logout-btn:hover { border-color: #ff5f56; color: #ff5f56; }
.dashboard-content { max-width: 1200px; margin: 0 auto; }
.progress-section, .challenges-section { background: var(--bg-secondary); border: var(--border-hard); border-radius: 8px; padding: 2rem; margin-bottom: 2rem; }
.progress-title, .challenges-title { margin: 0 0 1.5rem; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.progress-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat { text-align: center; }
.stat-number { display: block; font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--python-yellow); }
.stat-label { display: block; color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.progress-bar { width: 100%; height: 8px; background: var(--bg-base); border: var(--border-hard); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--python-blue); transition: width 0.5s ease; }
.challenges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.challenge-card { background: var(--bg-base); border: var(--border-hard); border-radius: 8px; padding: 1.5rem; text-align: center; cursor: pointer; transition: all 0.2s ease; min-height: 120px; display: flex; flex-direction: column; justify-content: center; }
.challenge-card:hover { border-color: var(--python-blue); }
.challenge-card.locked { opacity: 0.5; cursor: not-allowed; }
.challenge-card.locked:hover { border-color: var(--border-hard); }
.challenge-card.completed { background: var(--accent-light); border-color: var(--python-blue); }
.day-number { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--text-main); }
.day-status { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }
.lock-icon { font-size: 1.5rem; margin: 0.5rem 0; filter: grayscale(100%); opacity: 0.5; }

/* ============ DAY PAGE ============ */
.day-container { min-height: 100vh; background: var(--bg-base); padding: 2rem; }
.back-btn { background: transparent; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; text-decoration: none; font-weight: 600; transition: color 0.2s ease; }
.back-btn:hover { color: var(--python-yellow); }
.day-title { margin: 0; font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
.ide-wrapper { max-width: 1400px; margin: 0 auto; background: var(--bg-secondary); border: var(--border-hard); border-radius: 8px; overflow: hidden; }
.ide-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; height: calc(100vh - 110px); gap: 1px; background: #333333; }
.ide-pane { display: flex; flex-direction: column; background: var(--bg-secondary); overflow: hidden; }
.pane-header { background: var(--bg-base); border-bottom: var(--border-hard); padding: 1rem; font-weight: 600; color: var(--text-main); font-size: 0.9rem; font-family: 'Courier New', Courier, monospace; }
.pane-content { flex: 1; overflow-y: auto; padding: 1.5rem; }
.pane-content h2 { margin: 0 0 1rem; font-family: var(--font-heading); font-size: 1.3rem; color: var(--text-main); }
.pane-content h3 { color: var(--python-blue); margin-top: 0;}
.pane-content p { margin: 0 0 1rem; color: var(--text-muted); line-height: 1.7; }
.pane-content hr { border: none; border-top: var(--border-hard); margin: 1.5rem 0; }
#quiz-options { display: grid; gap: 0.75rem; margin: 1rem 0; }
.quiz-option { background: var(--bg-base); border: var(--border-hard); padding: 1rem; border-radius: 4px; cursor: pointer; text-align: left; transition: all 0.2s ease; font-family: var(--font-body); color: var(--text-main); }
.quiz-option:hover { border-color: var(--python-blue); }
.quiz-option.correct { background: rgba(39, 201, 63, 0.1); border-color: #27c93f; }
.quiz-option.incorrect { background: rgba(255, 95, 86, 0.1); border-color: #ff5f56; }
#quiz-feedback { margin-top: 1rem; padding: 1rem; border-radius: 4px; font-weight: 600; display: none; }
#quiz-feedback.correct { background: rgba(39, 201, 63, 0.1); color: #27c93f; }
#quiz-feedback.incorrect { background: rgba(255, 95, 86, 0.1); color: #ff5f56; }

/* ============ CODEMIRROR IDE LAYOUT & HEIGHT FIX ============ */
.CodeMirror { 
    height: 100% !important; 
    flex-grow: 1 !important;
    font-size: 0.95rem; 
    background-color: #1e1e1e !important;
    color: #d4d4d4 !important;
}
.CodeMirror-gutters {
    background-color: #252526 !important;
    border-right: 1px solid #333333 !important;
}
.CodeMirror-cursor {
    border-left-color: #ffffff !important;
}
.cm-s-one-dark .cm-keyword { color: #c678dd !important; }
.cm-s-one-dark .cm-string { color: #98c379 !important; }
.cm-s-one-dark .cm-variable { color: #e06c75 !important; }
.cm-s-one-dark .cm-def { color: #61afef !important; }

.editor-footer { display: flex; gap: 0.75rem; background: var(--bg-base); border-top: var(--border-hard); padding: 1rem; justify-content: flex-end; }
.editor-footer button { padding: 0.6rem 1.2rem; border-radius: 4px; border: none; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.reset-btn { background: transparent; color: var(--text-muted); border: 1px solid var(--text-muted); }
.reset-btn:hover { color: var(--text-main); border-color: var(--text-main); }
.output-panel { font-family: 'Courier New', monospace; white-space: pre-wrap; color: #d4d4d4; font-size: 0.85rem; line-height: 1.5; background: var(--bg-base); border: var(--border-hard); padding: 1rem; border-radius: 4px; flex-grow: 1; height: calc(100% - 2rem); overflow-y: auto;}
.output-panel.success { border-color: #27c93f; }
.output-panel.error { border-color: #ff5f56; color: #ff5f56; }

/* ============ 2-STEP FLOW & IDE OVERRIDES ============ */
.step-container {
    animation: slideUpFade 0.5s ease-out;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hidden-step {
    display: none !important;
}

.quiz-block {
    background: var(--bg-secondary);
    border: var(--border-hard);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.quiz-block h4 {
    margin: 0 0 1rem;
    color: var(--text-main);
}

/* ============ THEORY HTML FORMATTING ============ */
#theory-text strong {
    color: var(--text-main);
    font-weight: 700;
}
#theory-text ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}
#theory-text code {
    background: var(--bg-base);
    border: var(--border-hard);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--python-yellow);
}

/* ============ FINAL PROJECT HIGHLIGHT ============ */
.challenge-card.final-project {
    border-color: var(--python-yellow);
    background: rgba(255, 212, 59, 0.05);
    box-shadow: 0 0 15px rgba(255, 212, 59, 0.1);
}

.challenge-card.final-project .day-number {
    color: var(--python-yellow);
    font-size: 1.3rem;
}

.challenge-card.final-project:hover {
    box-shadow: 0 0 25px rgba(255, 212, 59, 0.3);
    border-color: var(--python-yellow);
    transform: translateY(-4px);
}

/* ============ MINI PROJECT HIGHLIGHT ============ */
.challenge-card.mini-project {
    border-color: var(--python-blue);
    background: rgba(75, 139, 190, 0.05);
    box-shadow: 0 0 8px rgba(75, 139, 190, 0.1);
}

.challenge-card.mini-project .day-number {
    color: var(--python-blue);
    font-size: 1.25rem;
}

.challenge-card.mini-project:hover {
    box-shadow: 0 0 15px rgba(75, 139, 190, 0.25);
    border-color: var(--python-blue);
    transform: translateY(-3px);
}