/* 
 * MoviePredict - Cinematic Dark Theme
 * Author: AI Assistant
 */

:root {
    /* Colors - Deep Nebula Theme */
    --bg-dark: #050507;
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-card-hover: rgba(255, 255, 255, 0.05);

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #7000ff 0%, #00c3ff 100%);
    --accent-gradient: linear-gradient(135deg, #ff0080 0%, #7000ff 100%);

    /* Accents */
    --primary: #00c3ff;
    --secondary: #7000ff;
    --accent: #bfa1a1;
    /* Rose Gold */

    /* Glows */
    --primary-glow: rgba(0, 195, 255, 0.4);
    --secondary-glow: rgba(112, 0, 255, 0.4);

    /* Text */
    --text-main: #ffffff;
    --text-muted: #8f90a0;

    /* Status */
    --success: #00ff9d;
    --danger: #ff4d4d;

    /* Effects */
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --backdrop-blur: blur(20px);

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background - Aurora */
.bg-aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 0% 0%, rgba(112, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(0, 195, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(112, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(0, 195, 255, 0.15) 0%, transparent 50%);
    filter: blur(60px);
    z-index: -2;
    animation: auroraMove 20s ease infinite alternate;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

@keyframes auroraMove {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Island */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    z-index: 1000;
    padding: 12px 30px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-nav.hidden {
    transform: translateX(-50%) translateY(-100px);
    opacity: 0;
    pointer-events: none;
}

.glass-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(112, 0, 255, 0.1) 0%,
            rgba(0, 195, 255, 0.1) 100%);
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.glass-nav:hover::before {
    opacity: 1;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.logo {
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

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

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.nav-links a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: #fff;
    background: rgba(112, 0, 255, 0.2);
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.4);
}

/* Active Indicator */
.nav-indicator {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

/* Hero Section */
.hero-section {
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Glass Card with Glow */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.glass-card>* {
    position: relative;
    z-index: 1;
}

.input-card {
    text-align: left;
    margin-top: 40px;
}

/* Enhanced Form Styling */
.form-header h3 {
    font-family: var(--font-display);
    margin-bottom: 25px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

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

/* Floating Labels */
.floating-group {
    position: relative;
    margin-bottom: 5px;
}

.input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: 56px;
    display: flex;
    align-items: center;
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: var(--secondary);
    box-shadow: 0 4px 20px rgba(0, 242, 255, 0.1);
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    transition: color 0.3s;
    font-size: 1.1rem;
}

.input-wrapper:focus-within i {
    color: var(--secondary);
}

.input-wrapper input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1rem;
    padding: 20px 16px 6px 45px;
    /* Top padding for label space */
    outline: none;
    font-family: var(--font-main);
}

.input-wrapper label {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label {
    top: 12px;
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 600;
}

/* Neon Genre Tags */
.genre-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.genre-chip {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.genre-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.genre-chip.active {
    background: rgba(112, 0, 255, 0.15);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
    text-shadow: 0 0 8px var(--primary);
    padding-right: 12px;
}

.genre-chip.active::before {
    content: '\f00c';
    /* FontAwesome check */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.8rem;
    margin-right: 4px;
}

/* Cosmic Button */
.cosmic-btn {
    width: 100%;
    padding: 16px;
    margin-top: 30px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cosmic-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.5s;
}

.cosmic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--primary-glow);
}

.cosmic-btn:hover::after {
    opacity: 1;
    transform: scale(1);
}

.section-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: block;
    font-weight: 500;
}

/* Buttons */
.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #ffb700 100%);
    color: #000;
    flex: 2;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-loader {
    display: none;
}

/* Results Section */
.results-section {
    padding: 40px 0 80px;
    animation: slideUp 0.5s ease-out;
}

.hidden {
    display: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--secondary);
    color: #000;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.result-card {
    grid-column: span 1;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.8), rgba(10, 10, 15, 0.9));
    border: 1px solid var(--secondary);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

.main-result {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.confidence-badge {
    background: var(--secondary);
    color: #000;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.prediction-status {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.metric-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
}

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-info .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.metric-info .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.chart-card {
    grid-column: span 3;
    height: 400px;
}

.chart-container {
    height: 320px;
    width: 100%;
    margin-top: 20px;
}

/* Model Info */
.model-section {
    padding-bottom: 80px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.info-item .label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-item .value {
    font-weight: 600;
    color: var(--secondary);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: var(--glass-border);
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

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

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

    .result-card,
    .metric-card,
    .chart-card {
        grid-column: span 1;
    }

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

/* Section Headers */
.section-header-center {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Timeline Section */
.journey-section {
    padding: 80px 0;
    position: relative;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 215, 0, 0.2);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    /* Progressive Enhancement: Visible by default */
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

.timeline-item.scroll-hidden {
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.clickable {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.clickable:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(10, 10, 15, 0.95);
    /* Darker background for readability */
    border: 1px solid var(--primary);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--primary);
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h4 {
    color: var(--secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.modal-section p {
    color: var(--text-main);
    line-height: 1.6;
    font-size: 0.95rem;
    padding-left: 28px;
    /* Align with icon */
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-dark);
    border: 3px solid var(--primary);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: transform 0.3s;
}

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

.timeline-item:hover::after {
    transform: scale(1.3);
    background-color: var(--primary);
}

.timeline-content {
    padding: 25px;
    position: relative;
    border-left: 3px solid var(--primary);
}

.timeline-item.right .timeline-content {
    border-left: none;
    border-right: 3px solid var(--secondary);
}

.timeline-item.right .timeline-item::after {
    border-color: var(--secondary);
}

.date {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content h3 {
    margin-bottom: 15px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-content p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 5px;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Team Section */
.team-section {
    padding: 80px 0 120px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.team-card {
    text-align: center;
    padding: 40px 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--secondary);
}

.member-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    font-family: var(--font-display);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.team-card .role {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 21px;
    }

    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 21px;
    }

    .timeline-item.right {
        left: 0%;
    }

    .timeline-content {
        border-left: 3px solid var(--primary);
        border-right: none;
    }

    .timeline-item.right .timeline-content {
        border-left: 3px solid var(--secondary);
        border-right: none;
    }

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