:root {
    --bg-color: #050b14;
    --app-bg: rgba(255, 255, 255, 0.15);
    
    /* Default Themes (Will be overridden by JS) */
    --theme-color-1: #4f46e5;
    --theme-color-2: #818cf8;
    --theme-accent: #c7d2fe;
    
    --text-main: #ffffff;
    --text-muted: #d1d5db;
    --text-light: #ffffff;
    --border-color: rgba(255, 255, 255, 0.3);
    
    /* Stage Colors */
    --color-purple: var(--theme-color-1);
    --color-blue: var(--theme-color-2);
    --color-yellow: #f59e0b;
    --color-green: #10b981;
    --color-orange: #f97316;
    --color-red: #ef4444;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    position: relative;
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.02) 45%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 55%, transparent 60%),
                linear-gradient(135deg, var(--bg-color), #091020);
    background-size: 200% 200%, 100% 100%;
    animation: bgStreaks 20s linear infinite;
    overflow: hidden;
}

.aurora-bg::before, .aurora-bg::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 50% 50%, var(--theme-color-1), transparent 60%),
                radial-gradient(circle at 80% 20%, var(--theme-color-2), transparent 50%),
                radial-gradient(circle at 20% 80%, var(--theme-accent), transparent 50%);
    filter: blur(120px);
    opacity: 0.6;
    animation: auroraFlow 25s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
    transition: background 1.5s ease;
    mix-blend-mode: color-dodge;
}

.aurora-bg::after {
    background: radial-gradient(circle at 20% 50%, var(--theme-color-2), transparent 60%),
                radial-gradient(circle at 70% 80%, var(--theme-color-1), transparent 50%);
    animation: auroraFlow 30s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate-reverse;
    opacity: 0.5;
    mix-blend-mode: overlay;
}

@keyframes auroraFlow {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(-5%, 5%) scale(1.05) rotate(2deg); }
    100% { transform: translate(5%, -5%) scale(1) rotate(-2deg); }
}

@keyframes bgStreaks {
    0% { background-position: 200% 0, 0 0; }
    100% { background-position: -200% 0, 0 0; }
}

.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.timeline-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.timeline-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.back-btn {
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.quiz-nav-btn {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.quiz-nav-btn:hover {
    background: rgba(245, 158, 11, 0.2);
}

/* Timeline Layout */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* Vertical line */
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

/* Container around content */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
}

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

/* Positioning */
.left { left: 0; }
.right { left: 50%; }

/* Circles on timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--theme-color-1);
    border: 4px solid var(--bg-color);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 15px var(--theme-color-1);
}

.right::after { left: -10px; }

/* The actual content */
.timeline-content {
    padding: 30px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(30px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
}

.phase-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: white;
}

.phase-badge.purple { background: var(--color-purple); }
.phase-badge.blue { background: var(--color-blue); }
.phase-badge.yellow { background: var(--color-yellow); color: #000; }
.phase-badge.green { background: var(--color-green); }

.timeline-content h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.timeline-details {
    list-style: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.timeline-details li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-details li i {
    color: #34d399;
}

.day-highlight {
    margin-top: 15px;
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-yellow);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Responsive timeline */
@media screen and (max-width: 600px) {
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 21px; }
    .left::after, .right::after { left: 21px; }
    .right { left: 0%; }
}
