/* ========================================
   JoSAA College Predictor
   Flat Minimal Green/Teal Theme
   With Dark/Light Mode Support
   ======================================== */

/* ==================== CSS Variables - Dark Theme (Default) ==================== */
:root {
    /* Primary Colors - Green/Teal Palette */
    --primary: #0d9488;
    --primary-light: #14b8a6;
    --primary-dark: #0f766e;
    --primary-muted: rgba(13, 148, 136, 0.15);

    /* Accent Colors */
    --accent: #059669;
    --accent-light: #10b981;

    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Background Colors - Dark */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-elevated: #334155;

    /* Text Colors - Dark */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Border - Dark */
    --border: rgba(148, 163, 184, 0.15);
    --border-light: rgba(148, 163, 184, 0.1);

    /* Shadows - Dark */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Navbar - Dark */
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --navbar-bg-scrolled: rgba(15, 23, 42, 0.98);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --transition: 0.2s ease;

    /* Font */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==================== Light Theme ==================== */
[data-theme="light"] {
    /* Background Colors - Light */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;

    /* Text Colors - Light */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Border - Light */
    --border: rgba(15, 23, 42, 0.1);
    --border-light: rgba(15, 23, 42, 0.05);

    /* Shadows - Light */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

    /* Navbar - Light */
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);

    /* Primary Muted - Light */
    --primary-muted: rgba(13, 148, 136, 0.1);
}

/* Light Theme Navbar Overrides - Force Override */
html[data-theme="light"] .navbar-custom {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
}

html[data-theme="light"] .navbar-brand .brand-text {
    color: #0f172a !important;
}

html[data-theme="light"] .navbar-brand .brand-icon {
    color: #0f172a !important;
}

html[data-theme="light"] .navbar-custom .nav-link {
    color: #1e293b !important;
}

html[data-theme="light"] .navbar-custom .nav-link:hover {
    color: #0f172a !important;
    background: rgba(13, 148, 136, 0.1) !important;
}

html[data-theme="light"] .navbar-custom .nav-link.active {
    color: #0f766e !important;
    background: rgba(13, 148, 136, 0.12) !important;
}

html[data-theme="light"] .navbar-toggler {
    color: #0f172a !important;
}

html[data-theme="light"] .theme-toggle {
    background: #e2e8f0 !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #334155 !important;
}

html[data-theme="light"] .theme-toggle:hover {
    background: rgba(13, 148, 136, 0.15) !important;
    color: var(--primary) !important;
}

html[data-theme="light"] .btn-cta-nav {
    background: var(--primary) !important;
    color: white !important;
}

/* Light Theme Form Input Overrides - Force Override */
html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] input.form-control,
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="text"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus,
html[data-theme="light"] input.form-control:focus,
html[data-theme="light"] input[type="number"]:focus,
html[data-theme="light"] input[type="text"]:focus {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: var(--primary) !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="light"] .form-control::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}

html[data-theme="light"] .form-select option {
    background: #ffffff !important;
    color: #0f172a !important;
}

/* Light Theme Tom Select Overrides - Force Override */
html[data-theme="light"] .ts-wrapper.single .ts-control {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="light"] .ts-wrapper .ts-control input,
html[data-theme="light"] .ts-wrapper .ts-control .item {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="light"] .ts-dropdown {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
}

html[data-theme="light"] .ts-dropdown .option {
    color: #334155 !important;
}

html[data-theme="light"] .ts-dropdown .option:hover,
html[data-theme="light"] .ts-dropdown .option.active {
    background: rgba(13, 148, 136, 0.1) !important;
    color: #0f172a !important;
}

/* Light Theme Feature Cards & Cards */
[data-theme="light"] .feature-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .feature-card h3 {
    color: #0f172a;
}

[data-theme="light"] .stat-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .stat-card:hover {
    border-color: var(--primary);
}

[data-theme="light"] .stat-number {
    color: #0f172a;
}

/* Light Theme Hero */
[data-theme="light"] .hero-title {
    color: #0f172a;
}

[data-theme="light"] .hero-badge {
    background: rgba(13, 148, 136, 0.1);
}

html[data-theme="light"] .hero-section {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75)),
        url('https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/Main_building_IIT_Roorkee.jpg/1280px-Main_building_IIT_Roorkee.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
}

[data-theme="light"] .floating-card,
[data-theme="light"] .hero-main-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .floating-card span,
[data-theme="light"] .main-card-header {
    color: #0f172a;
}

/* Light Theme Institute Cards */
[data-theme="light"] .institute-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .institute-card h4 {
    color: #0f172a;
}

[data-theme="light"] .institute-arrow {
    background: #f1f5f9;
}

/* Light Theme Predictor Card */
[data-theme="light"] .predictor-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .form-group label {
    color: #334155;
}

/* Light Theme Results */
[data-theme="light"] .results-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .results-table thead {
    background: #f8fafc;
}

[data-theme="light"] .results-table th {
    color: #475569;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .results-table td {
    color: #334155;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .result-row:hover {
    background: rgba(13, 148, 136, 0.05);
}

[data-theme="light"] .institute-name {
    color: #0f172a;
}

/* Light Theme Footer */
[data-theme="light"] .footer-section {
    background: #f1f5f9;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .footer-top {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .footer-logo .brand-text,
[data-theme="light"] .footer-logo .brand-icon {
    color: #0f172a;
}

[data-theme="light"] .footer-links h5 {
    color: #0f172a;
}

[data-theme="light"] .footer-links a {
    color: #475569;
}

[data-theme="light"] .footer-links a:hover {
    color: var(--primary);
}

[data-theme="light"] .social-link {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #475569;
}

[data-theme="light"] .social-link:hover {
    background: var(--primary);
    color: white;
}

[data-theme="light"] .newsletter-form input {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

/* Light Theme Accordion */
[data-theme="light"] .accordion-item {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .accordion-button {
    background: transparent;
    color: #0f172a;
}

[data-theme="light"] .accordion-button:not(.collapsed) {
    background: rgba(13, 148, 136, 0.08);
    color: var(--primary-dark);
}

[data-theme="light"] .accordion-body {
    color: #475569;
}

/* Light Theme Page Header */
[data-theme="light"] .page-title {
    color: #0f172a;
}

/* Light Theme About/Contact Cards */
[data-theme="light"] .about-stat-card,
[data-theme="light"] .contact-card,
[data-theme="light"] .contact-form-card,
[data-theme="light"] .data-card,
[data-theme="light"] .info-card,
[data-theme="light"] .additional-info {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .step-card h3,
[data-theme="light"] .about-content h2,
[data-theme="light"] .contact-info h3,
[data-theme="light"] .contact-form-card h3,
[data-theme="light"] .info-card h4,
[data-theme="light"] .additional-info h3 {
    color: #0f172a;
}

/* Light Theme Cutoffs */
[data-theme="light"] .cutoff-main-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .cutoff-table th {
    background: #f8fafc;
    color: #475569;
}

[data-theme="light"] .cutoff-table td {
    color: #334155;
}

[data-theme="light"] .cutoff-table tbody tr:hover {
    background: rgba(13, 148, 136, 0.05);
}

[data-theme="light"] .category-name {
    color: #0f172a;
}

/* ==================== Theme Toggle Button ==================== */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.theme-toggle:hover {
    background: var(--primary-muted);
    border-color: var(--primary);
    color: var(--primary);
}

.theme-toggle .bi-sun {
    display: none;
}

.theme-toggle .bi-moon {
    display: block;
}

[data-theme="light"] .theme-toggle .bi-sun {
    display: block;
}

[data-theme="light"] .theme-toggle .bi-moon {
    display: none;
}

/* ==================== Reset & Base ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==================== Animated Background - Subtle ==================== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-primary);
}

/* ==================== Typography ==================== */
.text-gradient {
    color: var(--primary-light);
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-muted);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== Navbar ==================== */
.navbar-custom {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar-custom.scrolled {
    background: rgba(15, 23, 42, 0.98);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    color: var(--text-primary);
}

.navbar-nav {
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem !important;
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
    background: var(--primary-muted);
}

.nav-link.active {
    color: var(--primary-light) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.btn-cta-nav {
    background: var(--primary);
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
}

.btn-cta-nav:hover {
    background: var(--primary-dark);
    color: white;
}

/* ==================== Main Wrapper ==================== */
.main-wrapper {
    padding-top: 65px;
    min-height: 100vh;
}

/* ==================== Hero Section ==================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    /* IIT Roorkee Iconic Main Building */
    background: linear-gradient(to right, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.8)),
        url('https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/Main_building_IIT_Roorkee.jpg/1280px-Main_building_IIT_Roorkee.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content {
    padding-right: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--primary-muted);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 1.25rem;
}

.badge-icon {
    font-size: 0.9rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.highlight-text {
    color: var(--primary-light);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-primary-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
}

.btn-primary-hero:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-primary-hero .btn-arrow {
    display: none;
}

.btn-secondary-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.btn-secondary-hero:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary-light);
}

.hero-trust {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.trust-item i {
    color: var(--success);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 450px;
}

.hero-card-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.floating-card.card-1 {
    top: 15%;
    right: 10%;
}

.floating-card.card-2 {
    top: 45%;
    left: 5%;
}

.floating-card.card-3 {
    bottom: 20%;
    right: 15%;
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.card-icon.iit {
    background: #f59e0b;
}

.card-icon.nit {
    background: var(--primary);
}

.card-icon.iiit {
    background: #6366f1;
}

.floating-card span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.floating-card small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.hero-main-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    width: 260px;
}

.main-card-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.prediction-meter {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.meter-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    width: 75%;
}

.prediction-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    text-align: center;
}

.prediction-stats .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-light);
}

.prediction-stats .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.mouse {
    width: 20px;
    height: 30px;
    border: 2px solid var(--text-muted);
    border-radius: 10px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}

/* ==================== Stats Section ==================== */
.stats-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==================== Features Section ==================== */
.features-section {
    padding: 5rem 0;
}

.section-header {
    margin-bottom: 2.5rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    height: 100%;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 1.25rem;
}

/* Remove gradient classes - use solid colors */
.gradient-1,
.gradient-2,
.gradient-3,
.gradient-4,
.gradient-5,
.gradient-6 {
    background: var(--primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-light);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.feature-link:hover {
    color: var(--primary);
}

/* ==================== Institutes Section ==================== */
.institutes-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.institute-card {
    display: block;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    transition: var(--transition);
}

.institute-card:hover {
    border-color: var(--primary);
}

.institute-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
}

.iit-card .institute-icon {
    background: #f59e0b;
}

.nit-card .institute-icon {
    background: var(--primary);
}

.iiit-card .institute-icon {
    background: #6366f1;
}

.gfti-card .institute-icon {
    background: var(--gray-500);
}

.iit-card:hover {
    border-color: #f59e0b;
}

.nit-card:hover {
    border-color: var(--primary);
}

.iiit-card:hover {
    border-color: #6366f1;
}

.gfti-card:hover {
    border-color: var(--gray-500);
}

.institute-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.institute-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.institute-arrow {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: var(--transition);
    color: var(--text-muted);
}

.institute-card:hover .institute-arrow {
    background: var(--primary);
    color: white;
}

/* ==================== CTA Section ==================== */
.cta-section {
    padding: 5rem 0;
}

.cta-card {
    background: var(--primary);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.cta-content p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    color: white;
}

.btn-cta-main {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary-dark);
    padding: 0.9rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
}

.btn-cta-main:hover {
    background: var(--gray-100);
    color: var(--primary-dark);
}

.cta-decoration {
    display: none;
}

/* ==================== Page Header ==================== */
.page-header {
    padding: 6rem 0 3rem;
    text-align: center;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==================== Predictor Section ==================== */
.predictor-section {
    padding: 0 0 3rem;
}

.predictor-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 3;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: var(--primary);
}

.form-control,
.form-select {
    padding: 0.85rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 500;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: #f1f5f9 !important;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: none;
    background: var(--bg-primary) !important;
    color: #f1f5f9 !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

/* Ensure input text is always visible */
input.form-control,
input[type="number"].form-control,
input[type="text"].form-control {
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--primary-muted);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--primary-light);
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-predict {
    background: var(--primary);
    color: white;
    padding: 1rem 3rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-predict:hover {
    background: var(--primary-dark);
}

.btn-predict:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-reset {
    background: transparent;
    color: var(--text-secondary);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 500;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ==================== Results Section ==================== */
.results-section {
    padding: 1.5rem 0 3rem;
}

.results-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--primary);
    color: white;
}

.results-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.results-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.05rem;
}

.results-info .highlight {
    color: #fef3c7;
    font-weight: 700;
}

.btn-export {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-export:hover {
    background: rgba(255, 255, 255, 0.3);
}

.probability-legend {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1rem 2rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-item.safe .legend-dot {
    background: var(--success);
}

.legend-item.moderate .legend-dot {
    background: var(--warning);
}

.legend-item.risky .legend-dot {
    background: var(--danger);
}

.table-container {
    overflow-x: auto;
    max-height: 550px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table th {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.results-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 1rem;
}

.result-row {
    transition: var(--transition);
}

.result-row:hover {
    background: var(--primary-muted);
}

.row-number {
    font-weight: 600;
    color: var(--text-muted);
    width: 45px;
}

.institute-cell {
    min-width: 180px;
}

.institute-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.institute-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.institute-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    text-transform: uppercase;
    width: fit-content;
}

.institute-badge.iit {
    background: #f59e0b;
    color: white;
}

.institute-badge.nit {
    background: var(--primary);
    color: white;
}

.institute-badge.iiit {
    background: #6366f1;
    color: white;
}

.institute-badge.gfti {
    background: var(--gray-500);
    color: white;
}

.round-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    background: var(--primary-muted);
    color: var(--primary-light);
    border-radius: 3px;
    margin-left: 0.4rem;
}

.program-cell {
    max-width: 220px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quota-badge {
    background: var(--primary-muted);
    color: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
}

.category-badge {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.75rem;
}

.gender-cell {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rank-cell {
    font-weight: 700;
    color: var(--primary-light);
}

.probability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
}

.probability-badge.safe {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.probability-badge.moderate {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.probability-badge.risky {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.no-results-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 1.25rem;
}

.no-results-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.no-results h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.no-results p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== About Page ==================== */
.about-section {
    padding: 3rem 0;
}

.about-content {
    padding-right: 2rem;
}

.about-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    line-height: 1.7;
}

.about-features {
    margin-top: 1.5rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.about-feature i {
    color: var(--success);
    font-size: 1.1rem;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.about-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.about-stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-light);
    display: block;
}

.about-stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* How It Works */
.how-it-works-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 1.25rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Data Source */
.data-source-section {
    padding: 3rem 0;
}

.data-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.data-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.data-card h3 i {
    color: var(--success);
}

.data-card p {
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
}

.data-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem;
    background: var(--primary-muted);
    border-radius: var(--radius-lg);
    color: var(--primary-light);
}

.data-badge i {
    font-size: 2.5rem;
}

.data-badge span {
    font-weight: 600;
}

/* ==================== Contact Page ==================== */
.contact-section {
    padding: 1.5rem 0 5rem;
}

.contact-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.contact-info>p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}

.contact-details h4 {
    font-weight: 600;
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.contact-details p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.contact-form-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.contact-form-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.contact-form textarea.form-control {
    resize: none;
}

.btn-submit-contact {
    background: var(--primary);
    color: white;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-submit-contact:hover {
    background: var(--primary-dark);
}

/* FAQ */
.faq-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.faq-accordion {
    margin-top: 1.5rem;
}

.accordion-item {
    background: var(--bg-primary);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-button {
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem 1.25rem;
    border: none;
    box-shadow: none !important;
    font-size: 0.95rem;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-muted);
    color: var(--primary-light);
}

.accordion-button::after {
    filter: invert(0.6);
}

.accordion-body {
    padding: 0 1.25rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== Footer ==================== */
.footer-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding-top: 3rem;
}

.footer-top {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    margin-bottom: 1.25rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.footer-tagline {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.footer-links h5 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-newsletter h5 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.footer-newsletter p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
}

.newsletter-form {
    display: flex;
    gap: 0.4rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.6rem 0.85rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.newsletter-form button {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    padding: 1.25rem 0;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.disclaimer {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
    text-align: right;
}

.disclaimer i {
    color: var(--warning);
}

/* ==================== Animations - Minimal ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease forwards;
}

.delay-1 {
    animation-delay: 0.08s;
}

.delay-2 {
    animation-delay: 0.16s;
}

.delay-3 {
    animation-delay: 0.24s;
}

.delay-4 {
    animation-delay: 0.32s;
}

.animate-on-scroll.animated {
    animation: fadeIn 0.4s ease forwards;
}

/* ==================== Custom Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
    .hero-visual {
        display: none;
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-trust {
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-group.full-width {
        grid-column: span 2;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 5rem 0 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary-hero,
    .btn-secondary-hero {
        width: 100%;
        justify-content: center;
    }

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

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

    .form-group.full-width {
        grid-column: span 1;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-predict,
    .btn-reset {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        text-align: center;
    }

    .probability-legend {
        justify-content: center;
    }

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

    .footer-bottom {
        text-align: center;
    }

    .disclaimer {
        text-align: center;
        margin-top: 0.4rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-cta {
        display: none;
    }

    .predictor-card {
        padding: 1.25rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.65rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* ==================== Print ==================== */
@media print {

    .animated-bg,
    .navbar-custom,
    .hero-section,
    .predictor-card,
    .footer-section,
    .probability-legend,
    .btn-export,
    .cta-section {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .results-card {
        background: white;
        border: 1px solid #ddd;
    }

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease forwards;
}

.delay-1 {
    animation-delay: 0.08s;
}

.delay-2 {
    animation-delay: 0.16s;
}

.delay-3 {
    animation-delay: 0.24s;
}

.delay-4 {
    animation-delay: 0.32s;
}

.animate-on-scroll.animated {
    animation: fadeIn 0.4s ease forwards;
}

/* ==================== Custom Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
    .hero-visual {
        display: none;
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-trust {
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-group.full-width {
        grid-column: span 2;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 5rem 0 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary-hero,
    .btn-secondary-hero {
        width: 100%;
        justify-content: center;
    }

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

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

    .form-group.full-width {
        grid-column: span 1;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-predict,
    .btn-reset {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        text-align: center;
    }

    .probability-legend {
        justify-content: center;
    }

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

    .footer-bottom {
        text-align: center;
    }

    .disclaimer {
        text-align: center;
        margin-top: 0.4rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-cta {
        display: none;
    }

    .predictor-card {
        padding: 1.25rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.65rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* ==================== Print ==================== */
@media print {

    .animated-bg,
    .navbar-custom,
    .hero-section,
    .predictor-card,
    .footer-section,
    .probability-legend,
    .btn-export,
    .cta-section {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .results-card {
        background: white;
        border: 1px solid #ddd;
    }

    .results-table th,
    .results-table td {
        color: black;
        border: 1px solid #ddd;
    }
}

/* ==================== Chat Widget ==================== */
.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-bubble i {
    color: white;
    font-size: 1.5rem;
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border: 1px solid var(--border);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: var(--primary);
    padding: 15px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.btn-close-chat {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
}

.btn-close-chat:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    margin-bottom: 5px;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message {
    align-self: flex-end;
}

.user-message .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.bot-message {
    align-self: flex-start;
}

.bot-message .message-content {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 2px;
}

[data-theme="light"] .bot-message .message-content {
    background: #f0f2f5;
    border: none;
    color: #0f172a;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    background: var(--bg-card);
}

#chat-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 15px;
    color: var(--text-primary);
    outline: none;
}

#chat-input:focus {
    border-color: var(--primary);
}

#send-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

#send-btn:hover {
    transform: scale(1.1);
}

/* Typing Indicator */
.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
    margin: 0 1px;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .chat-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .chat-bubble {
        bottom: 20px;
        right: 20px;
    }
}

/* ==================== Legal Pages (Privacy Policy, Terms) ==================== */
.legal-section {
    padding: 6rem 0 4rem;
    min-height: 100vh;
}

.legal-header {
    margin-bottom: 3rem;
}

.legal-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.legal-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}

.legal-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-card ul {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-card li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.legal-card a {
    color: var(--primary-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-card a:hover {
    color: var(--primary);
}

.legal-card .alert {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.legal-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Light theme legal pages */
[data-theme="light"] .legal-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .legal-card h2,
[data-theme="light"] .legal-card h3 {
    color: #0f172a;
}

[data-theme="light"] .legal-card p,
[data-theme="light"] .legal-card li {
    color: #475569;
}

/* ==================== Footer Legal Links ==================== */
.footer-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-legal-links a:hover {
    color: var(--primary-light);
}

.footer-legal-links .separator {
    color: var(--text-muted);
    opacity: 0.5;
}

[data-theme="light"] .footer-legal-links a {
    color: #64748b;
}

[data-theme="light"] .footer-legal-links a:hover {
    color: var(--primary);
}

/* ==================== Ad Container Placeholder ==================== */
.ad-container {
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 2rem 0;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .footer-bottom .row {
        text-align: center;
    }

    .footer-bottom .col-md-4 {
        margin-bottom: 0.5rem;
    }

    .footer-legal-links {
        margin: 0.5rem 0;
    }

    .disclaimer {
        text-align: center !important;
    }
}