/* Reset y Variables */
:root {
    --primary-color: #e50914;
    --secondary-color: #0f1419;
    --dark-color: #141414;
    --darker-color: #0a0a0a;
    --light-color: #ffffff;
    --gray-color: #757575;
    --light-gray: #f3f3f3;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --text-muted: #b3b3b3;
    --gradient-primary: linear-gradient(135deg, #e50914 0%, #b20710 100%);
    --gradient-dark: linear-gradient(135deg, #0f1419 0%, #141414 100%);
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 16px 64px rgba(0, 0, 0, 0.5);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tema claro */
[data-theme="light"] {
    --secondary-color: #ffffff;
    --dark-color: #f8f9fa;
    --darker-color: #e9ecef;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: rgba(0, 0, 0, 0.1);
    --gradient-dark: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

/* Partículas de fondo */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.3;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background: var(--darker-color);
    box-shadow: var(--shadow-medium);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--light-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Búsqueda */
.search-container {
    position: relative;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    color: var(--light-color);
    width: 300px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--darker-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-heavy);
}

.search-result-item {
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    gap: 1rem;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

.search-result-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.search-result-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Botón de tema */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Perfil */
.profile-menu {
    position: relative;
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.profile-img:hover {
    transform: scale(1.05);
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--darker-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-width: 200px;
    display: none;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-heavy);
}

.profile-menu:hover .dropdown {
    display: block;
}

.dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--light-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.dropdown a:last-child {
    border-bottom: none;
}

.dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Menú móvil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--light-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(20, 20, 20, 0.5) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botones */
.btn {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light-color);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--light-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    border: 1px solid var(--border-color);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    justify-content: center;
    padding: 0;
}

.btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Contenido Principal */
.main-content {
    background: var(--secondary-color);
    position: relative;
    z-index: 10;
    padding: 4rem 0;
}

.content-section {
    margin-bottom: 4rem;
    padding: 0 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Sliders */
.content-slider {
    position: relative;
    overflow: hidden;
}

.swiper-wrapper {
    align-items: stretch;
}

.content-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--dark-color);
    height: 300px;
    box-shadow: var(--shadow-light);
}

.content-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-heavy);
    z-index: 100;
}

.content-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.content-card:hover img {
    transform: scale(1.1);
}

.content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.content-card:hover .content-overlay {
    transform: translateY(0);
}

.content-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--light-color);
}

.content-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.content-rating {
    background: var(--primary-color);
    color: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.content-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Botones de navegación del slider */
.swiper-button-next,
.swiper-button-prev {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary-color);
    margin-top: -25px;
    transition: var(--transition);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px;
    color: var(--light-color);
    font-weight: 900;
}

/* Favoritos */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.empty-favorites {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-favorites i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.favorite-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--dark-color);
    transition: var(--transition);
    cursor: pointer;
}

.favorite-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.favorite-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.favorite-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.remove-favorite {
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
}

.remove-favorite:hover {
    background: var(--primary-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--dark-color);
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--light-color);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--primary-color);
}

.modal-video {
    position: relative;
    height: 400px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.modal-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 2rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-description {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--text-color);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: var(--transition);
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(229, 9, 20, 0.2);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b20710;
}
