:root {
    --bg-dark: #0a0b1e;
    --bg-panel: rgba(255, 255, 255, 0.05);
    --primary: #d4a5ff;
    --accent: #7b61ff;
    --text-main: #ffffff;
    --text-muted: #a0a0c0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-main: linear-gradient(135deg, #d4a5ff 0%, #7b61ff 100%);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    color-scheme: dark;
}

/* Ensure inputs are reachable */
input,
select,
button {
    position: relative;
    z-index: 10;
}

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

body {
    background: url('bg-cosmic.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Aesthetics */
.background-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.2;
    /* Reduced opacity for new background */
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #4a00e0;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: #8e2de2;
    bottom: -50px;
    right: -50px;
}

/* Header */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(10, 11, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-symbol {
    color: var(--primary);
    font-size: 1.4rem;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: var(--text-main);
}

.btn-login {
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--glass-border);
}

/* Hero Section */
.hero-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5rem 5%;
    gap: 4rem;
    flex-wrap: wrap;
}


/* Widen Hero/Main Content */
.hero-content {
    flex: 1;
    min-width: 300px;
    max-width: 800px;
    /* Increased from 600px */
}

/* Widen Prediction Items for better reading */
.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    /* Wider columns */
    gap: 20px;
    margin-top: 20px;
}

/* Timeline specific override for Grid */
.timeline-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Column layout for desktop */
    gap: 40px;
    position: relative;
    padding-left: 0;
    border-left: none;
    margin-left: 0;
}

/* Central Line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-event {
    margin-bottom: 30px;
    position: relative;
    width: 100%;
    /* In grid cell */
}

/* Right side events */
.timeline-event:nth-child(even) {
    grid-column: 2;
    padding-left: 30px;
}

/* Left side events */
.timeline-event:nth-child(odd) {
    grid-column: 1;
    text-align: right;
    padding-right: 30px;
}

/* Dots on central line */
.timeline-event::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    top: 5px;
    z-index: 10;
}

/* Position dots */
.timeline-event:nth-child(odd)::before {
    right: -46px;
    /* Adjust for gap + half center */
    left: auto;
}

.timeline-event:nth-child(even)::before {
    left: -46px;
}

/* Section dividers span full width */
.section-divider {
    grid-column: 1 / -1;
    text-align: center;
    border-bottom: 2px solid var(--accent);
    margin: 40px 0 30px 0;
    z-index: 20;
    background: var(--bg-dark);
    /* overlay line */
    padding: 10px;
    border-radius: 50px;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.timeline-desc {
    font-size: 1rem;
    line-height: 1.6;
}

/* Mobile Responsive Override */
@media (max-width: 768px) {
    .timeline-container {
        display: block;
        padding-left: 20px;
        border-left: 2px solid var(--glass-border);
    }

    .timeline-container::after {
        display: none;
    }

    .timeline-event:nth-child(odd),
    .timeline-event:nth-child(even) {
        grid-column: 1;
        text-align: left;
        padding: 0;
        margin-bottom: 30px;
    }

    .timeline-event::before {
        left: -26px;
        right: auto !important;
    }

    .section-divider {
        width: 100%;
        text-align: left;
        background: none;
        border-bottom: 1px solid var(--glass-border);
    }
}


h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Glass Card */
.glass-card {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.form-container {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

h2 {
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: #000;
}

.hidden {
    display: none !important;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

input,
select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    background: var(--gradient-main);
    border: none;
    padding: 14px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(123, 97, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(123, 97, 255, 0.5);
}

/* Features Footer */
.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 5%;
    background: rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
}

.feature-card {
    background: var(--bg-panel);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    .hero-section {
        padding: 3rem 5%;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Prediction Grid */
.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.prediction-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
}

.prediction-item h4 {
    color: var(--primary);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 5px;
}

.question-box {
    background: rgba(212, 165, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    margin-bottom: 0.5rem;
}