/* =====================================================
   MATHEMATICS ROADMAP - COMPLETE STYLESHEET
   From Zero to Research Level
   ===================================================== */

/* CSS Variables for Consistent Theming */
:root {
    --primary-dark: #0d1b2a;
    --primary-blue: #1b3a5f;
    --accent-gold: #f4b942;
    --accent-teal: #2dd4bf;
    --accent-purple: #8b5cf6;
    --accent-rose: #f43f5e;
    --accent-green: #10b981;
    --accent-orange: #f97316;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 40px rgba(244, 185, 66, 0.15);
    
    /* Stage Colors */
    --stage1-color: #22c55e;
    --stage2-color: #3b82f6;
    --stage3-color: #8b5cf6;
    --stage4-color: #f97316;
    --stage5-color: #f43f5e;
    --stage6-color: #f4b942;
}

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a1a2e 50%, var(--primary-blue) 100%);
    color: var(--text-light);
    line-height: 1.7;
    min-height: 100vh;
    font-weight: 600;
}

/* Typography - All Bold */
h1, h2, h3, h4, h5, h6, p, span, li, button, a {
    font-weight: 700;
}

h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -1px;
}

h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
}

h3 {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
}

h4 {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Print Button */
.print-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--accent-gold), #e5a835);
    color: var(--primary-dark);
    border: none;
    border-radius: 50px;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(244, 185, 66, 0.4);
    transition: all 0.3s ease;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(244, 185, 66, 0.6);
}

.print-btn svg {
    width: 20px;
    height: 20px;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 100px 20px 80px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(244, 185, 66, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    background: linear-gradient(135deg, var(--text-light), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: none;
}

.subtitle {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--accent-teal);
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.hero-decoration {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

/* Quick Navigation */
.quick-nav {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.quick-nav h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-light);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-btn {
    padding: 15px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-light);
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.nav-btn:hover {
    background: rgba(244, 185, 66, 0.15);
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.nav-btn.special {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(244, 185, 66, 0.2));
    border-color: var(--accent-purple);
}

.nav-btn.special:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(244, 185, 66, 0.4));
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Stage Sections */
.stage {
    margin-bottom: 80px;
    padding: 50px 0;
    border-radius: 24px;
    position: relative;
}

.stage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    z-index: -1;
}

.stage-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.stage-number {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 900;
    opacity: 0.15;
    position: absolute;
    top: 20px;
    left: 40px;
}

.stage-1 .stage-number { color: var(--stage1-color); }
.stage-2 .stage-number { color: var(--stage2-color); }
.stage-3 .stage-number { color: var(--stage3-color); }
.stage-4 .stage-number { color: var(--stage4-color); }
.stage-5 .stage-number { color: var(--stage5-color); }
.stage-6 .stage-number { color: var(--stage6-color); }

.stage-header h2 {
    color: var(--text-light);
    margin-bottom: 10px;
}

.stage-1 .stage-header h2 { color: var(--stage1-color); }
.stage-2 .stage-header h2 { color: var(--stage2-color); }
.stage-3 .stage-header h2 { color: var(--stage3-color); }
.stage-4 .stage-header h2 { color: var(--stage4-color); }
.stage-5 .stage-header h2 { color: var(--stage5-color); }
.stage-6 .stage-header h2 { color: var(--stage6-color); }

.stage-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Topic Cards */
.topics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    padding: 0 30px;
}

.topic-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.topic-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.topic-card h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(244, 185, 66, 0.3);
}

.topic-card ul {
    list-style: none;
}

.topic-card li {
    margin-bottom: 8px;
}

.topic-btn {
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.topic-btn::before {
    content: '→';
    margin-right: 10px;
    color: var(--accent-teal);
    font-weight: 700;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.topic-btn:hover {
    background: rgba(45, 212, 191, 0.1);
    border-color: var(--accent-teal);
    padding-left: 20px;
}

.topic-btn:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Visualization Sections */
.visualization-section {
    margin: 100px 0;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Flowchart Styles */
.flowchart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.flow-node {
    width: 320px;
    padding: 25px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.flow-node:hover {
    transform: scale(1.05);
    z-index: 2;
}

.flow-node.foundation {
    background: linear-gradient(135deg, var(--stage1-color), #16a34a);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
}

.flow-node.intermediate {
    background: linear-gradient(135deg, var(--stage2-color), #2563eb);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.flow-node.advanced {
    background: linear-gradient(135deg, var(--stage3-color), #7c3aed);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.flow-node.undergraduate {
    background: linear-gradient(135deg, var(--stage4-color), #ea580c);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4);
}

.flow-node.graduate {
    background: linear-gradient(135deg, var(--stage5-color), #dc2626);
    box-shadow: 0 8px 30px rgba(244, 63, 94, 0.4);
}

.flow-node.research {
    background: linear-gradient(135deg, var(--stage6-color), #ca8a04);
    box-shadow: 0 8px 30px rgba(244, 185, 66, 0.4);
}

.node-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
}

.node-number {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    opacity: 0.5;
}

.node-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 5px 0;
}

.node-desc {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Flow Arrows */
.flow-arrow {
    width: 4px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-gold), var(--accent-teal));
    position: relative;
}

.flow-arrow::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid var(--accent-teal);
}

/* Branch Containers */
.flowchart-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}

.branch-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 25px;
}

.branch-container h4 {
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.branch-items {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.branch-item {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--accent-teal);
    border-radius: 25px;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.9rem;
}

.branch-arrow {
    width: 25px;
    height: 3px;
    background: var(--accent-teal);
    position: relative;
}

.branch-arrow::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid var(--accent-teal);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* Mind Map Styles */
.mindmap-container {
    overflow-x: auto;
    padding: 20px;
}

.mindmap {
    position: relative;
    width: 900px;
    height: 900px;
    margin: 0 auto;
}

.mind-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, var(--accent-gold), #e5a835);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
    box-shadow: 0 0 60px rgba(244, 185, 66, 0.5);
}

.mind-center span {
    color: var(--primary-dark);
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 900;
}

/* Mind Map Branches */
.mind-branch {
    position: absolute;
}

.branch-main {
    padding: 15px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.branch-main:hover {
    transform: scale(1.1);
}

/* Branch Positions - Radially arranged */
.branch-1 { top: 80px; left: 50%; transform: translateX(-50%); }
.branch-1 .branch-main { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.branch-1 .branch-sub { top: 60px; }

.branch-2 { top: 150px; right: 100px; }
.branch-2 .branch-main { background: linear-gradient(135deg, #f97316, #ea580c); color: white; }
.branch-2 .branch-sub { left: 0; top: 55px; }

.branch-3 { top: 50%; right: 50px; transform: translateY(-50%); }
.branch-3 .branch-main { background: linear-gradient(135deg, #eab308, #ca8a04); color: var(--primary-dark); }
.branch-3 .branch-sub { left: 0; top: 55px; }

.branch-4 { bottom: 150px; right: 100px; }
.branch-4 .branch-main { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.branch-4 .branch-sub { left: 0; top: 55px; }

.branch-5 { bottom: 80px; left: 50%; transform: translateX(-50%); }
.branch-5 .branch-main { background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; }
.branch-5 .branch-sub { top: 60px; }

.branch-6 { bottom: 150px; left: 100px; }
.branch-6 .branch-main { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.branch-6 .branch-sub { right: 0; top: 55px; }

.branch-7 { top: 50%; left: 50px; transform: translateY(-50%); }
.branch-7 .branch-main { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }
.branch-7 .branch-sub { right: 0; top: 55px; }

.branch-8 { top: 150px; left: 100px; }
.branch-8 .branch-main { background: linear-gradient(135deg, #ec4899, #db2777); color: white; }
.branch-8 .branch-sub { right: 0; top: 55px; }

/* Branch Sub-items */
.branch-sub {
    position: absolute;
    display: none;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    min-width: 180px;
    z-index: 20;
}

.branch-sub.active {
    display: flex;
}

.branch-sub span {
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
}

/* Branch Lines - Connecting to center */
.branch-line {
    position: absolute;
    background: var(--border-light);
    z-index: 1;
}

.line-1 { width: 3px; height: 120px; top: 55px; left: 50%; transform: translateX(-50%) rotate(180deg); }
.line-2 { width: 150px; height: 3px; top: 25px; right: 100%; transform: rotate(-30deg); transform-origin: right; }
.line-3 { width: 150px; height: 3px; top: 25px; right: 100%; }
.line-4 { width: 150px; height: 3px; top: 25px; right: 100%; transform: rotate(30deg); transform-origin: right; }
.line-5 { width: 3px; height: 120px; bottom: 55px; left: 50%; transform: translateX(-50%); }
.line-6 { width: 150px; height: 3px; top: 25px; left: 100%; transform: rotate(-30deg); transform-origin: left; }
.line-7 { width: 150px; height: 3px; top: 25px; left: 100%; }
.line-8 { width: 150px; height: 3px; top: 25px; left: 100%; transform: rotate(30deg); transform-origin: left; }

/* Visual Roadmap Styles */
.roadmap-container {
    padding: 40px 20px;
}

.roadmap-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, 
        var(--stage1-color),
        var(--stage2-color),
        var(--stage3-color),
        var(--stage4-color),
        var(--stage5-color),
        var(--stage6-color)
    );
    transform: translateX(-50%);
    border-radius: 3px;
}

.roadmap-stage {
    position: relative;
    margin-bottom: 60px;
}

.stage-marker {
    display: flex;
    align-items: center;
    gap: 30px;
}

.stage-left .stage-marker {
    flex-direction: row-reverse;
    text-align: right;
}

.stage-right .stage-marker {
    text-align: left;
}

.marker-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.marker-1 .marker-dot { background: var(--stage1-color); box-shadow: 0 0 20px var(--stage1-color); }
.marker-2 .marker-dot { background: var(--stage2-color); box-shadow: 0 0 20px var(--stage2-color); }
.marker-3 .marker-dot { background: var(--stage3-color); box-shadow: 0 0 20px var(--stage3-color); }
.marker-4 .marker-dot { background: var(--stage4-color); box-shadow: 0 0 20px var(--stage4-color); }
.marker-5 .marker-dot { background: var(--stage5-color); box-shadow: 0 0 20px var(--stage5-color); }
.marker-6 .marker-dot { background: var(--stage6-color); box-shadow: 0 0 20px var(--stage6-color); }

.marker-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 25px;
    max-width: 350px;
    transition: all 0.3s ease;
}

.marker-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.marker-content h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.marker-content h3 {
    margin-bottom: 15px;
}

.marker-1 .marker-content h3 { color: var(--stage1-color); }
.marker-2 .marker-content h3 { color: var(--stage2-color); }
.marker-3 .marker-content h3 { color: var(--stage3-color); }
.marker-4 .marker-content h3 { color: var(--stage4-color); }
.marker-5 .marker-content h3 { color: var(--stage5-color); }
.marker-6 .marker-content h3 { color: var(--stage6-color); }

.marker-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.marker-topics span {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
}

/* Prerequisites Section */
.prerequisites-section {
    margin-top: 60px;
    text-align: center;
}

.prerequisites-section h3 {
    color: var(--accent-gold);
    margin-bottom: 30px;
}

.prereq-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.prereq-item {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(45, 212, 191, 0.2));
    border: 2px solid var(--accent-purple);
    border-radius: 30px;
    color: var(--text-light);
    font-weight: 700;
}

.prereq-arrow {
    width: 30px;
    height: 4px;
    background: var(--accent-teal);
    position: relative;
}

.prereq-arrow::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid var(--accent-teal);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* Disclaimer Section */
.disclaimer-section {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.disclaimer-box {
    background: rgba(244, 63, 94, 0.1);
    border: 2px solid var(--accent-rose);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.disclaimer-box h3 {
    color: var(--accent-rose);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.disclaimer-box p {
    color: var(--text-light);
    font-weight: 600;
    line-height: 1.8;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 50px 20px;
    margin-top: 80px;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.footer-content p:first-child {
    color: var(--text-light);
    font-size: 1.1rem;
}

.copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .print-btn,
    .back-to-top,
    .quick-nav {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        padding: 20px !important;
    }
    
    .hero h1,
    .subtitle,
    .tagline {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
    
    .stage,
    .topic-card,
    .visualization-section,
    .disclaimer-box,
    .marker-content {
        background: white !important;
        border: 2px solid #333 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .stage-header h2,
    .topic-card h3,
    .section-header h2,
    h3, h4 {
        color: #333 !important;
    }
    
    .topic-btn,
    p, span, li {
        color: black !important;
    }
    
    .flow-node,
    .branch-main,
    .prereq-item,
    .branch-item,
    .marker-topics span {
        color: black !important;
        border: 2px solid #333 !important;
        background: #f5f5f5 !important;
    }
    
    .flow-arrow,
    .branch-arrow,
    .prereq-arrow,
    .timeline-line {
        background: #333 !important;
    }
    
    .marker-dot {
        background: #333 !important;
    }
    
    .mindmap-container {
        transform: scale(0.7);
        transform-origin: top center;
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .topics-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .mindmap {
        width: 700px;
        height: 700px;
    }
    
    .mind-center {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 768px) {
    .print-btn {
        top: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 80px 15px 60px;
    }
    
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .topics-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .flow-node {
        width: 260px;
        padding: 20px;
    }
    
    .flowchart-branches {
        grid-template-columns: 1fr;
    }
    
    .mindmap {
        width: 100%;
        height: auto;
        min-height: 600px;
    }
    
    .mind-center {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto 30px;
    }
    
    .mind-branch {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin-bottom: 15px;
    }
    
    .branch-sub {
        position: relative;
        top: auto !important;
    }
    
    .branch-line {
        display: none;
    }
    
    .stage-left .stage-marker,
    .stage-right .stage-marker {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .marker-content {
        max-width: 100%;
    }
    
    .prereq-flow {
        flex-direction: column;
    }
    
    .prereq-arrow {
        transform: rotate(90deg);
        width: 20px;
    }
}

@media (max-width: 480px) {
    .nav-grid {
        grid-template-columns: 1fr;
    }
    
    .stage-number {
        font-size: 3rem;
    }
    
    .flow-node {
        width: 220px;
        padding: 15px;
    }
    
    .node-title {
        font-size: 1.1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stage {
    animation: fadeInUp 0.6s ease forwards;
}

.flow-node:hover {
    animation: pulse 0.5s ease;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent-purple), var(--accent-teal));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--accent-gold), var(--accent-purple));
}

/* Selection Styles */
::selection {
    background: var(--accent-gold);
    color: var(--primary-dark);
}