/* -------------------------------------------------------------
   Film Portal - Global Stylesheet
   Design: Premium Sleek Dark Mode with Glassmorphism
------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #0b0b0f;
    --card-bg: rgba(20, 20, 28, 0.6);
    --card-border: rgba(255, 255, 255, 0.04);
    --card-hover-bg: rgba(30, 30, 42, 0.8);
    --primary-color: #e50914;
    --primary-hover: #ff1f2a;
    --text-color: #f3f3f6;
    --text-muted: #8e8e9f;
    --accent-glow: rgba(229, 9, 20, 0.4);
    --font-sans: 'Poppins', sans-serif;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(229, 9, 20, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(88, 101, 242, 0.05) 0%, transparent 40%);
}

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

/* -------------------------------------------------------------
   Header / Navbar
------------------------------------------------------------- */
header {
    background: rgba(11, 11, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary-color), #ff5252);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    font-weight: 300;
    color: var(--text-color);
    -webkit-text-fill-color: var(--text-color);
}

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

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

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

.user-badge {
    background: rgba(255, 255, 255, 0.07);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.btn-logout {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color var(--transition-speed);
}

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

/* -------------------------------------------------------------
   Forms & Authentication Page (Login / Register)
------------------------------------------------------------- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #ff5252);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #c20710);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), opacity var(--transition-speed);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.btn-primary:active {
    transform: translateY(1px);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

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

.alert {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(229, 9, 20, 0.15);
    border-color: rgba(229, 9, 20, 0.3);
    color: #ff4a5a;
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

/* -------------------------------------------------------------
   Dashboard Layout & Rows
------------------------------------------------------------- */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(11, 11, 15, 0.95) 100%), 
                url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?q=80&w=1925&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    border-radius: 20px;
    height: 400px;
    display: flex;
    align-items: flex-end;
    padding: 3rem;
    margin-bottom: 3rem;
    border: 1px solid var(--card-border);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-tag {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-desc {
    color: #d1d1db;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: black;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    transition: transform var(--transition-speed), background-color var(--transition-speed);
}

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

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-left: 0.8rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Movie List Row */
.movie-row {
    margin-bottom: 3.5rem;
}

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

/* Movie Card */
.movie-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(229, 9, 20, 0.1);
}

.movie-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #1c1c24;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.movie-thumbnail svg {
    color: rgba(255, 255, 255, 0.08);
    transition: transform var(--transition-speed);
}

.movie-card:hover .movie-thumbnail svg {
    transform: scale(1.1);
}

/* Video badge or label */
.movie-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.85);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Progress bar inside card */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
}

.movie-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.movie-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

.btn-play-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.btn-play-card:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Search Bar styling */
.search-container {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}

.search-input {
    flex-grow: 1;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color var(--transition-speed);
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* -------------------------------------------------------------
   Watch / Player Page
------------------------------------------------------------- */
.watch-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color var(--transition-speed);
}

.back-link:hover {
    color: var(--text-color);
}

.player-wrapper {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border: 1px solid var(--card-border);
    aspect-ratio: 16 / 9;
    margin-bottom: 2rem;
}

video {
    width: 100%;
    height: 100%;
    display: block;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.video-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.video-meta-page {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-watchlist-action {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.btn-watchlist-action:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-watchlist-action.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.video-description {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #e1e1e9;
}

/* -------------------------------------------------------------
   Footer
------------------------------------------------------------- */
footer {
    border-top: 1px solid var(--card-border);
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
}
