:root {
    --bg-dark: #050505;
    --card-bg: rgba(20, 20, 20, 0.6);
    --accent: #007aff;
    --accent-glow: rgba(0, 122, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a1a1a6;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Background elements */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 122, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 122, 0.03) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
}

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

.logo-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-glyph {
    height: 40px;
    width: auto;
    opacity: 1; /* Original visibility */
}


.logo {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo div {
    white-space: nowrap;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 12rem 0 6rem;
    text-align: center;
}

.badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    display: inline-block;
}

h1 {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #007aff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Escondemos los links secundarios en móvil por ahora */
    }
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

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

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: white;
}

.btn-outline:hover {
    background: var(--glass-bg);
}

/* --- ONBOARDING OVERLAY --- */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.onboarding-card {
    background: rgba(20, 20, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    max-width: 800px;
    width: 95%;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 122, 255, 0.05);
    overflow: hidden;
    text-align: center;
}

.onboarding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scan-line 3s infinite linear;
}

@keyframes scan-line {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.onboarding-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.onboarding-close:hover {
    color: var(--accent);
}

.onboarding-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.onboarding-step.active {
    display: block;
}

.onboarding-title {
    font-family: 'Unica One', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.onboarding-text {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.onboarding-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    display: block;
    color: var(--accent);
    filter: drop-shadow(0 0 15px var(--accent));
}

.onboarding-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 1rem 2.5rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.onboarding-btn:hover {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.4);
}

.onboarding-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.dot.active {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* Grid Section */
.grid-section {
    padding: 6rem 0;
}

.grid-section .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}



.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.glass h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.glass p {
    color: var(--text-secondary);
}

/* User Avatar */
.user-profile {
    display: inline-block;
    margin-left: 2rem;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.user-avatar:hover {
    background: rgba(0, 122, 255, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

.user-avatar svg {
    width: 20px;
    height: 20px;
}

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

/* Hero Platform Style */
.hero-streaming {
    min-height: 80vh;
    background-color: #0a0a0a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* Centrado horizontal */
    overflow: hidden;
    transition: background-image 1s ease-in-out;
    padding-top: 60px;
}

@media (max-width: 768px) {
    .hero-streaming {
        min-height: 100vh;
        align-items: center; /* Volvemos a centrar para que el contenido flote mejor */
        padding-top: 80px;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(77deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 85%),
                linear-gradient(0deg, rgba(5,5,5,1) 0%, rgba(5,5,5,0) 40%);
    z-index: 1;
}

/* Hero Navigation Arrows */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.1);
    color: white;
    border: none;
    font-size: 2.5rem;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    opacity: 0.3;
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.hero-nav-prev { left: 10px; }
.hero-nav-next { right: 10px; }

@media (max-width: 768px) {
    .hero-nav {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
        opacity: 0.3;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    margin: 0 auto;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    transition: opacity 0.5s ease;
    opacity: 0;
}

@media (max-width: 768px) {
    .hero-content {
        padding: 2rem 1.5rem;
        margin: 0 15px;
        text-align: center;
        width: calc(100% - 30px);
        box-sizing: border-box;
    }
}

.hero-type {
    display: flex;
    align-items: center;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    border-left: 3px solid var(--accent); /* Un toque de color sutil */
    padding-left: 10px;
}

.hero-type span {
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    max-width: 800px;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.6rem !important;
        margin-top: 1rem;
        letter-spacing: -1.5px;
        line-height: 1.1;
        display: block;
        width: 100%;
    }
    .hero-content p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 2rem;
    }
}

.tagline {
    font-size: 1.3rem;
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
}

.description {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 2rem;
    line-height: 1.4;
    font-weight: 400;
    max-width: 500px;
}

/* Netflix Style Buttons */
.btn-primary {
    background: white;
    color: black;
    border-radius: 4px;
    padding: 0.8rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: none;
}

.btn-primary:hover {
    background: rgba(255,255,255,0.7);
    transform: none;
}

.btn-glass {
    background: rgba(109, 109, 110, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.8rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-glass:hover {
    background: rgba(109, 109, 110, 0.4);
}

/* Rows and Cards */
.rows-container {
    position: relative;
    z-index: 5;
    padding-bottom: 5rem;
}

.row {
    margin-bottom: 3rem;
}

.row-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .hero-btns {
        flex-direction: column !important;
        width: 100%;
        gap: 0.8rem;
    }
    .btn {
        width: 100% !important;
        justify-content: center;
        padding: 1rem;
    }
}

.card-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1.5rem 15px; /* Espacio para el hover */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.card-carousel::-webkit-scrollbar {
    display: none;
}

/* Navegación de Carrusel */
.carousel-wrapper {
    position: relative;
    width: 100%;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 100%; /* Cubre todo el alto para mejor área de click */
    background: linear-gradient(to right, rgba(10, 10, 10, 0.8), transparent);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 300;
    font-family: monospace;
}

.carousel-wrapper:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: rgba(10, 10, 10, 0.9);
    color: var(--accent);
}

.carousel-nav.prev { 
    left: -20px; 
    background: linear-gradient(to right, rgba(10, 10, 10, 0.9), transparent);
}

.carousel-nav.next { 
    right: -20px; 
    background: linear-gradient(to left, rgba(10, 10, 10, 0.9), transparent);
}

@media (max-width: 768px) {
    .carousel-nav {
        display: none; /* En móvil usamos el scroll natural táctil */
    }
}

.card-literary {
    flex: 0 0 280px;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-literary:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
    border-color: var(--accent);
}

.card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-progress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.card-progress-bar {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.card-time-remaining {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-literary:hover img {
    transform: scale(1.05);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.card-literary:hover .card-img {
    opacity: 1;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-saga-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.card-saga-bar {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Progress bar in card */
.progress-bar-container {
    height: 3px;
    background: rgba(255,255,255,0.2);
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
}

/* Series Detail Overlay (The Netflix Modal) */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.detail-overlay.active {
    display: flex;
    opacity: 1;
}

.detail-card {
    background: #181818;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

.detail-header {
    height: 400px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.detail-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: white;
    font-size: 1.5rem;
    border: none;
}

.detail-body {
    padding: 3rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.episode-list {
    margin-top: 2rem;
}

.episode-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background 0.3s ease;
}

.episode-item:hover {
    background: rgba(255,255,255,0.05);
}

.ep-number {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-right: 1.5rem;
    width: 30px;
    text-align: center;
}

.ep-thumb {
    width: 120px;
    height: 70px;
    margin-right: 1.5rem;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #333;
}

.ep-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-content {
    flex-grow: 1;
}

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

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

.season-dropdown {
    width: 100%;
    background: #222;
    color: white;
    border: 1px solid #444;
    padding: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.detail-actions {
    margin: 0 0 1.5rem 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
}

.btn-buy {
    background: transparent !important;
    color: rgba(255,255,255,0.7) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    font-weight: 400 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-buy:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: transparent !important;
    transform: none;
    box-shadow: none;
}

.btn-buy .icon {
    font-size: 1rem;
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.meta-group h4 {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .hero-streaming {
        height: 70vh;
        margin-bottom: -100px;
    }
    
    
    .card-literary {
        flex: 0 0 200px;
        height: 120px;
    }
}


/* --- CYBER-FX ENGINE (Sutil) --- */

@keyframes glitch-subtle {
  0% { text-shadow: 1px 0 0 rgba(255,0,0,0.5), -1px 0 0 rgba(0,255,255,0.5); }
  25% { text-shadow: -1px 0 0 rgba(255,0,0,0.5), 1px 0 0 rgba(0,255,255,0.5); }
  50% { text-shadow: 1px 1px 0 rgba(255,0,0,0.5), -1px -1px 0 rgba(0,255,255,0.5); }
  75% { text-shadow: -1px -1px 0 rgba(255,0,0,0.5), 1px 1px 0 rgba(0,255,255,0.5); }
  100% { text-shadow: 1px 0 0 rgba(255,0,0,0.5), -1px 0 0 rgba(0,255,255,0.5); }
}

@keyframes scanner-sweep {
  0% { top: -100%; }
  100% { top: 200%; }
}

.scanner-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 122, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.2);
    z-index: 9999;
    pointer-events: none;
    animation: scanner-sweep 12s linear infinite;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.2);
    transform: translateY(-2px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover, .user-profile:hover, .help-profile:hover, .library-profile:hover, .notifications-profile:hover {
    animation: glitch-subtle 0.3s infinite;
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.2);
}

.user-avatar, .help-profile, .library-profile, .notifications-profile {
    position: relative;
    /* overflow: hidden; <- Eliminado para que no corte efectos externos si los hay */
}

/* Aplicar el efecto de escaneo a TODOS los modales (detail-card y onboarding-card) */
.detail-card, .onboarding-card {
    border-radius: 4px !important;
    position: relative;
    overflow-y: auto; 
    overflow-x: hidden; /* Evita que la línea de escaneo cree scroll horizontal */
}

.detail-card::before, .onboarding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scan-line 3s infinite linear;
    z-index: 10;
    pointer-events: none; /* Asegura que la línea no bloquee clics ni scroll */
}

.user-profile:hover .user-avatar, .help-profile:hover, .library-profile:hover, .notifications-profile:hover {
    border-color: var(--accent) !important;
    background: rgba(0, 122, 255, 0.05) !important;
}

/* Switch Estilo Terminal */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 3px;
    background-color: #666;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(0, 122, 255, 0.2);
    border-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.interference-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
}

.interference-overlay::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
    opacity: 0.1;
    animation: noise-anim 0.2s steps(2) infinite;
}

.interference-overlay.active {
    display: block;
    opacity: 1;
}


footer {
    padding: 3rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.3);
    margin-top: 4rem;
}

footer p {
    font-family: 'Unica One', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: #555;
    text-transform: uppercase;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}
