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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #ff6b6b;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-light: #666;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
}

/* ========================================
   NAVBAR / HEADER
======================================== */
.navbar {
    background-color: #372d23;
    /* background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); */
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: white;
    font-size: 1.8em;
    cursor: pointer;
}

.logo a {
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    transition: opacity 0.3s;
    padding: 8px 15px;
    border-radius: 5px;
}

.nav-link:hover {
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
    font-weight: bold;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.btn-nav {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-signup {
    background: white;
    color: var(--primary-color);
    font-weight: bold;
}

.btn-login {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-logout {
    background: var(--danger);
    color: white;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.user-info {
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.username-display {
    font-weight: bold;
    font-size: 1.1em;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    background-color: #7f885e;
    /* background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); */
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.brand-highlight {
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.5em;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 15px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ========================================
   FEATURES SECTION
======================================== */
.features {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.features h2 {
    font-size: 2.5em;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-card {
    background: rgb(255, 255, 255);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   STATS SECTION
======================================== */
.stats {
    background-color: rgb(156, 171, 152);
    /* background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); */
    padding: 60px 20px;
    color: rgb(48, 44, 44);
}

.stats-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3em;
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* ========================================
   CTA SECTION
======================================== */
.cta-section {
    padding: 80px 20px;
    text-align: center;
    background: var(--light-bg);
}

.cta-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.3em;
    color: var(--text-light);
    margin-bottom: 40px;
}

.btn-cta {
    padding: 18px 50px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ========================================
   AUTH PAGES (LOGIN/REGISTER)
======================================== */
.auth-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.auth-container {
    background: white;
    padding: 50px 40px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 450px;
    width: 100%;
}

.auth-container h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.auth-subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

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

.form-group small {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.9em;
}

.btn-submit {
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.error-message, .success-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ========================================
   FOOTER
======================================== */
/* .footer {
    background: var(--dark-bg);
    color: white;
    padding: 50px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 15px;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
} */

.footer {
    background: var(--dark-bg);
    color: #ffffff;
    padding: 60px 20px 25px;
}

/* MAIN FOOTER GRID */
.footer-container {
    max-width: 1200px;
    margin: 0 auto 40px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
}


/* FOOTER SECTIONS */
.footer-section {
    text-align: left;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

/* TEXT */
.footer-section p {
    color: #cfcfcf;
    line-height: 1.7;
    font-size: 14px;
}

/* LIST */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
    font-size: 14px;
}

/* LINKS */
.footer-section a {
    color: #cfcfcf;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* BOTTOM BAR */
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #9b9b9b;
}

/* 📱 RESPONSIVE FIX */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}



/* ========================================
   UTILITY CLASSES
======================================== */
.hidden {
    display: none !important;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2em;
    }
    
    .hero-subtitle {
        font-size: 1.2em;
    }
    
    .features h2, .cta-section h2 {
        font-size: 2em;
    }
}

/* ========================================
   SEARCH PAGE SPECIFIC STYLES
======================================== */
.search-page-wrapper {
    background: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    margin-bottom: 30px;
    position: relative;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

#movieSearch {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    outline: none;
}

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

#searchBtn {
    padding: 15px 40px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#searchBtn:hover {
    background: #ee5a52;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.suggestions {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 160px);
    max-width: 440px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-title {
    font-weight: 600;
    color: #333;
}

.suggestion-meta {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.movie-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.movie-info h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
}

.movie-details {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.movie-details span {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

.sentiment-analysis h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.verdict-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.verdict-badge {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 15px;
}

.verdict-card p {
    font-size: 1.1em;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    text-align: center;
    padding: 25px;
    border-radius: 15px;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.positive {
    background: #d4edda;
    border: 2px solid var(--success);
}

.stat-card.neutral {
    background: #fff3cd;
    border: 2px solid var(--warning);
}

.stat-card.negative {
    background: #f8d7da;
    border: 2px solid var(--danger);
}

.stat-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 5px;
}

.stat-count {
    font-size: 0.9em;
    color: #888;
}

.progress-section {
    margin-bottom: 30px;
}

.progress-item {
    margin-bottom: 15px;
}

.progress-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
}

.progress-fill.positive {
    background: var(--success);
}

.progress-fill.neutral {
    background: var(--warning);
}

.progress-fill.negative {
    background: var(--danger);
}

.total-reviews {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 1.2em;
}

.sample-reviews {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.review-section h4 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #333;
}

.review-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.positive-reviews .review-card {
    border-left-color: var(--success);
}

.negative-reviews .review-card {
    border-left-color: var(--danger);
}

.review-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.review-text {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}

.review-rating {
    margin-top: 8px;
    font-size: 0.9em;
    color: #888;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #f5c6cb;
}

/* Dark Mode */
/* Dark Mode */
body.dark-mode {
    background: #000;  /* Full black background */
    color: #fff;       /* White text for default */
}

/* Navbar */
.dark-mode .navbar {
    background: #111;  /* Dark navbar */
}

/* Hero Section */
.dark-mode .hero {
    background: #201818; /* Dark hero */
}

/* Feature cards, movie cards, auth forms, results, search history */
.dark-mode .feature-card, 
.dark-mode .movie-card, 
.dark-mode .auth-container,
.dark-mode .results,
.dark-mode .search-history-list
.dark-mode .stats-item{
    background: #111;
    color: #fff; /* Make text white */
}

/* Section headings */
.dark-mode h1, 
.dark-mode h2, 
.dark-mode h3, 
.dark-mode h4, 
.dark-mode h5, 
.dark-mode h6 {
    color: #fff; /* Ensures headings like "How FilmReviewer Works" are white */
}

/* Footer */
.dark-mode .footer {
    background: #201818;
    color: #fff;
}

/* Inputs and selects */
.dark-mode input, 
.dark-mode select, 
.dark-mode textarea {
    background: #222;
    color: #fff;
    border-color: #444;
}

/* Stats section */
body.dark-mode .stats {
    background: #201818;
}

body.dark-mode .stat-item h3,
body.dark-mode .stat-item p {
    color: #fff;
}

/* CTA section */
body.dark-mode .cta-section {
    background: #000;
}

body.dark-mode .cta-section h2,
body.dark-mode .cta-section p {
    color: #fff;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

