/* Fonts */
@font-face {
    font-family: 'Bebas Neue';
    src: url('fuente/BebasNeue-Regular.ttf') format('truetype'),
         url('fuente/BebasNeue-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2a1a2e;
    --secondary-color: #faf5fb;
    --accent-color: #d1b3d8;
    --accent-dark: #b591bd;
    --accent-light: #e8d9ec;
    --text-color: #333;
    --light-text: #6b5670;
    --border-color: #e5d6e8;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

body.legal-page {
    background: var(--secondary-color);
}

/* Contenedor para el efecto de film grain (generado por JS) */
/* Ahora se aplica solo dentro de la sección hero */
#film-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bebas Neue', cursive;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    gap: 3rem;
}

.nav-brand {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.nav-brand .logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-brand .brand-text {
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    margin-top: 0.2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    flex: 1;
    justify-content: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-menu a::before {
    content: '*';
    position: absolute;
    top: -0.7rem;
    right: -0.5rem;
    font-size: 0.8rem;
    color: var(--accent-dark);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-menu a:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-dark));
    transition: width 0.3s ease;
}

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

.nav-user {
    flex-shrink: 0;
}

.nav-cta {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    background: linear-gradient(135deg, #faf5fb 0%, #e8d9ec 100%);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    text-align: center;
}

.hero-logo {
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 1s ease;
}

.hero-logo img {
    max-width: 400px;
    width: 100%;
    height: auto;
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-family: 'Bebas Neue', cursive;
    color: var(--light-text);
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.05em;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.6s both;
}

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

.hero-visual {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 80%;
    z-index: 1;
}

.visual-element {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(209, 179, 216, 0.3) 0%, rgba(181, 145, 189, 0.2) 100%);
    border-radius: 50%;
    filter: blur(100px);
}

/* Featured Section */
.featured {
    padding: var(--spacing-xl) 0;
    background: white;
}

.section-title {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.featured-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.featured-card.large {
    grid-column: span 2;
}

.card-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #d1b3d8 0%, #b591bd 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.card-image .card-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.featured-card.large .card-image {
    height: 400px;
}

.card-content {
    padding: var(--spacing-md);
}

.card-tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--accent-color);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: var(--spacing-sm);
}

.card-content h3 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

.card-content .release-date {
    font-size: 0.95rem;
    color: var(--accent-dark);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    margin-top: 0;
    font-style: italic;
}

.card-content p {
    color: var(--light-text);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 10px;
}

/* Reviews Section */
.reviews {
    padding: var(--spacing-xl) 0;
    background: var(--secondary-color);
}

.section-description {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
}

.section-title-wrapper {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex-wrap: wrap;
}

.section-title-wrapper .section-title {
    margin-bottom: 0;
}

.ver-todos-link {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.05em;
}

.ver-todos-link:hover {
    color: var(--accent-color);
}

.carousel-container {
    position: relative;
    padding: 0 60px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
    left: 0;
}

.carousel-btn-next {
    right: 0;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1);
}

.reviews-grid {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.reviews-grid::-webkit-scrollbar {
    display: none;
}

.review-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 340px;
    min-width: 340px;
    flex-shrink: 0;
    cursor: pointer;
}

.review-card:hover {
    transform: translateY(-5px);
}

.reading-month {
    display: block;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 16px;
    margin: calc(-1 * var(--spacing-md)) calc(-1 * var(--spacing-md)) var(--spacing-sm) calc(-1 * var(--spacing-md));
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.review-card:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.review-header {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.book-cover {
    width: 100px;
    height: 150px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

.review-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.review-meta h3 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
    color: var(--primary-color);
}

.author {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.rating {
    color: #ffc107;
    font-size: 1.2rem;
}

.review-excerpt {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 0;
    flex: 1;
    position: relative;
    max-height: 10em;
    overflow: hidden;
}

.review-excerpt::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4em;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

.read-review {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    align-self: flex-start;
    position: relative;
    z-index: 1;
    background: white;
    padding-top: var(--spacing-xs);
}

.read-review:hover {
    color: var(--primary-color);
}

/* Submission Section */
.submission {
    padding: var(--spacing-xl) 0;
    background: white;
}

.submission-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.lead-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
}

.guidelines {
    margin-top: var(--spacing-md);
}

.guidelines h3 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md);
    color: var(--primary-color);
}

.guidelines ul {
    list-style-position: inside;
    color: var(--light-text);
    line-height: 2;
}

.guidelines li {
    padding-left: var(--spacing-sm);
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.word-counter {
    font-size: 0.85rem;
    color: var(--light-text);
    text-align: right;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 400;
}

.word-counter.valid {
    color: var(--accent-dark);
    font-weight: 500;
}

.word-counter.invalid {
    color: #b5626e;
    font-weight: 500;
}

.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: var(--spacing-md);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.file-label:hover {
    border-color: var(--accent-color);
    background: rgba(209, 179, 216, 0.05);
}

.file-name {
    font-size: 0.85rem;
    color: var(--light-text);
}

.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--secondary-color);
}

.about-content {
    max-width: 900px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

/* Contact Section */
.contact {
    padding: var(--spacing-xl) 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-xl);
}

.contact-details {
    margin-top: var(--spacing-md);
}

.contact-details p {
    margin-bottom: var(--spacing-sm);
    line-height: 2;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-links a {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

/* Legal Section */
.legal {
    padding: var(--spacing-xl) 0;
    background: var(--secondary-color);
}

body.legal-page .legal {
    padding-top: calc(var(--spacing-xl) + 70px);
}

.legal-content {
    max-width: 900px;
}

.legal-content p {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.footer-brand .footer-logo {
    height: 120px;
    width: auto;
    margin-bottom: var(--spacing-sm);
    filter: brightness(0) invert(1);
}

.footer-brand h3 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: var(--spacing-xl);
}

.footer-column h4 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
}

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

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    line-height: 2;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

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

/* ============================================
   SCROLL-BASED ANIMATIONS & LILAC TRANSITIONS
   ============================================ */

/* Transiciones suaves de tono lila en secciones */
.hero {
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.about,
.reviews {
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured,
.submission,
.contact {
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Variables de color para transiciones dinámicas */
:root {
    --lilac-phase-1: linear-gradient(135deg, #faf5fb 0%, #e8d9ec 100%);
    --lilac-phase-2: linear-gradient(135deg, #f5eef7 0%, #e0cfe6 100%);
    --lilac-phase-3: linear-gradient(135deg, #efe6f2 0%, #d8c3de 100%);
    --lilac-phase-4: linear-gradient(135deg, #e8dced 0%, #d1b3d8 100%);
}

/* Elementos con animación de entrada */
.scroll-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition:
        opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Animación staggered para elementos en grupo */
.scroll-reveal.stagger-1 { transition-delay: 0.1s; }
.scroll-reveal.stagger-2 { transition-delay: 0.2s; }
.scroll-reveal.stagger-3 { transition-delay: 0.3s; }
.scroll-reveal.stagger-4 { transition-delay: 0.4s; }
.scroll-reveal.stagger-5 { transition-delay: 0.5s; }

/* Animación de entrada desde la izquierda */
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition:
        opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Animación de entrada desde la derecha */
.scroll-reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition:
        opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Animación de escala suave */
.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition:
        opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Transición suave del fondo de la página */
body {
    transition: background-color 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efecto de brillo sutil en secciones activas */
section {
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(209, 179, 216, 0.15) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 0;
}

section.section-active::before {
    opacity: 1;
}

section > * {
    position: relative;
    z-index: 1;
}

/* Smooth color morphing para elementos destacados */
.featured-card,
.review-card {
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.6s ease;
}

/* Efecto de hover mejorado con transición de color */
.featured-card:hover {
    box-shadow:
        0 20px 60px rgba(209, 179, 216, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.1);
}

.review-card:hover {
    box-shadow:
        0 15px 40px rgba(209, 179, 216, 0.25),
        0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Gradiente animado para el visual-element del hero */
.visual-element {
    animation: gradientPulse 8s ease-in-out infinite;
}

@keyframes gradientPulse {
    0%, 100% {
        background: linear-gradient(135deg, rgba(209, 179, 216, 0.3) 0%, rgba(181, 145, 189, 0.2) 100%);
        transform: scale(1);
    }
    50% {
        background: linear-gradient(135deg, rgba(181, 145, 189, 0.35) 0%, rgba(209, 179, 216, 0.25) 100%);
        transform: scale(1.05);
    }
}

/* Efecto parallax mejorado */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Club de Lectura - Carrusel mejorado con efecto de enfoque central */
.reviews-grid {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Snap para cada tarjeta */
.review-card {
    scroll-snap-align: center;
    scroll-snap-stop: normal;
}

/* Indicador de mes actual */
.reading-month.current-month {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-dark) 100%);
    animation: currentMonthPulse 2s ease-in-out infinite;
}

@keyframes currentMonthPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(42, 26, 46, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(42, 26, 46, 0);
    }
}

/* Progress bar con gradiente animado */
.scroll-progress-bar {
    background: linear-gradient(
        90deg,
        var(--accent-light) 0%,
        var(--accent-color) 50%,
        var(--accent-dark) 100%
    );
    background-size: 200% 100%;
    animation: progressGradient 3s ease infinite;
}

@keyframes progressGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Boton de vinilo flotante */
.vinyl-button {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1100;
}

.vinyl-button img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

.vinyl-button.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.vinyl-button:hover {
    transform: translateY(-2px);
}

.vinyl-button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right,
    .scroll-reveal-scale {
        transition: opacity 0.3s ease;
        transform: none !important;
    }

    .scroll-reveal.revealed,
    .scroll-reveal-left.revealed,
    .scroll-reveal-right.revealed,
    .scroll-reveal-scale.revealed {
        opacity: 1;
    }

    .visual-element {
        animation: none;
    }

    section::before {
        display: none;
    }

    .reading-month.current-month {
        animation: none;
    }

    #film-grain {
        display: none;
    }

    .vinyl-button {
        transition: none;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease;
        box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    }

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

    .hamburger {
        display: flex;
    }

    .nav-user {
        display: none;
    }

    .nav-cta {
        display: block;
        margin-top: var(--spacing-sm);
    }

    .featured-card.large {
        grid-column: span 1;
    }

    .submission-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-visual {
        display: none;
    }

    /* Carrusel: tarjetas más pequeñas en tablets */
    .review-card {
        width: 300px;
        min-width: 300px;
    }
}

@media (max-width: 640px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .carousel-container {
        padding: 0 40px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    /* Carrusel: mostrar 1 tarjeta en móvil */
    .reviews-grid {
        gap: var(--spacing-md);
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .review-card {
        width: calc(100vw - 80px - var(--spacing-md) * 2);
        min-width: calc(100vw - 80px - var(--spacing-md) * 2);
        max-width: 100%;
        flex-shrink: 0;
    }

    .review-header {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .book-cover {
        width: 80px;
        min-width: 80px;
        height: 120px;
        object-fit: cover;
    }

    .review-meta {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .review-meta h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .reading-month {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .review-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .ratings-container {
        flex-direction: column;
        gap: 4px;
    }

    .rating {
        font-size: 0.75rem;
    }

    .rating-label {
        font-size: 0.7rem;
    }

    .hero-logo img {
        max-width: 280px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

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

    .vinyl-button {
        width: 64px;
        height: 64px;
        bottom: 16px;
        left: 16px;
    }
}

/* ============================================
   SISTEMA DE RATINGS Y COMENTARIOS
   ============================================ */

.user-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    padding: 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.user-btn::before {
    content: '*';
    position: absolute;
    top: -0.7rem;
    right: -0.5rem;
    font-size: 0.8rem;
    color: var(--accent-dark);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.user-btn:hover {
    color: var(--accent-color);
    background: transparent;
}

.user-btn:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.user-btn::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-dark));
    transition: width 0.3s ease;
}

.user-btn:hover::after {
    width: 100%;
}

/* Ratings en tarjetas de reseñas */
.ratings-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    flex-wrap: wrap;
}

.rating-label {
    font-weight: 600;
    color: #666;
    min-width: 100px;
    flex-shrink: 0;
}

.rating .stars {
    color: #FFD700;
    font-size: 14px;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}

.rating-count {
    font-size: 12px;
    color: #999;
}

/* Sección de ratings en detalle */
.ratings-section {
    background: linear-gradient(135deg, #faf5fb 0%, #f5f5f5 100%);
    padding: 40px;
    border-radius: 12px;
    margin: 32px 0 40px 0;
    border-left: 4px solid #d1b3d8;
}

.ratings-section h3 {
    margin: 0 0 24px 0;
    font-size: 24px;
    color: #2a1a2e;
    font-weight: 600;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.rating-stars-large {
    font-size: 48px;
    color: #FFD700;
}

.rating-info {
    display: flex;
    flex-direction: column;
}

.rating-average {
    font-size: 36px;
    font-weight: 700;
    color: #333;
}

.rating-count {
    font-size: 14px;
    color: #666;
}

/* Selector de estrellas */
.user-rating {
    border-top: 2px solid #e0e0e0;
    padding-top: 24px;
}

.user-rating p {
    margin: 0 0 12px 0;
    font-weight: 600;
    color: #333;
}

.star-selector {
    display: flex;
    gap: 8px;
}

.star-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.star-btn.selected,
.star-btn.hover {
    color: #FFD700;
}

.star-btn:hover {
    transform: scale(1.2);
}

/* Login prompt */
.login-prompt {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 8px;
    border: 2px dashed #d1b3d8;
}

.login-prompt p {
    margin: 0 0 16px 0;
    color: #666;
}

.join-club-btn {
    background: linear-gradient(135deg, #d1b3d8 0%, #b591bd 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.join-club-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(209, 179, 216, 0.4);
}

/* Sección de comentarios */
.comments-section {
    background: linear-gradient(135deg, #faf5fb 0%, #f5f5f5 100%);
    padding: 40px;
    border-radius: 12px;
    margin: 32px 0 40px 0;
    border-left: 4px solid #b591bd;
}

.comments-section h3 {
    margin: 0;
    font-size: 24px;
    color: #2a1a2e;
    font-weight: 600;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.comments-header .rating-display {
    margin: 0;
}

.comments-list h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #2a1a2e;
    font-weight: 600;
}

.comment-form .user-rating {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.comment-form .user-rating p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
}

.current-rating {
    font-weight: 600;
    color: #b591bd;
}

.no-rating {
    font-style: italic;
    color: #999;
}

.comment-form textarea:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.submit-comment-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.submit-comment-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Formulario de comentarios */
.comment-form {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    border: 2px solid #e0e0e0;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #d1b3d8;
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.char-count {
    font-size: 12px;
    color: #999;
}

.submit-comment-btn {
    background: linear-gradient(135deg, #d1b3d8 0%, #b591bd 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(209, 179, 216, 0.4);
}

/* Lista de comentarios */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.no-comments {
    text-align: center;
    padding: 48px;
    color: #999;
    font-style: italic;
}

.comment {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    border-left: 4px solid #d1b3d8;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.comment-header .comment-date {
    margin-left: auto;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author {
    font-weight: 700;
    color: #333;
}

.comment-author-rating {
    font-size: 14px;
    color: #ffc107;
    letter-spacing: -1px;
}

.comment-date {
    font-size: 12px;
    color: #999;
}

.comment-body p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.comment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.comment-reactions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-reaction {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    transition: transform 0.2s, opacity 0.2s;
    color: var(--accent-dark);
}

.comment-reaction:hover {
    transform: scale(1.2);
}

.comment-reaction.like:hover {
    color: rgba(39, 174, 96, 0.7);
}

.comment-reaction.dislike:hover {
    color: rgba(231, 76, 60, 0.7);
}

.comment-reaction.dislike.active {
    color: #e74c3c;
}

.comment-reaction.like.active {
    color: #27ae60;
}

.comment-vote-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--light-text);
    min-width: 20px;
    text-align: center;
}

.comment-actions {
    display: flex;
    gap: 12px;
}

.edit-comment-btn,
.delete-comment-btn {
    background: none;
    border: none;
    font-size: 12px;
    color: #d1b3d8;
    cursor: pointer;
    text-decoration: underline;
}

.edit-comment-btn:hover,
.delete-comment-btn:hover {
    color: #b591bd;
}

/* Edit textarea en comentarios */
.edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #d1b3d8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.edit-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.save-edit-btn,
.cancel-edit-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.save-edit-btn {
    background: linear-gradient(135deg, #d1b3d8 0%, #b591bd 100%);
    color: white;
    border: none;
}

.cancel-edit-btn {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.save-edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(209, 179, 216, 0.4);
}

.cancel-edit-btn:hover {
    border-color: #d1b3d8;
}

/* Responsive */
@media (max-width: 768px) {
    .rating-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .ratings-section,
    .comment-form {
        padding: 20px;
    }

    .star-selector {
        justify-content: center;
    }
}
