:root {
    --primary-red: #ff0000;
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-gold: #ffd700;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.8);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-right: auto;
}

.logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #ff6b6b 50%, var(--text-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.logo:hover .logo-img {
    filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.5));
    transform: scale(1.05);
}

/* Mobile Logo Sizing */
@media (max-width: 768px) {
    .logo-img {
        height: 32px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 28px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
}

.logo:hover {
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

.sign-in-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.sign-in-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-link:hover {
    color: var(--primary-red);
    transform: translateX(10px);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .sign-in-btn {
        order: -1;
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(255, 0, 0, 0.1) 0%, transparent 60%),
                linear-gradient(180deg, rgba(13, 13, 13, 0.7) 0%, rgba(18, 18, 18, 0.8) 100%);
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100" height="100" fill="%23000"/><circle cx="50" cy="50" r="1" fill="%23ff0000" opacity="0.1"/></svg>');
    background-size: 100px 100px;
    padding: 8rem 2rem 4rem;
    overflow: visible;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('kino.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    filter: grayscale(0%);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, rgba(13, 13, 13, 0.8));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 1s ease;
    overflow: visible;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary-red);
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, #ff6b6b 50%, var(--text-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 80px rgba(255, 0, 0, 0.5);
    line-height: 1.1;
    overflow: visible;
    padding: 0.2rem 0;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stats {
    display: flex;
    gap: 4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-gold) 0%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 2px;
}

/* Content Sections */
.content-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-title svg {
    color: var(--primary-red);
}

.view-all-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-red);
    transform: translateX(5px);
}

/* Movie Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    margin: -1.5rem;
    overflow: visible;
}

.movie-card {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.movie-card:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
    z-index: 10;
}

/* Touch-friendly hover on mobile */
@media (hover: none) and (pointer: coarse) {
    .movie-card:active {
        transform: scale(0.98);
    }
    
    .movie-card:hover {
        transform: none;
    }
}

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

.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.movie-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.movie-year {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.badge-4k {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--primary-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.loading-skeleton {
    aspect-ratio: 2/3;
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.05) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Footer */
.footer {
    background: rgba(10, 10, 10, 0.98);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

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

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: rgba(255, 255, 255, 0.08);
}

.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

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

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .navbar {
        padding: 1rem 0;
    }
    
    .nav-content {
        padding: 0 1rem;
        display: flex;
        align-items: center;
        position: relative;
    }
    
    .logo {
        font-size: 1.5rem;
        margin-right: 0;
        z-index: 2;
    }
    
    .sign-in-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
        position: absolute;
        left: 60%;
        transform: translateX(-50%);
        z-index: 1;
    }
    
    .mobile-menu-btn {
        margin-left: auto;
        z-index: 2;
    }
    
    .hero {
        padding: 6rem 1rem 2rem;
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .stats {
        gap: 2rem;
        flex-direction: row;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .content-section {
        padding: 2rem 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .view-all-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
        margin: -0.5rem;
    }
    
    .movie-card {
        border-radius: 8px;
    }
    
    .movie-card:hover {
        transform: scale(1.02) translateY(-5px);
    }
    
    .movie-title {
        font-size: 0.85rem;
    }
    
    .movie-year {
        font-size: 0.75rem;
    }
    
    .badge-4k {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-subtitle {
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .btn-submit {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .footer {
        padding: 2rem 1rem;
    }
    
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .footer-text {
        font-size: 0.85rem;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.75rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .hero-title {
        font-size: 4rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}

/* ==================== MOVIE/SHOW DETAILS MODAL ==================== */

.details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.details-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.details-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    margin: 2rem auto;
    animation: slideUp 0.4s ease;
}

.details-backdrop {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(to bottom, transparent 0%, rgba(26, 26, 26, 0.4) 70%, var(--bg-card) 100%);
    overflow: hidden;
}

.details-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.8;
}

.details-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.details-close:hover {
    background: var(--primary-red);
    transform: scale(1.1);
}

.details-body {
    padding: 2rem;
    margin-top: -120px;
    position: relative;
    z-index: 5;
}

.details-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.details-poster {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.details-poster img {
    width: 200px;
    height: 300px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-card);
}

.details-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.details-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.details-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 1.1rem;
    font-weight: 600;
}

.details-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.details-year,
.details-runtime,
.details-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.details-rating {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.badge-4k-large {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.details-genres {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.genre-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.trailer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    width: 200px;
}

.trailer-btn-mobile {
    display: none;
}

.trailer-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.trailer-btn svg {
    width: 20px;
    height: 20px;
}

.trailer-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.trailer-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.trailer-loading {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
}

.details-summary {
    margin-top: 1.5rem;
}

.details-summary h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.details-summary p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.details-stats {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.details-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.details-loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes loading {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .details-modal {
        padding: 1rem;
    }

    .details-content {
        margin: 0;
    }

    .details-backdrop {
        display: none;
    }

    .details-body {
        padding: 2rem 1.5rem;
        margin-top: 0;
    }

    .details-header {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .details-poster {
        align-items: center;
        width: 100%;
    }

    .details-poster img {
        width: 180px;
        height: 270px;
    }

    .trailer-btn-desktop {
        display: none;
    }

    .trailer-btn-mobile {
        display: flex;
        width: 100%;
        max-width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        margin: 0.75rem 0;
    }

    .trailer-btn svg {
        width: 18px;
        height: 18px;
    }

    .details-info {
        width: 100%;
    }

    .details-title {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }

    .details-meta {
        font-size: 0.85rem;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .details-meta > span {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .details-genres {
        margin-top: 0.75rem;
        justify-content: center;
    }

    .genre-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .details-summary {
        margin-top: 1rem;
        text-align: left;
    }

    .details-summary h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .details-summary p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .details-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}
/* Trailer Modal Styles */
.trailer-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.trailer-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.4s ease;
}

.trailer-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.trailer-modal-close:hover {
    background: var(--primary-red);
    transform: scale(1.1);
}

.trailer-modal-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.trailer-modal .trailer-video {
    width: 100%;
    height: 100%;
    border: none;
}

.trailer-modal .trailer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .trailer-modal-content {
        width: 95%;
        max-width: none;
    }

    .trailer-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
}

/* ==================== PLEX LOGIN BUTTON ==================== */

.modal-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.btn-plex-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #e5a00d;
    color: #000;
    border: none;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-plex-login:hover {
    background: #f5b820;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 160, 13, 0.4);
}

/* ==================== PLEX AUTH SPINNER ==================== */

.plex-auth-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: #e5a00d;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== DASHBOARD ==================== */

.dashboard-content {
    max-width: 550px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.dashboard-loading {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
}

.dashboard-loading p {
    margin-top: 1rem;
}

/* Status indicator */
.dash-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.dash-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-status.status-active {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}
.dash-status.status-active .dash-status-dot {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.dash-status.status-expired {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.dash-status.status-expired .dash-status-dot {
    background: #ef4444;
}

.dash-status.status-disabled {
    background: rgba(156, 163, 175, 0.1);
    border: 1px solid rgba(156, 163, 175, 0.3);
    color: #9ca3af;
}
.dash-status.status-disabled .dash-status-dot {
    background: #9ca3af;
}

/* Info cards */
.dash-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.dash-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.dash-card-icon {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.dash-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.dash-card-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Library list */
.dash-libraries {
    margin-bottom: 1rem;
}

.dash-libraries h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.dash-lib-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dash-lib-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dash-lib-item svg {
    color: #22c55e;
    flex-shrink: 0;
}

.dash-since {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1rem;
}

.dash-not-found {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
}

.dash-not-found svg {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.dash-not-found h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
    .dash-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
}
