/* ========================================
   LOS 5 DEL ALBA - ESTILOS PRINCIPALES
   ======================================== */

/* Variables CSS */
:root {
    --primary-purple: #4A148C;
    --secondary-gold: #FFD700;
    --accent-purple: #7B1FA2;
    --dark-black: #000000;
    --light-white: #FFFFFF;
    --text-light: #E0E0E0;
    --text-dark: #333333;
    --gradient-purple: linear-gradient(135deg, #4A148C 0%, #7B1FA2 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 5px 20px rgba(255, 215, 0, 0.3);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y Base - Optimizado para rendimiento */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimizaciones de rendimiento */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Evitar reflow/repaint innecesarios */
img {
    max-width: 100%;
    height: auto;
    display: block;
    will-change: transform;
}

/* Optimizar animaciones */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--dark-black);
    overflow-x: hidden;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

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

/* ========================================
   NAVEGACIÓN
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: var(--shadow-dark);
}

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

.nav-logo h2 {
    color: var(--secondary-gold);
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-gold);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--secondary-gold);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--secondary-gold);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: 100%;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(74, 20, 140, 0.8) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(123, 31, 162, 0.8) 100%
    );
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.cta-button {
    background: var(--gradient-gold);
    color: var(--dark-black);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.cta-button i {
    transition: var(--transition-smooth);
}

.cta-button:hover i {
    transform: translateY(3px);
}

/* Partículas */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--secondary-gold);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
    opacity: 0.7;
}

/* ========================================
   SYNOPSIS SECTION
   ======================================== */

.synopsis {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--dark-black) 0%, #1a1a1a 100%);
}

.synopsis-content {
    text-align: center;
    margin-bottom: 4rem;
}

.synopsis-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.book-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    padding-top: 4rem; /* Espacio para los botones superiores */
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
}

.book-card.locked {
    cursor: not-allowed;
    opacity: 0.7;
}

.book-card.locked:hover {
    transform: none;
}

.book-cover {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.book-cover img.blurred {
    filter: blur(10px);
    transform: scale(1.1);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(74, 20, 140, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

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

.book-info {
    text-align: center;
    color: var(--text-light);
}

.book-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-gold);
}

.book-info h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.coming-soon-badge {
    background: var(--gradient-gold);
    color: var(--dark-black);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   CHARACTERS SECTION
   ======================================== */

.characters {
    padding: 6rem 0;
    background: var(--dark-black);
}

.spoiler-warning {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    border: 2px solid #FFD700;
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.3);
}

.warning-content i {
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 1rem;
}

.warning-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--light-white);
}

.warning-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.warning-button {
    background: var(--gradient-gold);
    color: var(--dark-black);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.warning-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.character-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 215, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
    border-color: var(--secondary-gold);
}

.character-image {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary-gold);
}

.character-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.character-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4A148C, #7B1FA2);
    border-radius: 50%;
    color: var(--secondary-gold);
    font-size: 0.8rem;
    text-align: center;
}

.character-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.character-placeholder span {
    font-weight: 600;
    text-transform: uppercase;
}

.video-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #333, #555);
    color: #fff;
    border-radius: 8px;
    border: 2px solid #ff6b6b;
    text-align: center;
}

.video-error i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #ff6b6b;
}

.video-error p {
    margin: 0;
    font-size: 0.9rem;
}

.video-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
}

.video-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    /* Permitir interacción con el video pero bloquear redirecciones */
}

/* Overlay de reproducción para evitar enlaces externos */
.video-embed--guarded {
    position: relative;
}
.video-embed--guarded iframe {
    pointer-events: none; /* bloquea clics dentro del iframe (no abre YouTube) */
}
.video-embed--guarded .video-play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.55));
    border: 0;
    cursor: pointer;
}
.video-embed--guarded .video-play-overlay::before {
    content: '';
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>') center / 50% no-repeat;
            mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>') center / 50% no-repeat;
}
.video-embed--guarded.is-playing .video-play-overlay {
    display: none;
}

/* Ajustes de tarjetas de videos de personajes */
.character-videos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.character-video-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* centra contenido en la tarjeta */
    width: 100%;
    text-align: center;
}
.character-video-item h5 {
    margin: 0 0 0.5rem 0;
}
.character-video-item .video-embed,
.character-video-item .video-player {
    width: 100%;
    max-width: 560px; /* limita el ancho en desktop para mejor centrado */
    aspect-ratio: 16 / 9;
    display: block;
    margin: 0 auto; /* centra el bloque */
}

/* Forzar centrado también en contenedor general si existe */
.character-videos,
.videos-gallery,
.character-videos-list {
    display: grid;
    justify-items: center;
}

/* Video dentro del panel de detalles del personaje */
.character-details .character-videos .video-embed,
.character-details .character-videos .video-player {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    margin: 0.5rem auto;
}

/* Estilos para imagen dentro de detalles del personaje */
.character-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem auto;
}
.character-image {
    max-width: 100%;
    width: 100%;
    max-width: 560px;
    border-radius: 12px;
    box-shadow: var(--shadow-gold, 0 6px 18px rgba(0,0,0,.3));
    cursor: pointer;
    transition: transform 0.2s ease;
}
.character-image:hover {
    transform: scale(1.02);
}

/* Galería de múltiples imágenes del personaje */
.character-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 0.5rem 0;
}
.character-image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.character-image-item .character-image {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

/* Modal de galería del libro */
.book-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-gallery-modal.show {
    opacity: 1;
}

.book-gallery-modal .modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid var(--secondary-gold);
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

.gallery-content {
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
}

.gallery-section {
    margin-bottom: 3rem;
}

.gallery-section h4 {
    color: var(--secondary-gold);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.videos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.video-item {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.video-item h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.video-item video {
    width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.character-videos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.character-video-item {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.character-video-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.character-video-item h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.character-video-item video {
    width: 100%;
    max-height: 250px;
    border-radius: 8px;
}

.images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.image-item {
    position: relative;
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: var(--transition-smooth);
}

.image-item:hover .image-overlay {
    transform: translateY(0);
}

.image-overlay h5 {
    color: var(--secondary-gold);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.image-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modal visor de imagen */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-viewer-modal .modal-content {
    background: transparent;
    border: none;
    max-width: 95vw;
    max-height: 95vh;
}

.image-viewer {
    text-align: center;
}

.image-viewer img {
    border-radius: 8px;
    box-shadow: var(--shadow-dark);
}

/* Estilos para la pestaña Multimedia del admin */
.multimedia-management {
    padding: 1rem;
}

.multimedia-section {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1.5rem;
}

.multimedia-section h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trailers-management,
.character-videos-management,
.images-management {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-trailer-item,
.character-video-item,
.character-image-item {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.book-trailer-item:hover,
.character-video-item:hover,
.character-image-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.book-info,
.character-info {
    flex: 1;
}

.book-info h6,
.character-info h6 {
    color: var(--secondary-gold);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.trailer-status,
.video-count,
.image-count {
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0.8;
}

.book-actions,
.character-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-manage {
    background: var(--secondary-gold);
    color: var(--dark-black);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-manage:hover {
    background: #ffed4e;
    transform: translateY(-1px);
}

.image-book-section {
    margin-bottom: 2rem;
}

.image-book-section h6 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.book-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Modales de gestión */
.trailer-management-modal,
.character-videos-management-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100002;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trailer-management-modal .modal-content,
.character-videos-management-modal .modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid var(--secondary-gold);
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

.trailer-management-content,
.character-videos-content {
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
}

.current-trailers,
.current-character-videos {
    margin-bottom: 2rem;
}

.trailers-list,
.character-videos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trailer-item-admin,
.character-video-item-admin {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trailer-preview,
.video-preview {
    width: 150px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.trailer-preview video,
.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trailer-info,
.video-info {
    flex: 1;
}

.trailer-info h5,
.video-info h5 {
    color: var(--secondary-gold);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.trailer-info p,
.video-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.trailer-actions,
.video-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.btn-edit {
    background: var(--primary-purple);
    color: white;
}

.btn-edit:hover {
    background: #7B1FA2;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.trailer-upload-section,
.character-video-upload-section {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1.5rem;
}

.trailer-info,
.character-video-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.trailer-name-input,
.video-name-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--secondary-gold);
    border-radius: 6px;
    background: var(--dark-black);
    color: var(--text-light);
    font-size: 1rem;
}

.trailer-name-input:focus,
.video-name-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
}

.btn-add {
    background: var(--secondary-gold);
    color: var(--dark-black);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add:hover {
    background: #ffed4e;
    transform: translateY(-1px);
}

/* Estilos para personaje seleccionado */
.character-card[data-character] {
    transition: all 0.3s ease;
}

.character-card[data-character]:has(.character-button.active),
.character-card.character-expanded {
    transform: scale(1.02);
    z-index: 10;
    position: relative;
    width: 100% !important;
    max-width: none !important;
    grid-column: 1 / -1;
}

.character-card[data-character]:has(.character-button.active) .character-details,
.character-card.character-expanded .character-details {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid var(--secondary-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem 0;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.character-card[data-character]:has(.character-button.active) .character-details::before,
.character-card.character-expanded .character-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gold), var(--secondary-gold), var(--primary-gold));
    animation: shimmer 2s infinite;
}

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

.character-card.character-expanded .character-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.character-card.character-expanded .character-info h3 {
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.character-card.character-expanded .character-info .character-subtitle {
    font-size: 1.4rem;
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.character-card.character-expanded .character-info .character-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
}

.character-card.character-expanded .character-details .character-videos-section {
    flex: 1;
    min-width: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--secondary-gold);
}

.character-card.character-expanded .character-details .character-videos-section h4 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    text-align: center;
    border-bottom: 2px solid var(--secondary-gold);
    padding-bottom: 0.5rem;
}

.character-card.character-expanded .character-details .character-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.character-card.character-expanded .character-details .character-video-item {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--secondary-gold);
    transition: all 0.3s ease;
}

.character-card.character-expanded .character-details .character-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.character-card.character-expanded .character-details .character-video-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.character-card.character-expanded .character-details .character-video-item h5 {
    padding: 0.8rem;
    color: var(--secondary-gold);
    font-size: 0.9rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
}

.character-button.active {
    background: var(--secondary-gold);
    color: var(--dark-black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* Estilos para los detalles del personaje expandido */
.character-card.character-expanded .character-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.character-card.character-expanded .character-details li {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.character-card.character-expanded .character-details li:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--secondary-gold);
    transform: translateY(-2px);
}

.character-card.character-expanded .character-details strong {
    color: var(--secondary-gold);
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.character-card.character-expanded .character-details h4 {
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--secondary-gold);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Estilos para la gestión de contenido */
.content-management {
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 12px;
    border: 2px solid var(--secondary-gold);
    margin: 1rem 0;
}

.content-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid var(--secondary-gold);
}

.content-section h4 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--secondary-gold);
    padding-bottom: 0.5rem;
}

/* Gestión de libros */
.books-content-management {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.book-content-item {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.book-content-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.book-content-item .book-info h5 {
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.book-content-item .content-status {
    color: var(--text-light);
    font-size: 0.9rem;
}

.book-content-item .book-actions {
    display: flex;
    gap: 0.5rem;
}

/* Gestión de personajes */
.characters-content-management {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.character-content-item {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.character-content-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.character-content-item .character-info h5 {
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.character-content-item .character-role {
    color: var(--text-light);
    font-size: 0.9rem;
}

.character-content-item .character-actions {
    display: flex;
    gap: 0.5rem;
}

/* Gestión de autor y trilogía */
.author-management,
.trilogy-management {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.author-management textarea,
.trilogy-management textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.author-management textarea:focus,
.trilogy-management textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Configuración general */
.config-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
}

.config-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary-gold);
}

/* Herramientas adicionales */
.tools-management {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.tool-item {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.tool-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tool-item .tool-info h5 {
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tool-item .tool-description {
    color: var(--text-light);
    font-size: 0.9rem;
}

.tool-item .tool-actions {
    display: flex;
    gap: 0.5rem;
}

/* Botones de gestión */
.btn-manage {
    background: linear-gradient(135deg, var(--secondary-gold), #ffd700);
    color: var(--dark-black);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-manage:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-save {
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
    color: var(--dark-black);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.book-content-modal .modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid var(--secondary-gold);
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

.book-content-tabs {
    display: flex;
    background: var(--primary-purple);
    border-bottom: 2px solid var(--secondary-gold);
}

.content-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.content-tab:hover {
    background: rgba(255, 215, 0, 0.1);
}

.content-tab.active {
    background: var(--secondary-gold);
    color: var(--dark-black);
}

.book-content-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.content-section {
    display: none;
}

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

.trailer-container {
    text-align: center;
}

.trailer-item {
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
}

.trailer-item h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.character-card-mini {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.character-card-mini:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.character-image-mini {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--secondary-gold);
}

.character-image-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-placeholder-mini {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4A148C, #7B1FA2);
    color: var(--secondary-gold);
    font-size: 1.5rem;
}

.character-info-mini h5 {
    color: var(--secondary-gold);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.character-info-mini p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.book-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.book-image-item {
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border: 1px solid var(--secondary-gold);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.book-image-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.book-image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4A148C, #7B1FA2);
    color: var(--secondary-gold);
    font-size: 2rem;
}

.image-info {
    padding: 1rem;
}

.image-info p {
    margin: 0.25rem 0;
    color: var(--text-light);
}

.image-info p:first-child {
    color: var(--secondary-gold);
    font-weight: 600;
}

.no-content {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 2rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border: 1px dashed var(--secondary-gold);
}

.character-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: var(--gradient-gold);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: -1;
}

.character-card:hover .character-glow {
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.character-info h3 {
    font-size: 1.8rem;
    color: var(--secondary-gold);
    margin-bottom: 0.5rem;
}

.character-title {
    font-size: 1.1rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
    font-weight: 500;
}

.character-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.character-details {
    text-align: left;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 3px solid var(--secondary-gold);
}

.character-stats p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.character-personality h4 {
    color: var(--secondary-gold);
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.character-personality ul {
    list-style: none;
    padding-left: 0;
}

.character-personality li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.character-personality li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--secondary-gold);
}

/* Videos dentro de detalles de personajes */
.character-videos {
    margin-top: 1rem;
}
.character-videos .video-player {
    width: 100%;
    max-height: 320px;
    background: #000;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.character-button {
    background: transparent;
    color: var(--secondary-gold);
    border: 2px solid var(--secondary-gold);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.character-button:hover {
    background: var(--secondary-gold);
    color: var(--dark-black);
    transform: translateY(-2px);
}

/* ========================================
   AUTHOR SECTION
   ======================================== */

.author {
    padding: 6rem 0;
    background: linear-gradient(180deg, #1a1a1a 0%, var(--dark-black) 100%);
}

.author-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.author-image {
    text-align: center;
}

.author-placeholder {
    width: 300px;
    height: 300px;
    background: var(--gradient-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 5px solid var(--secondary-gold);
    box-shadow: var(--shadow-gold);
}

.author-placeholder i {
    font-size: 5rem;
    color: var(--secondary-gold);
}

.author-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
}

.author-quote {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--secondary-gold);
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    border-left: 5px solid var(--secondary-gold);
    position: relative;
}

.author-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--secondary-gold);
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.3;
}

/* Contacto del Autor */
.author-contact {
    margin-top: 2.5rem;
    padding: 2rem;
    background: rgba(74, 20, 140, 0.1);
    border-radius: 15px;
    border: 1px solid var(--primary-purple);
    text-align: center;
}

.author-contact h4 {
    font-size: 1.5rem;
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.author-contact p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-purple);
    color: var(--light-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-gold);
    border: 2px solid var(--secondary-gold);
}

.contact-email:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    background: var(--gradient-gold);
    color: var(--dark-black);
}

.contact-email i {
    font-size: 1.2rem;
}

/* ========================================
   EMAIL SIGNUP SECTION
   ======================================== */

.email-signup {
    padding: 6rem 0;
    background: var(--gradient-purple);
    text-align: center;
}

.signup-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.email-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.form-group input::placeholder {
    color: #666;
}

.submit-button {
    background: var(--gradient-gold);
    color: var(--dark-black);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.privacy-text {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.8;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--dark-black);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
}

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

.footer-section h3,
.footer-section h4 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-section ul li a:hover {
    color: var(--secondary-gold);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-purple);
    color: var(--text-light);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: var(--gradient-gold);
    color: var(--dark-black);
    transform: translateY(-3px);
}

.social-link.coming-soon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    position: relative;
}

.social-link.coming-soon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    transform: none;
}

.social-link.coming-soon::after {
    content: 'Próximamente';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    color: var(--text-light);
    opacity: 0.7;
}

/* ========================================
   ADMIN PANEL
   ======================================== */

.admin-panel {
    position: fixed;
    top: 5%;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--secondary-gold);
    border-radius: 15px;
    padding: 0;
    z-index: 1001;
    backdrop-filter: blur(15px);
    width: 450px;
    height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.admin-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--gradient-purple);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--secondary-gold);
}

.admin-header h3 {
    color: var(--secondary-gold);
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-close {
    background: none;
    border: none;
    color: var(--secondary-gold);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.admin-close:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
}

.admin-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.admin-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-light);
    padding: 0.8rem 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border-bottom: 2px solid transparent;
}

.admin-tab:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--secondary-gold);
}

.admin-tab.active {
    background: rgba(255, 215, 0, 0.2);
    color: var(--secondary-gold);
    border-bottom-color: var(--secondary-gold);
}

.admin-tab-content {
    display: none;
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

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

.admin-tab-content h4 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 0.5rem;
}

/* Gestión de Libros */
.books-management {
    margin-bottom: 2rem;
}

.book-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    transition: var(--transition-smooth);
}

.book-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary-gold);
}

.book-info h5 {
    color: var(--text-light);
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
}

.book-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
}

.book-status.active {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

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

.btn-toggle {
    background: var(--gradient-purple);
    color: var(--text-light);
    border: none;
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.btn-toggle:hover:not(:disabled) {
    background: var(--gradient-gold);
    color: var(--dark-black);
    transform: scale(1.05);
}

.btn-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Gestión de Personajes */
.characters-management {
    margin-bottom: 2rem;
}

/* Sub-tabs para Personajes */
.character-sub-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.character-sub-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-light);
    padding: 0.8rem 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border-bottom: 2px solid transparent;
}

.character-sub-tab:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--secondary-gold);
}

.character-sub-tab.active {
    background: rgba(255, 215, 0, 0.2);
    color: var(--secondary-gold);
    border-bottom-color: var(--secondary-gold);
}

.character-sub-content {
    display: none;
}

.character-sub-content.active {
    display: block;
}

.character-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    transition: var(--transition-smooth);
}

.character-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary-gold);
}

.character-info h5 {
    color: var(--secondary-gold);
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
}

.character-info p {
    color: var(--text-light);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.character-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.book-badge {
    font-size: 0.7rem;
    color: var(--secondary-gold);
    background: rgba(255, 215, 0, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    font-weight: 500;
}

.image-count {
    font-size: 0.8rem;
    color: var(--accent-purple);
    background: rgba(123, 31, 162, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(123, 31, 162, 0.3);
}

.character-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-images {
    background: var(--gradient-purple);
    color: var(--text-light);
    border: none;
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit:hover, .btn-images:hover {
    background: var(--gradient-gold);
    color: var(--dark-black);
    transform: scale(1.05);
}

.btn-images {
    background: var(--gradient-gold);
    color: var(--dark-black);
}

.btn-images:hover {
    background: var(--gradient-purple);
    color: var(--text-light);
}

/* Gestión de Contenido */
.content-management {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.content-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.content-section h5 {
    color: var(--secondary-gold);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.content-section textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 0.8rem;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.content-section textarea:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.config-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.config-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
}

.config-options input[type="checkbox"] {
    accent-color: var(--secondary-gold);
}

/* Botones */
.btn-add, .btn-save {
    background: var(--gradient-gold);
    color: var(--dark-black);
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-add:hover, .btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 0.8rem;
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: inherit;
    width: 100%;
    margin-bottom: 0.5rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #1a1a1a;
    color: white;
}

.add-book-section, .add-character-section {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.add-book-section h5, .add-character-section h5 {
    color: var(--secondary-gold);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

/* ========================================
   MODAL DE GESTIÓN DE IMÁGENES
   ======================================== */

.image-management-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.image-modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--secondary-gold);
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.image-modal-header {
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-purple));
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.image-modal-header h3 {
    margin: 0;
    color: var(--secondary-gold);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.image-info {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.image-info h5 {
    color: var(--secondary-gold);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-info p {
    margin: 0.3rem 0;
    color: var(--text-light);
    opacity: 0.9;
}

.book-selector {
    margin-bottom: 1.5rem;
}

.book-selector label {
    display: block;
    color: var(--secondary-gold);
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.book-selector select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.image-upload-section {
    background: rgba(123, 31, 162, 0.1);
    border: 1px solid rgba(123, 31, 162, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.image-upload-section h4 {
    color: var(--accent-purple);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--primary-purple));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.file-input-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 31, 162, 0.4);
}

.upload-info {
    color: var(--text-light);
    opacity: 0.7;
    margin: 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.image-preview-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.image-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.image-name {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-small:not(.btn-delete) {
    background: var(--secondary-gold);
    color: var(--dark-black);
}

.btn-small.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-small:hover {
    transform: scale(1.1);
}

.upload-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    color: var(--secondary-gold);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    opacity: 0.7;
}

.loading-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-gold);
}

/* Vista previa de subida */
.image-preview-upload {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.image-preview-upload h5 {
    color: var(--secondary-gold);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-container img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--secondary-gold);
}

.preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.preview-info p {
    margin: 0.3rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-save {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-save:hover, .btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-cancel {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* ========================================
   MODAL DE TRAILER DE LIBRO / VIDEO
   ======================================== */
.book-trailer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.book-trailer-modal .modal-content {
    background: var(--dark-black);
    border: 2px solid var(--secondary-gold);
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.trailer-preview {
    margin-top: 1rem;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-player {
    width: 100%;
    max-height: 360px;
    background: #000;
    border-radius: 8px;
}

/* Placeholder para imágenes no disponibles */
.no-images-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* ========================================
   SECCIÓN DE NOTICIAS
   ======================================== */

.news-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--dark-black) 0%, #1a0a2e 100%);
}

.news-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-post {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.news-post:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-gold);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1);
}

.news-post.featured {
    border: 2px solid var(--secondary-gold);
    background: rgba(255, 215, 0, 0.1);
}

.news-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.news-post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--light-white);
    margin: 0;
    line-height: 1.3;
}

.news-post-date {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.8;
}

.news-post-category {
    display: inline-block;
    background: var(--gradient-purple);
    color: var(--light-white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.news-post-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.news-post-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.news-post-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.btn-read-more {
    background: var(--gradient-gold);
    color: var(--dark-black);
    font-weight: 600;
}

.btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* ========================================
   ADMIN - GESTIÓN DE NOTICIAS
   ======================================== */

.news-management {
    padding: 1rem 0;
}

.news-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-item-admin {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-item-info h5 {
    color: var(--light-white);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.news-item-info p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.news-item-actions {
    display: flex;
    gap: 0.5rem;
}

.news-item-actions button {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-edit {
    background: var(--gradient-blue);
    color: white;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-edit:hover, .btn-delete:hover {
    transform: translateY(-2px);
}

/* Modal de noticias */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.news-modal .modal-content {
    background: var(--dark-black);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--secondary-gold);
}

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

.news-modal label {
    display: block;
    color: var(--light-white);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.news-modal input,
.news-modal textarea,
.news-modal select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light-white);
    font-size: 1rem;
}

.news-modal input:focus,
.news-modal textarea:focus,
.news-modal select:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.news-modal textarea {
    resize: vertical;
    min-height: 100px;
}

/* Responsive para noticias */
@media (max-width: 768px) {
    .news-posts {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-post {
        padding: 1rem;
    }
    
    .news-post-title {
        font-size: 1.1rem;
    }
    
    .news-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .news-item-admin {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .news-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.placeholder-image i {
    font-size: 3rem;
    color: var(--text-light);
    opacity: 0.3;
}

.placeholder-image span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-light);
    opacity: 0.6;
}

/* Pasos de procesamiento */
.processing-steps {
    text-align: left;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.8;
}

.processing-steps span {
    display: block;
    margin: 0.3rem 0;
}

.processing-steps .current-step {
    color: var(--secondary-gold);
    font-weight: 500;
}

/* Placeholder de error para imágenes */
.image-error-placeholder {
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    border: 2px dashed rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    color: #dc3545;
    text-align: center;
    padding: 1rem;
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.error-text span {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.error-text small {
    font-size: 0.7rem;
    opacity: 0.8;
    word-break: break-all;
}

/* Contenedor de imagen con badge principal */
.image-container {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
}

.primary-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, var(--secondary-gold), #ffed4e);
    color: var(--dark-black);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.btn-primary {
    background: var(--secondary-gold) !important;
    color: var(--dark-black) !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Sección de imágenes ocultas */
.hidden-images-section {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.hidden-images-section h5 {
    color: #dc3545;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hidden-images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.hidden-image-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.hidden-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.2);
}

.hidden-image-container {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.hidden-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
}

.hidden-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.hidden-overlay i {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.hidden-image-name {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
    opacity: 0.8;
}

.hidden-image-actions {
    display: flex;
    justify-content: center;
}

.btn-restore {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-restore:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Modal de Edición */
.character-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--dark-black);
    border: 2px solid var(--secondary-gold);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
    background: var(--gradient-purple);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--secondary-gold);
}

.modal-header h3 {
    color: var(--secondary-gold);
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--secondary-gold);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

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

.modal-body label {
    display: block;
    color: var(--secondary-gold);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modal-body input,
.modal-body textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 0.8rem;
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: inherit;
}

.modal-body input:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.modal-body textarea {
    min-height: 80px;
    resize: vertical;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-cancel {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.btn-cancel:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--secondary-gold);
    color: var(--secondary-gold);
}

/* Modal de Gestión de Imágenes */
.image-management-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.image-modal-content {
    background: var(--dark-black);
    border: 2px solid var(--secondary-gold);
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.image-modal-header {
    background: var(--gradient-purple);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--secondary-gold);
}

.image-modal-header h3 {
    color: var(--secondary-gold);
    margin: 0;
    font-size: 1.2rem;
}

.image-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

.image-upload-section {
    background: rgba(255, 215, 0, 0.1);
    border: 2px dashed rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.image-upload-section h4 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-button {
    background: var(--gradient-gold);
    color: var(--dark-black);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-input-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.image-preview-item .image-name {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.image-preview-item .image-actions {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
}

.image-preview-item .btn-small {
    background: var(--gradient-purple);
    color: var(--text-light);
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: var(--transition-smooth);
}

.image-preview-item .btn-small:hover {
    background: var(--gradient-gold);
    color: var(--dark-black);
}

.image-preview-item .btn-delete {
    background: rgba(244, 67, 54, 0.8);
    color: white;
}

.image-preview-item .btn-delete:hover {
    background: #f44336;
}

.book-selector {
    margin-bottom: 1.5rem;
}

.book-selector label {
    display: block;
    color: var(--secondary-gold);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.book-selector select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 0.8rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.book-selector select:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.image-info {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.image-info h5 {
    color: var(--secondary-gold);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.image-info p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.admin-access {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient-gold);
    color: var(--dark-black);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 1000;
    box-shadow: var(--shadow-gold);
}

.admin-access:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

/* Botones de acción del panel de administración */
.admin-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    margin-top: auto;
}

.btn-save-admin {
    flex: 1;
    background: var(--gradient-gold);
    color: var(--dark-black);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-save-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-cancel-admin {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-cancel-admin:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-gold);
    color: var(--secondary-gold);
    transform: translateY(-2px);
}

/* Estilos para edición de nombres de imágenes */
.image-name-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 4px;
    color: var(--text-light);
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    width: 100%;
    transition: var(--transition-smooth);
}

.image-name-input:focus {
    outline: none;
    border-color: var(--secondary-gold);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.image-name-input:hover {
    border-color: rgba(255, 215, 0, 0.4);
}

.btn-rename {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.btn-rename:hover {
    background: rgba(255, 193, 7, 0.3);
    color: #FFD700;
    border-color: #FFC107;
}

/* ========================================
   CORRECCIÓN DE IMÁGENES - EVITAR PLACEHOLDERS
   ======================================== */

/* Forzar carga inmediata de imágenes */
img {
    loading: eager !important;
    display: block !important;
}

/* Contenedor de imágenes de personajes */
.image-preview-item img {
    width: 100% !important;
    height: auto !important;
    max-width: 200px !important;
    max-height: 200px !important;
    object-fit: cover !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Evitar placeholders de lazy loading */
.image-container img {
    background: none !important;
    background-image: none !important;
}

/* Forzar visibilidad de imágenes */
.image-preview-container .image-preview-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ========================================
   SISTEMA DE NOTIFICACIONES DE ERROR
   ======================================== */

.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.3);
    animation: slideInRight 0.3s ease-out;
}

.error-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.5rem;
}

.error-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.error-content span {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.error-content button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.error-content button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   ICONO PERSONALIZADO DE WATTPAD
   ======================================== */

.social-link .fa-wattpad,
.social-link .fa-book-open {
    position: relative;
}

.social-link .fa-book-open::after {
    content: 'W';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 0.8em;
    color: white;
    z-index: 1;
}

/* ========================================
   BOTONES DE LIBROS (WATTPAD Y AMAZON)
   ======================================== */

.book-buttons {
    display: flex !important;
    flex-direction: row;
    gap: 0.5rem;
    margin: 0.5rem;
    padding: 0.5rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px 15px 0 0;
    justify-content: center;
    flex-wrap: wrap;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-wattpad, .btn-amazon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    min-height: 36px;
    flex: 1;
    min-width: 120px;
    max-width: 140px;
}

.btn-wattpad {
    background: linear-gradient(135deg, #00B4DB, #0083B0);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 180, 219, 0.3);
}

.btn-wattpad:hover {
    background: linear-gradient(135deg, #0083B0, #006B8F);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 219, 0.4);
}

.btn-amazon {
    background: linear-gradient(135deg, #FF9500, #FF6B00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.btn-amazon:hover {
    background: linear-gradient(135deg, #FF6B00, #E55A00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.btn-amazon.disabled {
    background: linear-gradient(135deg, #666, #555);
    color: #ccc;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-amazon.disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Botones de administración */
.btn-wattpad-admin, .btn-amazon-admin {
    background: var(--secondary-gold);
    color: var(--text-dark);
    border: 2px solid var(--secondary-gold);
    transition: var(--transition-smooth);
}

.btn-wattpad-admin:hover, .btn-amazon-admin:hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    transform: scale(1.05);
}

.btn-wattpad-admin.active, .btn-amazon-admin.active {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* Responsive para botones de libros */
@media (max-width: 768px) {
    .book-buttons {
        flex-direction: column;
        gap: 0.3rem;
        margin: 0.3rem;
        padding: 0.3rem;
    }
    
    .btn-wattpad, .btn-amazon {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        min-height: 32px;
        min-width: 100px;
        max-width: 120px;
    }
    
    .btn-wattpad-admin, .btn-amazon-admin {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .book-card {
        padding-top: 3.5rem; /* Menos espacio en móvil */
    }
}

/* ========================================
   OPTIMIZACIONES MÓVIL
   ======================================== */

@media (max-width: 768px) {
    /* Reducir animaciones para mejor rendimiento */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Optimizar renderizado de imágenes */
    img {
        image-rendering: optimizeSpeed;
        image-rendering: -moz-crisp-edges;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        will-change: auto;
    }
    
    /* Reducir efectos visuales costosos */
    .character-card, .book-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: none !important;
    }
    
    .admin-panel {
        backdrop-filter: blur(5px) !important;
    }
    
    /* Simplificar gradientes */
    .admin-header {
        background: var(--primary-purple) !important;
    }
    
    /* Optimizar scroll */
    * {
        scroll-behavior: auto !important;
    }
    
    /* Reducir transformaciones 3D */
    .character-card:hover {
        transform: translateY(-2px) !important;
    }
    
    /* Optimizar contenedores de imágenes */
    .image-preview-item {
        contain: layout style paint;
    }
    
    /* Reducir efectos de hover en móvil */
    .btn-small:hover {
        transform: none !important;
    }
    
    /* Optimizar modales */
    .modal-content {
        will-change: auto;
    }
}

/* Optimizaciones para dispositivos de baja potencia */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* ========================================
   OPTIMIZACIÓN MÓVIL PARA PERSONAJES
   ======================================== */

/* Optimización específica para tarjetas de personajes en móviles */
@media (max-width: 768px) {
    .character-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .character-image {
        width: 150px;
        height: 150px;
        margin: 0 auto 1rem;
    }
    
    .character-portrait {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .character-info h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .character-subtitle {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .character-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    /* Optimización para personaje expandido en móviles */
    .character-card[data-character]:has(.character-button.active) .character-details,
    .character-card.character-expanded .character-details {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
        margin: 0.5rem 0;
    }
    
    .character-card.character-expanded .character-info {
        min-width: auto;
        width: 100%;
    }
    
    .character-card.character-expanded .character-info h3 {
        font-size: 2rem;
        text-align: center;
    }
    
    .character-card.character-expanded .character-info .character-subtitle {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .character-card.character-expanded .character-info .character-description {
        font-size: 1rem;
        text-align: center;
    }
    
    .character-card.character-expanded .character-details .character-videos-section {
        min-width: auto;
        width: 100%;
    }
    
    .character-card.character-expanded .character-details .character-videos-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .character-card.character-expanded .character-details .character-video-item video {
        height: 150px;
    }
    
    .character-card.character-expanded .character-details ul {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .character-card.character-expanded .character-details li {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .character-card.character-expanded .character-details strong {
        font-size: 1rem;
    }
    
    .character-card.character-expanded .character-details h4 {
        font-size: 1.3rem;
    }
}

/* Optimización para móviles muy pequeños */
@media (max-width: 480px) {
    .character-card {
        padding: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .character-image {
        width: 120px;
        height: 120px;
    }
    
    .character-info h3 {
        font-size: 1.3rem;
    }
    
    .character-subtitle {
        font-size: 0.9rem;
    }
    
    .character-description {
        font-size: 0.8rem;
    }
    
    .character-card.character-expanded .character-info h3 {
        font-size: 1.8rem;
    }
    
    .character-card.character-expanded .character-info .character-subtitle {
        font-size: 1.1rem;
    }
    
    .character-card.character-expanded .character-info .character-description {
        font-size: 0.9rem;
    }
    
    .character-card.character-expanded .character-details {
        padding: 1rem;
    }
    
    .character-card.character-expanded .character-details .character-video-item video {
        height: 120px;
    }
    
    .character-card.character-expanded .character-details li {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .character-card.character-expanded .character-details strong {
        font-size: 0.9rem;
    }
    
    .character-card.character-expanded .character-details h4 {
        font-size: 1.2rem;
    }
}

/* Mejoras adicionales para imágenes de personajes en móviles */
@media (max-width: 768px) {
    .character-portrait {
        border: 3px solid var(--secondary-gold);
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
        transition: all 0.3s ease;
    }
    
    .character-portrait:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    }
    
    /* Mejorar contraste y legibilidad en móviles */
    .character-info h3 {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        font-weight: 700;
    }
    
    .character-subtitle {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
        font-weight: 600;
    }
    
    .character-description {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        line-height: 1.6;
    }
    
    /* Optimizar botones para móviles */
    .character-button {
        min-height: 44px;
        min-width: 44px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .character-button:active {
        transform: scale(0.95);
    }
    
    /* Mejorar grid de personajes en móviles */
    .characters-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 1rem;
    }
    
    /* Optimizar tarjetas expandidas en móviles */
    .character-card.character-expanded {
        margin: 0.5rem;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    
    .character-card.character-expanded .character-details {
        background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
        border: 2px solid var(--secondary-gold);
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
}

/* Optimización para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .character-card {
        padding: 1.8rem;
    }
    
    .character-image {
        width: 180px;
        height: 180px;
    }
    
    .character-card.character-expanded .character-details {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .character-card.character-expanded .character-info {
        min-width: 250px;
    }
    
    .character-card.character-expanded .character-details .character-videos-section {
        min-width: 250px;
    }
    
    .character-card.character-expanded .character-details .character-videos-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Mejoras generales para móviles */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    max-width: 100vw;
}

/* Forzar que no haya desbordamiento horizontal */
html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* Estilos específicos para móviles - más agresivos */
@media (max-width: 768px) {
    * {
        max-width: 100vw !important;
    }
    
    .hero, .hero-background, .hero-content {
        max-width: 100vw !important;
        width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* Hero section responsive */
.hero {
    min-height: 100vh;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

.hero-content {
    max-width: 100%;
    width: 100%;
    padding: 2rem 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-title {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Forzar responsividad en móviles */
@media (max-width: 768px) {
    .hero {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 1rem 0.5rem;
        box-sizing: border-box;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 0.5rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Ajustar personajes para que no se corten */
    .hero-background {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden;
    }
    
    .hero-bg-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        object-position: center !important;
        overflow: hidden !important;
    }
    
    /* Estilos adicionales para móviles pequeños */
    @media (max-width: 480px) {
        .hero-bg-image {
            width: 100vw !important;
            max-width: 100vw !important;
            height: 70vh !important;
            object-fit: cover !important;
            object-position: center top !important;
            overflow: hidden !important;
        }
        
        .hero-background {
            width: 100vw !important;
            max-width: 100vw !important;
            overflow: hidden !important;
        }
    }
    
    /* Ajuste específico para móviles medianos */
    @media (max-width: 768px) and (min-width: 481px) {
        .hero-bg-image {
            width: 100vw !important;
            max-width: 100vw !important;
            height: 80vh !important;
            object-fit: cover !important;
            object-position: center center !important;
            overflow: hidden !important;
        }
    }
    
    /* Solución específica para la imagen de fondo en móviles */
    @media (max-width: 768px) {
        .hero-background {
            background-image: url('../images/covers/Libro 1.jpg') !important;
            background-size: cover !important;
            background-position: center center !important;
            background-repeat: no-repeat !important;
            background-attachment: scroll !important;
            width: 100vw !important;
            max-width: 100vw !important;
            height: 100vh !important;
            overflow: hidden !important;
        }
        
        .hero-bg-image {
            display: none !important;
        }
    }
    
    /* Solución específica para teléfonos móviles (no tablets) */
    @media (max-width: 600px) and (orientation: portrait) {
        .hero-background {
            background-size: contain !important;
            background-position: center top !important;
            height: 75vh !important;
            width: 100vw !important;
            max-width: 100vw !important;
            overflow: hidden !important;
        }
    }
    
    /* Solución específica para teléfonos móviles */
    @media (max-width: 480px) {
        .hero-background {
            background-size: contain !important;
            background-position: center center !important;
            height: 50vh !important;
            width: 100vw !important;
            max-width: 100vw !important;
            overflow: hidden !important;
            transform: scale(0.85) !important;
        }
        
        .hero {
            width: 100vw !important;
            max-width: 100vw !important;
            overflow-x: hidden !important;
            padding: 1rem 0 !important;
            margin: 0 !important;
            min-height: 100vh !important;
        }
        
        .hero-content {
            width: 100% !important;
            max-width: 100% !important;
            padding: 1rem !important;
            margin: 0 !important;
            box-sizing: border-box !important;
        }
    }
    
    /* Solución para teléfonos muy pequeños */
    @media (max-width: 360px) {
        .hero-background {
            background-size: contain !important;
            background-position: center center !important;
            height: 40vh !important;
            width: 100vw !important;
            max-width: 100vw !important;
            overflow: hidden !important;
            transform: scale(0.8) !important;
        }
        
        .hero-title {
            font-size: 0.9rem !important;
            transform: scale(0.7) !important;
            padding: 0.25rem !important;
        }
        
        .hero {
            padding: 0.5rem 0 !important;
        }
        
        .hero-content {
            padding: 0.5rem !important;
        }
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero-title {
        font-size: 3rem;
        padding: 0 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-tagline {
        font-size: 1.2rem;
        padding: 0 1rem;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 1rem 2rem;
    }

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

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

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

    .author-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .form-group {
        flex-direction: column;
    }

    .admin-panel {
        right: 10px;
        left: 10px;
        transform: none;
        top: auto;
        bottom: 80px;
        width: auto;
        max-height: 70vh;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-tab {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }

    .admin-tab-content {
        padding: 1rem;
    }

    .book-item, .character-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .book-actions, .character-actions {
        align-self: flex-end;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn-add, .btn-save, .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1rem !important;
        line-height: 1.1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0.5rem !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        transform: scale(0.8) !important;
    }

    .hero-tagline {
        font-size: 1rem;
        padding: 0 1rem;
    }

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

    .character-image {
        width: 150px;
        height: 150px;
    }

    .author-placeholder {
        width: 200px;
        height: 200px;
    }

    .author-placeholder i {
        font-size: 3rem;
    }
}

/* ========================================
   OPTIMIZADOR DE IMÁGENES
   ======================================== */

.optimizer-management {
    padding: 1rem 0;
}

.optimizer-info {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.optimizer-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.optimizer-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.optimizer-features {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.optimizer-features h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.optimizer-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.optimizer-features li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.optimizer-features li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--secondary-gold);
    font-weight: 600;
}

/* Optimizador Masivo */
.batch-optimizer-management {
    padding: 1rem 0;
}

.batch-optimizer-info {
    background: rgba(123, 31, 162, 0.1);
    border: 1px solid rgba(123, 31, 162, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.batch-optimizer-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.batch-optimizer-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.batch-optimizer-features {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.batch-optimizer-features h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.batch-optimizer-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.batch-optimizer-features li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.batch-optimizer-features li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--secondary-gold);
    font-weight: 600;
}

.batch-optimizer-stats {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
}

.batch-optimizer-stats h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.8;
}

/* ========================================
   UTILIDADES
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.blurred {
    filter: blur(10px);
    transform: scale(1.1);
}

.locked {
    opacity: 0.7;
    cursor: not-allowed;
}

.active {
    opacity: 1;
    cursor: pointer;
}

/* ========================================
   ESTADOS ESPECIALES
   ======================================== */

.book-card.unlocked .book-cover img.blurred {
    filter: none;
    transform: scale(1);
}

.book-card.unlocked .coming-soon-badge {
    display: none;
}

.book-card.unlocked .book-info p {
    display: block;
}

.character-card.book2-active .character-portrait {
    filter: none;
}

.character-card.book3-active .character-portrait {
    filter: none;
}




