/* ============================================================
   KoreanWave - Plataforma de Streaming
   Estilos principales - Diseño premium tipo Netflix/Disney+
   ============================================================ */

/* === VARIABLES CSS === */
:root {
    --primary: #e50914;
    --primary-hover: #f40612;
    --primary-dark: #b20710;
    --secondary: #6c757d;
    --accent: #fd7e14;
    --accent-purple: #6f42c1;
    --accent-pink: #e83e8c;
    
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-card-hover: #1f2b47;
    --bg-input: #2a2a4a;
    --bg-overlay: rgba(15, 15, 35, 0.85);
    
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #6c757d;
    --text-accent: #e50914;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    
    --gradient-primary: linear-gradient(135deg, #e50914, #b20710);
    --gradient-hero: linear-gradient(to top, rgba(8, 8, 25, 0.92) 0%, rgba(8, 8, 25, 0.4) 35%, rgba(8, 8, 25, 0.05) 70%, transparent 100%);
    --gradient-card: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --header-height: 130px;
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* === ESTILOS BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: var(--header-height);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

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

/* === HEADER === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(to bottom, rgba(15, 15, 35, 0.95) 0%, rgba(15, 15, 35, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: rgba(15, 15, 35, 0.98);
    border-bottom-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 40px;
    max-width: 1920px;
    margin: 0 auto;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo img {
    width: 180px;
    height: auto;
}

.logo-horizontal {
    width: 180px;
    height: auto;
}

.site-logo span {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

/* Navegación principal */
.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
    padding: 5px 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

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

.search-box input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 10px 20px 10px 45px;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 250px;
    transition: all var(--transition-normal);
    outline: none;
}

.search-box input:focus {
    width: 350px;
    border-color: var(--primary);
    background: rgba(229, 9, 20, 0.1);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.15);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* === HERO BANNER === */
.hero-banner {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 500px;
    max-height: 900px;
    overflow: hidden;
    margin-top: calc(-1 * var(--header-height));
}

.hero-banner .hero-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    filter: brightness(1.05) saturate(1.05);
    transition: transform 0.8s ease;
}

.hero-banner:hover .hero-background {
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-content {
    position: absolute;
    bottom: 80px;
    left: 60px;
    max-width: 600px;
    z-index: 2;
}

/* === CARRUSEL DE HERO BANNER === */
.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Flechas de navegación del carrusel */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.hero-banner:hover .hero-arrow {
    opacity: 1;
    pointer-events: auto;
}

.hero-arrow:hover {
    background: rgba(229, 9, 20, 0.85);
    transform: translateY(-50%) scale(1.1);
}

.hero-arrow-prev {
    left: 20px;
}

.hero-arrow-next {
    right: 20px;
}

/* Indicadores (dots) del carrusel */
.hero-dots {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot.active {
    background: var(--primary, #e50914);
    border-color: var(--primary, #e50914);
    transform: scale(1.2);
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.9);
}

.hero-dot.active:hover {
    background: var(--primary, #e50914);
    border-color: var(--primary, #e50914);
}

.hero-content .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(229, 9, 20, 0.9);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 0, 0, 0.3);
}

.hero-content .hero-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.hero-content .hero-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-content .hero-meta .rating {
    color: #ffc107;
    font-weight: 600;
}

.hero-content .hero-synopsis {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-play:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
    color: white;
}

.btn-play i {
    font-size: 1.3rem;
}

.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-secondary-action:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* === SECCIONES DE CONTENIDO === */
.content-section {
    padding: 30px 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 .highlight {
    color: var(--primary);
}

.section-header .section-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.section-header .section-link:hover {
    color: var(--text-primary);
}

/* === CARRUSELES === */
.content-carousel {
    position: relative;
    padding: 0 40px;
}

.carousel-wrapper {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0 20px;
}

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

.carousel-track {
    display: flex;
    gap: 15px;
    width: max-content;
}

/* Tarjetas de contenido */
.content-card {
    position: relative;
    min-width: 200px;
    width: 200px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--bg-card);
    flex-shrink: 0;
}

.content-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: var(--shadow-xl);
}

.content-card .card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-normal);
}

.content-card:hover .card-poster {
    transform: scale(1.1);
}

.content-card .card-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.content-card .card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    transform: translateY(10px);
    opacity: 0;
    transition: all var(--transition-normal);
}

.content-card:hover .card-info {
    transform: translateY(0);
    opacity: 1;
}

.content-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card .card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.content-card .card-meta .badge-type {
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

.content-card .card-meta .rating-star {
    color: #ffc107;
}

/* Tarjetas horizontales (para landing) */
.content-card-horizontal {
    display: flex;
    gap: 15px;
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.content-card-horizontal:hover {
    background: var(--bg-card-hover);
    transform: translateX(5px);
}

.content-card-horizontal .card-thumb {
    width: 160px;
    min-height: 90px;
    object-fit: cover;
    flex-shrink: 0;
}

.content-card-horizontal .card-body {
    padding: 10px 15px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* === PÁGINA DE DETALLE === */
.detail-page {
    margin-top: calc(-1 * var(--header-height));
}

.detail-banner {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
}

.detail-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15, 15, 35, 0.95) 0%, rgba(15, 15, 35, 0.7) 50%, rgba(15, 15, 35, 0.3) 100%);
}

.detail-content {
    position: relative;
    padding: 40px;
    margin-top: -200px;
    z-index: 2;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.detail-poster {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.detail-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.detail-info .original-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.detail-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-synopsis {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.detail-info-item label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.detail-info-item span {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* === REPRODUCTOR === */
.player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}

.player-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Reproductor HTML5 nativo – se adapta al tamaño real del video */
.player-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* Contenedor externo: sin overflow para que los controles siempre sean visibles */
.player-local-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}
/* El contenedor Video.js ocupa todo el ancho, altura la define JS según resolución real */
.player-local-wrapper .video-js {
    width: 100%;
    max-height: 85vh; /* fallback mientras cargan los metadatos */
}
/* El contenido del video se escala para no salirse del contenedor */
.player-local-wrapper video {
    display: block;
}

/* El contenedor Video.js en modo fluid se adapta a la resolución real del video */
.player-container .video-js {
    width: 100%;
    /* Con fluid:true, la altura la determina el padding-bottom dinámico de Video.js */
}

/* Reproductor YouTube */
.youtube-player {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 85vh;
}

/* === EPISODES LIST === */
.episodes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 10px;
}

.episode-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.episode-item:hover,
.episode-item.active {
    background: var(--bg-card-hover);
}

.episode-item.active {
    border-left: 3px solid var(--primary);
}

.episode-item .ep-thumb {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.episode-item .ep-info {
    flex: 1;
    min-width: 0;
}

.episode-item .ep-number {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

.episode-item .ep-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 3px 0;
}

.episode-item .ep-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === FOOTER === */
.site-footer {
    background: var(--bg-secondary);
    padding: 60px 40px 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .detail-grid {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 992px) {
    .header-inner {
        padding: 0 20px;
    }
    .main-nav {
        gap: 15px;
    }
    .main-nav a {
        font-size: 0.85rem;
    }
    .search-box input {
        width: 180px;
    }
    .search-box input:focus {
        width: 250px;
    }
    .hero-content {
        left: 30px;
        bottom: 50px;
        max-width: 500px;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .section-header {
        padding: 0 20px;
    }
    .content-carousel {
        padding: 0 20px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .detail-poster {
        max-width: 250px;
    }
    .detail-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    :root {
        --header-height: 70px;
    }
    .header-inner {
        padding: 0 15px;
    }
    .site-logo img {
        width: 140px;
        height: auto;
    }
    .logo-horizontal {
        width: 140px;
        height: auto;
    }
    .main-nav {
        display: none;
    }
    .main-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(15, 15, 35, 0.98);
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid var(--border-color);
    }
    .search-box input {
        width: 140px;
    }
    .search-box input:focus {
        width: 200px;
    }
    .hero-banner {
        height: 60vh;
        min-height: 350px;
    }
    .hero-content {
        left: 20px;
        bottom: 30px;
        max-width: 400px;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content .hero-synopsis {
        font-size: 0.9rem;
    }
    /* Ajustar flechas en tablets */
    .hero-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    .hero-arrow-prev { left: 10px; }
    .hero-arrow-next { right: 10px; }
    .hero-dots {
        bottom: 15px;
    }
    .hero-dot {
        width: 10px;
        height: 10px;
    }
    .content-card {
        min-width: 150px;
        width: 150px;
    }
    .detail-content {
        padding: 15px;
    }
    .detail-info h1 {
        font-size: 1.8rem;
    }
    .episodes-list {
        grid-template-columns: 1fr;
    }
    .episode-item .ep-thumb {
        width: 120px;
        height: 68px;
    }
    .site-footer {
        padding: 40px 20px 20px;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 50vh;
        min-height: 300px;
    }
    .hero-content h1 {
        font-size: 1.4rem;
    }
    .hero-content .hero-meta {
        font-size: 0.8rem;
    }
    /* Ocultar flechas en móviles, solo dots visibles */
    .hero-arrow {
        display: none;
    }
    .hero-dots {
        gap: 6px;
        bottom: 10px;
    }
    .hero-dot {
        width: 8px;
        height: 8px;
    }
    .btn-play {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .content-card {
        min-width: 130px;
        width: 130px;
    }
}

/* === UTILIDADES === */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-premium {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-new {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Menú hamburguesa móvil */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* ============================================================
   PWA - BANNER DE INSTALACIÓN (SECCIÓN GRANDE)
   ============================================================ */
.pwa-install-section {
    position: relative;
    overflow: hidden;
    padding: 60px 0;
    margin: 40px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.pwa-install-section.pwa-install-show {
    opacity: 1;
    transform: translateY(0);
}

/* Fondo con gradiente y formas decorativas */
.pwa-install-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0d0d2b 0%, #1a0a2e 40%, #0f0f23 100%);
    z-index: 0;
}

.pwa-install-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.pwa-install-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* Grid: contenido + visual */
.pwa-install-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

/* ============================================================
   COLUMNA IZQUIERDA - INFORMACIÓN
   ============================================================ */
.pwa-install-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Badge "App Móvil" */
.pwa-install-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent, #e50914);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(229, 9, 20, 0.3);
    width: fit-content;
}

.pwa-install-badge i {
    font-size: 0.9rem;
}

/* Título principal */
.pwa-install-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin: 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent, #e50914), #ff6b35, var(--accent, #e50914));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* Descripción */
.pwa-install-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
    max-width: 480px;
}

/* Lista de beneficios */
.pwa-install-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pwa-install-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.pwa-install-features li i {
    font-size: 1.1rem;
    color: var(--accent, #e50914);
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.pwa-install-features li strong {
    color: #fff;
}

/* Botones de acción */
.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-pwa-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent, #e50914), #ff3b30);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.btn-pwa-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(229, 9, 20, 0.45);
    color: #fff;
}

.btn-pwa-primary:active {
    transform: translateY(0);
}

.btn-pwa-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-pwa-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Compatibilidad */
.pwa-install-compat {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pwa-install-compat span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.pwa-install-compat i {
    font-size: 1rem;
}

/* ============================================================
   COLUMNA DERECHA - MOCKUP TELÉFONO
   ============================================================ */
.pwa-install-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* Mockup de teléfono */
.pwa-phone-mockup {
    position: relative;
    width: 240px;
    height: 420px;
    background: linear-gradient(180deg, #1a1a3e 0%, #0d0d1f 100%);
    border-radius: 36px;
    padding: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 2;
}

/* Pantalla del teléfono */
.pwa-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    /* splash.png como fondo inline */
}

/* Overlay semitransparente sobre el splash */
.pwa-phone-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 40%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
}

/* Notch del teléfono */
.pwa-phone-screen::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: #000;
    border-radius: 0 0 12px 12px;
    z-index: 3;
}

/* Logo dentro del teléfono */
.pwa-phone-logo {
    position: relative;
    z-index: 2;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.pwa-phone-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pwa-phone-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.pwa-phone-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* Badge "App instalada" dentro del teléfono */
.pwa-phone-badge {
    position: absolute;
    z-index: 2;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    color: #4ade80;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(74, 222, 128, 0.3);
    white-space: nowrap;
}

.pwa-phone-badge i {
    font-size: 0.55rem;
}

/* Círculos decorativos */
.pwa-circle {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
}

.pwa-circle-1 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.15) 0%, transparent 70%);
    top: 10%;
    right: -20%;
}

.pwa-circle-2 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    bottom: 10%;
    left: -10%;
}

/* ============================================================
   MODAL iOS - INSTRUCCIONES
   ============================================================ */
.pwa-ios-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pwa-ios-modal {
    background: linear-gradient(135deg, #1a1a3e 0%, #0d0d1f 100%);
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    padding: 40px 32px 32px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pwa-ios-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-ios-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pwa-ios-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.pwa-ios-modal-header i {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 12px;
}

.pwa-ios-modal-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.pwa-ios-modal-header p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Pasos iOS */
.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.pwa-ios-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.04);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pwa-ios-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--accent, #e50914);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.pwa-ios-step-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}

.pwa-ios-step-content i {
    font-size: 1.2rem;
    color: var(--accent, #e50914);
    flex-shrink: 0;
    margin-top: 2px;
}

.pwa-ios-step-content div {
    display: flex;
    flex-direction: column;
}

.pwa-ios-step-content strong {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 2px;
}

.pwa-ios-step-content span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.btn-pwa-ios-ok {
    width: 100%;
    justify-content: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .pwa-install-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .pwa-install-info {
        align-items: center;
    }

    .pwa-install-badge {
        align-self: center;
    }

    .pwa-install-desc {
        max-width: 100%;
    }

    .pwa-install-features {
        align-items: flex-start;
        text-align: left;
        max-width: 400px;
    }

    .pwa-install-actions {
        justify-content: center;
    }

    .pwa-install-compat {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .pwa-install-section {
        padding: 40px 0;
        margin: 20px 0;
    }

    .pwa-install-title {
        font-size: 1.6rem;
    }

    .pwa-install-desc {
        font-size: 0.9rem;
    }

    .pwa-install-features li {
        font-size: 0.85rem;
    }

    .pwa-phone-mockup {
        width: 180px;
        height: 320px;
        padding: 8px;
        border-radius: 28px;
    }

    .pwa-phone-screen {
        border-radius: 20px;
    }

    .pwa-phone-logo {
        width: 56px;
        height: 56px;
    }

    .pwa-phone-title {
        font-size: 0.85rem;
    }

    .pwa-phone-subtitle {
        font-size: 0.7rem;
    }

    .pwa-phone-badge {
        bottom: 16px;
        font-size: 0.6rem;
        padding: 3px 10px;
    }

    .pwa-install-visual {
        min-height: 300px;
    }

    .pwa-ios-modal {
        padding: 28px 20px 24px;
    }

    .pwa-ios-modal-header h3 {
        font-size: 1.2rem;
    }

    .btn-pwa-primary {
        padding: 10px 22px;
        font-size: 0.9rem;
    }

    .btn-pwa-secondary {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .pwa-install-title {
        font-size: 1.4rem;
    }

    .pwa-install-features {
        max-width: 100%;
    }

    .pwa-install-features li {
        font-size: 0.8rem;
    }

    .pwa-install-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-pwa-primary,
    .btn-pwa-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   ANUNCIOS PUBLICITARIOS
   ============================================================ */

/* Contenedor genérico de cada anuncio */
.ad-container {
    width: 100%;
    overflow: hidden;
    text-align: center;
    line-height: 0;
}

.ad-container iframe,
.ad-container img,
.ad-container video {
    max-width: 100%;
}

/* Anuncios en cabecera (entre navbar y contenido) */
.ad-container.ad-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 0;
    margin-bottom: 0;
}

/* Anuncios en footer (entre contenido y footer) */
.ad-container.ad-footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 0;
    margin-top: 16px;
}

/* Anuncios tipo sidebar (entre secciones de contenido) */
.ad-container.ad-sidebar {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
}

/* Anuncios de código externo (Blockchain-Ads) */
.ad-container.ad-code {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container.ad-code iframe {
    border: none;
}

/* Anuncios de tipo video */
.ad-container.ad-video video {
    border-radius: 8px;
}

/* Anuncios de tipo banner (imagen) */
.ad-container.ad-banner img {
    border-radius: 8px;
}

/* ============================================================
   SLOT DE PUBLICIDAD (contenedor con etiqueta)
   ============================================================ */
.ad-slot {
    position: relative;
    margin: 24px auto;
    padding: 16px 0;
    max-width: 100%;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ad-label {
    display: block;
    text-align: center;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 8px;
}

/* Responsive ads */
@media (max-width: 768px) {
    .ad-container.header {
        padding: 4px 0;
    }
    .ad-container.sidebar {
        margin-bottom: 12px;
    }
    .ad-slot {
        margin: 16px auto;
        padding: 12px 0;
    }
}
