/* LavityHD - Red and Black UI Theme */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    color: #ffffff;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    z-index: 1000;
    transition: background 0.3s ease;
}

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

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

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #e50914;
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #e50914;
    background: rgba(229, 9, 20, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

#searchInput {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 25px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: #ffffff;
    font-size: 0.9rem;
    width: 300px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #e50914;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
    width: 350px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #e50914;
    pointer-events: none;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e50914, #b00710);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-avatar i {
    color: white;
    font-size: 1.2rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.user-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(229, 9, 20, 0.1);
    color: #e50914;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #e50914, #b00710);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #e50914;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(229, 9, 20, 0.2);
    border-color: #e50914;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ffffff;
}

.content-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

.content-row::-webkit-scrollbar {
    height: 8px;
}

.content-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.content-row::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 4px;
}

.content-card {
    min-width: 200px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #1a1a1a;
}

.content-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.content-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.content-card:hover .content-card-overlay {
    transform: translateY(0);
}

.content-card-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.content-card-meta {
    font-size: 0.8rem;
    color: #ccc;
}

/* Continue Watching Cards */
.continue-card {
    position: relative;
}

.continue-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #e50914;
    border-radius: 0 0 10px 10px;
}

.continue-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #e50914;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.continue-card:hover .continue-remove {
    opacity: 1;
}

/* Modals */
.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: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 15px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

.close:hover {
    color: #e50914;
}

/* Detail Modal */
.detail-modal {
    max-width: 1000px;
}

.detail-content {
    display: flex;
    gap: 2rem;
}

.detail-poster {
    flex-shrink: 0;
}

.detail-poster img {
    width: 300px;
    height: 450px;
    object-fit: cover;
    border-radius: 10px;
}

.detail-info {
    flex: 1;
}

.detail-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #e50914;
}

.detail-meta {
    color: #ccc;
    margin-bottom: 1rem;
}

.detail-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Series Selector */
.selector-group {
    margin: 1rem 0;
}

.selector-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.selector-group select {
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 0.5rem;
    font-size: 1rem;
    width: 200px;
}

/* Player Modal */
.player-modal {
    max-width: 95vw;
    max-height: 95vh;
    padding: 1rem;
}

.player-container {
    width: 100%;
    height: 80vh;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(229, 9, 20, 0.3);
}

.server-selector {
    display: flex;
    gap: 0.5rem;
}

.server-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.server-btn:hover,
.server-btn.active {
    background: #e50914;
    border-color: #e50914;
}

.player-wrapper {
    position: relative;
    width: 100%;
    height: calc(100% - 60px);
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#playerFrame iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e50914;
    font-size: 1.2rem;
}

/* Login Modal */
.login-modal {
    max-width: 400px;
    text-align: center;
}

.login-title {
    color: #e50914;
    margin-bottom: 2rem;
}

.login-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(229, 9, 20, 0.3);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #ccc;
    padding: 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #e50914;
    border-bottom: 2px solid #e50914;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: white;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #e50914;
}

.full-width {
    width: 100%;
}

/* Profile Modal */
.profile-modal {
    max-width: 500px;
}

.avatar-section {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-display {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e50914, #b00710);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

/* Admin Panel */
.admin-modal {
    max-width: 900px;
}

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

.stat-card {
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card h4 {
    color: #e50914;
    margin-bottom: 0.5rem;
}

.stat-card span {
    font-size: 2rem;
    font-weight: bold;
}

/* Search Results */
.search-results {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1500;
    padding: 2rem;
    overflow-y: auto;
}

.search-content {
    max-width: 1400px;
    margin: 0 auto;
}

#searchResultsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-content {
    text-align: center;
}

.loading-content .logo {
    font-size: 3rem;
    font-weight: bold;
    color: #e50914;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
}

.loading-spinner {
    font-size: 2rem;
    color: #e50914;
    margin-bottom: 1rem;
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 10px;
    padding: 1rem;
    z-index: 1500;
}

.install-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.install-content i {
    color: #e50914;
    font-size: 1.5rem;
}

.install-content span {
    flex: 1;
}

.btn-text {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

/* Page Styles */
.page {
    padding-top: 80px;
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #e50914;
}

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

    .nav-menu {
        gap: 1rem;
    }

    #searchInput {
        width: 200px;
    }

    #searchInput:focus {
        width: 250px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-section {
        padding: 1rem;
    }

    .content-card {
        min-width: 150px;
        height: 225px;
    }

    .detail-content {
        flex-direction: column;
    }

    .detail-poster img {
        width: 100%;
        max-width: 300px;
    }

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

    .player-modal {
        margin: 5% auto;
        max-width: 95vw;
        max-height: 90vh;
    }

    .server-selector {
        flex-wrap: wrap;
    }

    .server-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .nav-left {
        gap: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-menu {
        display: none;
    }

    #searchInput {
        width: 150px;
    }

    #searchInput:focus {
        width: 200px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .content-card {
        min-width: 120px;
        height: 180px;
    }

    .modal-content {
        margin: 5% auto;
        max-width: 95vw;
    }
}

/* Smooth scrolling and animations */
html {
    scroll-behavior: smooth;
}

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

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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