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

:root {
    --primary-purple: #7c3aed;
    --primary-violet: #a855f7;
    --primary-blue: #3b82f6;
    --dark-bg: #000000;
    --darker-bg: #000000;
    --card-bg: rgba(0, 0, 0, 0.8);
    --card-border: rgba(124, 58, 237, 0.15);
    --text-primary: #e5e5e5;
    --text-secondary: #6b6b6b;
    --text-muted: #404040;
    --gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #3b82f6 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(168, 85, 247, 0.1) 50%, rgba(59, 130, 246, 0.1) 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Intro Screen */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease 2.5s forwards;
}

.intro-screen.hidden {
    display: none;
}

.intro-content {
    text-align: center;
    animation: logoZoom 0.8s ease-out;
    position: relative;
    z-index: 1;
}

.intro-logo {
    width: 300px;
    height: 300px;
    animation: pulse 2s ease-in-out infinite;
}

.intro-loader {
    width: 200px;
    height: 4px;
    background: rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    margin: 2rem auto 0;
    position: relative;
    overflow: hidden;
}

.intro-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes logoZoom {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes loading {
    0% {
        left: -50%;
    }
    100% {
        left: 100%;
    }
}

.page {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.page.active {
    display: block;
    position: relative;
    z-index: 10;
}

/* Login Page */
#login-page {
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

#login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    pointer-events: none;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.logo h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo-image {
    width: 250px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 20px rgba(124, 58, 237, 0.5));
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.login-box {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    width: 400px;
    max-width: 90vw;
}

.login-box h2 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

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

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

input::placeholder {
    color: var(--text-secondary);
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: rgba(124, 58, 237, 0.15);
    color: var(--text-primary);
    width: 100%;
    border: 1px solid rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-1px);
    border-color: rgba(124, 58, 237, 0.5);
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(124, 58, 237, 0.3);
}

.error-message {
    color: #ff6b6b;
    margin-top: 1rem;
    font-size: 0.9rem;
    display: none;
}

.error-message.active {
    display: block;
}

/* Search Page */
#search-page {
    background: var(--dark-bg);
}

.navbar {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.8));
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
}

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

.logo-small {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 10px rgba(124, 58, 237, 0.4));
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-section {
    padding: 10rem 2rem 4rem;
    background: #000000;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--card-border);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--dark-bg));
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.search-container {
    max-width: 800px;
    margin: -2rem auto 3rem;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.search-box {
    position: relative;
}

#search-input {
    width: 100%;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
    backdrop-filter: blur(20px);
}

#search-input:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    margin-top: 0.5rem;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(124, 58, 237, 0.08);
}

.search-result-item:hover {
    background: rgba(124, 58, 237, 0.1);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-poster {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.result-info {
    flex: 1;
}

.result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.result-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gradient);
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.selected-content {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.selected-content.hidden {
    display: none;
}

.content-details {
    display: flex;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
}

#content-poster {
    width: 300px;
    height: 450px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.content-info {
    flex: 1;
}

.content-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.content-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.content-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.success-message {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

.success-message.hidden {
    display: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 3rem;
    }

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

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

    #content-poster {
        width: 100%;
        height: auto;
    }

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

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* Scrollbar */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 10px;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.1);
}

.nav-tab.active {
    color: var(--text-primary);
    border-color: var(--card-border);
    background: rgba(124, 58, 237, 0.15);
}

/* Notification Button */
.notification-btn {
    position: relative;
    background: transparent;
    border: 1px solid var(--card-border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: rgba(124, 58, 237, 0.1);
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gradient);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: bold;
}

/* Tab Content */
.tab-content {
    display: none;
    min-height: calc(100vh - 80px);
}

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

/* Page Header */
.page-header {
    padding: 8rem 2rem 2rem;
    text-align: center;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Requests Grid */
.requests-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.request-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.request-card:hover {
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.request-poster {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.request-info {
    padding: 1.5rem;
}

.request-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.request-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.request-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-downloaded {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.status-available {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-rejected {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.request-upvotes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.upvote-btn {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upvote-btn:hover {
    background: rgba(124, 58, 237, 0.25);
}

.upvote-btn.voted {
    background: rgba(124, 58, 237, 0.3);
    border-color: rgba(124, 58, 237, 0.5);
}

/* Admin Controls */
.admin-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.status-select {
    flex: 1;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
}

.btn-update {
    padding: 0.5rem 1rem;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-update:hover {
    background: rgba(124, 58, 237, 0.25);
}

.btn-delete {
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-download {
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-download:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
}

/* Notifications Panel */
.notifications-panel {
    position: fixed;
    top: 80px;
    right: 2rem;
    width: 400px;
    max-height: 500px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: hidden;
}

.notifications-panel.hidden {
    display: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.panel-header h3 {
    font-size: 1.2rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: rgba(124, 58, 237, 0.05);
}

.notification-item.unread {
    background: rgba(124, 58, 237, 0.1);
}

.notification-message {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

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

.no-notifications {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Content Extra Details */
.content-extra {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(124, 58, 237, 0.05);
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.extra-item {
    margin-bottom: 0.75rem;
}

.extra-item:last-child {
    margin-bottom: 0;
}

.extra-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.extra-value {
    color: var(--text-primary);
}

.trailer-link {
    display: inline-block;
    color: var(--primary-violet);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.trailer-link:hover {
    background: rgba(124, 58, 237, 0.2);
}

/* Custom Modal/Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

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

.modal-box {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.3s ease;
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-primary {
    background: rgba(124, 58, 237, 0.2);
    color: var(--text-primary);
    border: 1px solid rgba(124, 58, 237, 0.4);
}

.modal-btn-primary:hover {
    background: rgba(124, 58, 237, 0.3);
    border-color: rgba(124, 58, 237, 0.6);
}

.modal-btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--text-primary);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.modal-btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

.modal-btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.modal-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(124, 58, 237, 0.3);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.admin-only.hidden {
    display: none !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-tabs {
        gap: 0.25rem;
    }

    .nav-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        display: none;
    }

    .requests-grid {
        grid-template-columns: 1fr;
    }

    .notifications-panel {
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .user-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }
}

/* Hide login page when app is active */
#app.active ~ #login-page {
    display: none !important;
    visibility: hidden;
}

#login-page:not(.active) {
    display: none !important;
}
