/* WeMovies - CSS Theme System */

:root {
    --bg-main: #0b0c10;
    --bg-card: rgba(22, 24, 35, 0.75);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --primary: #e50914;
    --primary-hover: #f40612;
    --accent: #6366f1;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-cinema: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 9, 20, 0.15);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Navbar */
.navbar {
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bg-card-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 1.5rem;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.nav-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.server-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.quality-badge {
    background: rgba(229, 9, 20, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(229, 9, 20, 0.4);
}

/* Main Layout */
.main-content {
    flex: 1;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Video Player Container */
.player-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-cinema);
    border: 1px solid var(--bg-card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
}

.plyr {
    width: 100%;
    height: 100%;
    --plyr-color-main: var(--primary);
    --plyr-video-background: #000;
    --plyr-control-radius: 6px;
    border-radius: var(--radius-lg);
}

/* Custom Plyr adjustments */
.plyr__control--overlaid {
    background: var(--primary) !important;
    padding: 1.25rem !important;
}

.plyr__control--overlaid:hover {
    background: var(--primary-hover) !important;
    transform: scale(1.08);
}

/* Resume Toast Banner */
.resume-toast {
    position: absolute;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.resume-toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -20px);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.toast-icon {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.toast-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-toast {
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

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

/* Movie Details Layout */
.movie-details-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.movie-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-card-border);
}

.title-group {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.movie-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.movie-year {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
}

.meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--bg-card-border);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pill-rating {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.pill-quality {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

.pill-audio {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}

.synopsis-card, .tools-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.synopsis-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.cast-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item {
    font-size: 0.88rem;
    display: flex;
    gap: 0.5rem;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--text-main);
}

/* Shortcuts Card */
.shortcuts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.shortcuts-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    font-family: monospace;
    font-size: 0.75rem;
    color: #fff;
}

/* Theater Mode Modifier */
body.theater-mode .main-content {
    max-width: 100%;
    padding: 0;
}

body.theater-mode .movie-details-container,
body.theater-mode .navbar,
body.theater-mode .footer {
    display: none;
}

body.theater-mode .player-wrapper {
    border-radius: 0;
    height: 100vh;
}

body.theater-mode .video-container {
    aspect-ratio: auto;
    height: 100vh;
}

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

/* Responsive Breakdown */
@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .movie-title {
        font-size: 1.75rem;
    }
    
    .nav-badges {
        display: none;
    }
}
