
/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e50914;
    --secondary-color: #221f1f;
    --accent-color: #f5f5f1;
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --background-dark: #141414;
    --background-light: #1f1f1f;
    --success-color: #46d369;
    --warning-color: #ffa500;
    --error-color: #e87c03;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-dark);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(229, 9, 20, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: var(--background-dark);
}

.btn-hero {
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
    color: white;
    padding: 16px 32px;
    font-size: 1.2rem;
    border-radius: 50px;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.4);
}

.btn-card {
    background: var(--background-light);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    width: 100%;
    margin-top: 1rem;
}

.btn-card:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--secondary-color) 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23e50914" stop-opacity="0.1"/><stop offset="100%" stop-color="%23e50914" stop-opacity="0"/></radialGradient></defs><circle cx="500" cy="500" r="400" fill="url(%23a)"/></svg>') center/cover;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--background-light);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

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

/* Forms */
.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--text-secondary);
    border-radius: var(--border-radius);
    background-color: var(--background-dark);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
}

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

.auth-switch a:hover {
    text-decoration: underline;
}

/* Discovery Section */
.discovery-section {
    padding: 6rem 0;
    background: var(--background-dark);
}

.discovery-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.discovery-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.discovery-card {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.discovery-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.2);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.discovery-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.discovery-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Genre Section */
.genre-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
}

.genre-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.genre-item {
    background: var(--background-dark);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.genre-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Personalized Section */
.personalized-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
}

.personalized-section h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.personalized-section p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.personalized-form {
    max-width: 500px;
    margin: 0 auto;
}

/* Movie Results */
.movie-results {
    margin-top: 3rem;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.movie-card {
    background: var(--background-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.movie-poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.movie-overview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-rating {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.movie-rating i {
    color: #ffd700;
    margin-right: 0.5rem;
}

/* Admin Section */
.admin-section {
    padding: 6rem 0;
    background: var(--background-dark);
}

.admin-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.stat-info p {
    color: var(--text-secondary);
}

.admin-actions {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.admin-actions h3 {
    margin-bottom: 2rem;
    color: var(--text-color);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--text-secondary);
}

.users-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.users-table td {
    color: var(--text-color);
}

.users-table tr:hover {
    background: var(--background-light);
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--text-secondary);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    margin-top: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--background-light);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .discovery-options {
        grid-template-columns: 1fr;
    }

    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

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

    .users-table {
        font-size: 0.9rem;
    }

    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .discovery-section h2 {
        font-size: 2rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.hidden { display: none; }
.visible { display: block; }


