@font-face {
font-family: "DoctorGlitch";
src: url("fonts/DoctorGlitch.ttf");
}

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

:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-light: #e0e0e0;
    --text-muted: #999;
    --accent-red: #dc2626;
    --accent-red-hover: #b91c1c;
    --star-filled: #fbbf24;
    --star-empty: #4b5563;
    --card-bg: #111111;
    --border-color: #dc2626;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    margin: 0;
    height: 100vh;
    background: var(--bg-dark);
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
    color: var(--text-light);
    opacity: 1;
    transition: opacity 1.5s ease;
    line-height: 1.6;
}

body.games-body {
    height: auto;
    overflow-y: auto;
}

.about-body {
    position: relative;
    background:
        linear-gradient(90deg, rgba(10,10,16,0.98) 0%, rgba(15,23,42,0.98) 50%, rgba(3,7,18,1) 50%);
    background-color: #020617;
}

.about-body::after {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(248,113,113,0.10) 0,
            rgba(248,113,113,0.10) 2px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(248,113,113,0.06) 0,
            rgba(248,113,113,0.06) 2px,
            transparent 2px,
            transparent 6px
        ),
        radial-gradient(circle at 80% 0%, rgba(248,113,113,0.55), transparent 55%);
    mix-blend-mode: screen;
    opacity: 0.9;
}


.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.lang-btn {
    background: rgba(17, 17, 17, 0.8);
    border: 2px solid var(--border-color);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover,
.lang-btn:focus {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--accent-red);
    outline: none;
}

.lang-btn i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(17, 17, 17, 0.95);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    text-align: left;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;

}


.lang-option:hover,
.lang-option:focus {
    background: rgba(220, 38, 38, 0.2);
    color: var(--accent-red);
    outline: none;
}
.floating-goodreads {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(220, 38, 38, 0.5);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}



.floating-counter {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(220, 38, 38, 0.5);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.floating-counter:hover {
    background: rgba(17, 17, 17, 0.9);
    border-color: var(--accent-red);
    transform: translateY(-2px);
}

.counter-icon {
    font-size: 1.2rem;
}

#visitCount {
    font-weight: 700;
    color: var(--accent-red);
}

.counter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: #222;
  min-width: 200px;
  overflow: hidden;
  max-height: 0; 
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  background-color: #8B0000; 
  color: #fff; 
  cursor: pointer;
  display: flex;
  flex-direction: column; 
  z-index: 100; 
}


.dropdown-content li {
  padding: 10px 15px;
  border-bottom: 1px solid #333;
  list-style: none; 
}


.dropdown:hover .dropdown-content {
  max-height: 1000px; 
  opacity: 1;
}
   
    .book-page {
        position: relative;
        width: 100%;
        height: 100vh;
        perspective: 1500px;
        overflow: hidden;
    }

    
    .page {
        position: absolute;
        top: 0;
        height: 100%;
        width: calc(50% + 1px); 
        background-position: center;
        background-size: cover;
        transition: transform 1.2s ease-in-out;
        box-shadow: inset 0 0 50px rgba(0,0,0,0.2);
        z-index: 1;
        backface-visibility: hidden; 
        transform-style: preserve-3d;
    }

  
    .page.left {
        left: 0;
        transform-origin: left center;   
        background-image: url('img/portada_top_left.png');
        background-position: center -950px; 
    }

    
    .page.right {
        left: calc(50% - 1px);
        transform-origin: right center;
        background-image: url('img/portada_top_right.png');
        background-position: center -950px; 
    }

    .portada {
        position: absolute;
        top: 120px;
        width: 100%;
        text-align: center;
        font-family: 'Doctor Glitch', sans-serif;
        font-size: clamp(24px, 5vw, 48px);
        color: #fffbf2;
        z-index: 20;
        letter-spacing: 3px;
        padding: 0 20px;

        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 0, 0, 0.5),
            0 0 40px rgba(255, 0, 0, 0.7);

        transition: opacity 0.8s ease, filter 0.8s ease;
        pointer-events: none;
    }

   
    .portada.hide {
        opacity: 0;
        filter: blur(8px);
    }
    
    #portada {
        top: 120px;
        font-size: clamp(20px, 4vw, 40px);
    }

    #portada_2 {
        top: 190px;
        font-size: clamp(18px, 3.8vw, 38px);
    }
    
    .open-btn {
        position: absolute;
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;

        padding: clamp(12px, 2vw, 16px) clamp(30px, 5vw, 40px);
        font-size: clamp(12px, 2vw, 15px);
        font-family: 'Rajdhani';
        font-weight: bold;
        letter-spacing: 1px;
        background: linear-gradient(145deg, rgba(255, 0, 0, 0.7), #2c1a0d);
        border: 3px solid #515151;
        border-radius: 15px;
        color: #e9d8a6;
        text-shadow: 0 0 4px #000;
        box-shadow:
            inset 0 0 25px rgba(0,0,0,0.8),
            0 8px 20px rgba(0,0,0,0.9);

        transition: 0.3s ease, opacity 0.7s ease, transform 0.3s ease;
        cursor: pointer;
        white-space: nowrap;
    }
    
    .open-btn:hover,
    .open-btn:focus {
        transform: translateX(-50%) scale(1.05);
        outline: 2px solid var(--accent-red);
        outline-offset: 2px;
    }

    .open-btn:hover{
        box-shadow:#8c8c8c;
        transition: all;
        cursor: pointer;
    }
   
    .open-btn.snap {
        animation: vanishPage 0.9s forwards;
    }

    
    .content {
        position: absolute;
        width: 100%;
        min-height: 100vh;
        top: 0;
        left: 0;
        background: var(--bg-dark);
        opacity: 0;
        transform: scale(0.8);
        transition: opacity 1.2s ease, transform 1.2s ease;
        z-index: 0;
        color: var(--text-light);
        padding-top: 0;
        scroll-margin-top: 0;
    }

    .content.active {
        opacity: 1;
        transform: scale(1);
        position: relative;
        z-index: 10;
        top: 0;
        margin-top: 0;
        padding-top: 0;
    }
    #transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.8s ease; 
    z-index: 9999;
}


.menu {
    position: relative;
    z-index: 10;
    margin-top: 28px;
    padding-top: 0;
}

.menu ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 20px 0;
  margin: 0;
  background: #111;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: large;
  position: relative;
  z-index: 10;
}

.menu a:hover{
  color: #8B0000;
}
.menu ul:hover {
  color: #fff;
  font-family: 'Rajdhani';
  font-weight: bold;
  
}
.menu li:hover{
  color: #8B0000;
}
.menu ul li {
  position: relative;
}

.menu ul li a {
  color: #fff;
  text-decoration: none;
  padding: 10px 15px;
  font-family: 'Rajdhani';
  display: block;
  font-weight: bold;
  transition: color 0.3s ease;
}

.menu ul li a.active {
  color: var(--accent-red);
}

.flag-icon {
    width: 20px;
    height: 20px;
    gap: 2px;
    object-fit: cover;
    border-radius: 3px;
    padding-right: 2px;
}

.books-section {
    max-width: 1200px;       
    margin: 0 auto 4rem auto; 
    padding: 0 20px;        
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}



.book-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.book-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.book-cover-wrapper {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background: var(--card-bg);
    aspect-ratio: 2/3;
    margin-bottom: 1rem;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
}

.book-info-card {
    text-align: center;
}

.book-title-card {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author-card {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-weight: 500;
}

.book-rating-card {
    display: flex;
    justify-content: center;
    gap: 2px;
}

.star-card {
    color: var(--star-filled);
    font-size: 1rem;
}

.star-card.empty {
    color: var(--star-empty);
}

.star-card.partial {
    display: inline-block;
    position: relative;
    width: 1em;
    height: 1em;
}

.star-card.partial .star-filled-part {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--star-filled);
    clip-path: inset(0 calc(100% - var(--fill-percent, 50%)) 0 0);
    overflow: hidden;
}

.star-card.partial .star-empty-part {
    color: var(--star-empty);
}

.star-card.filled {
    color: var(--star-filled);
}

/* Estrellas en modal - solo lectura */
#modalStars .star-card {
    pointer-events: none;
    cursor: default;
}

/* Newsletter Section */
.newsletter-section {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.newsletter-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.newsletter-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: var(--text-light);
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-red);
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.newsletter-form button:hover {
    background: var(--accent-red-hover);
}

.newsletter-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    font-size: 0.95rem;
}

.newsletter-message.success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid #22c55e;
    display: block;
}

.newsletter-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid #ef4444;
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    justify-content: center;
    align-items: center;
}

.modal[aria-hidden="false"] {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-darker);
    margin: auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
    overflow-y: auto;
    position: relative;
}

body.modal-open {
    overflow: hidden;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 32px;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--accent-red);
}

.book-detail {
    display: flex;
    gap: 3rem;
    padding: 2.5rem;
    flex-wrap: wrap;
}

.book-cover-large {
    flex: 0 0 280px;
}

.book-cover-large img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.book-info {
    flex: 1;
    min-width: 300px;
}

.book-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.book-info h4 {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
}

.book-author {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
}

.rating-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.rating-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.stars-interactive {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#modalStars {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.star-interactive {
    font-size: 2rem;
    color: var(--star-empty);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

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

.star-interactive.filled {
    color: var(--star-filled);
}

#modalRatingText {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 0.5rem;
}

#saveRatingBtn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

#saveRatingBtn:hover {
    background: var(--accent-red-hover);
}

.review-update-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.review-content {
    margin-top: 2rem;
}

.review-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

#modalReview {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.8;
    color: var(--text-muted);
    text-align: justify;
}

.review-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    text-align: justify;
}

.book-meta {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.genre, .pages {
    background: var(--card-bg);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.games-section {
    max-width: 1200px;
    margin: 3rem auto 4rem auto;
    padding: 2rem 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.games-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.game-card {
    background: var(--bg-darker);
    border-radius: 10px;
    border: 1px solid rgba(220, 38, 38, 0.5);
    padding: 1.5rem;
}

.game-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.game-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.sudoku-grid {
    display: inline-block;
    border: 2px solid var(--border-color);
    border-collapse: collapse;
    margin-bottom: 0.75rem;
}

.sudoku-grid td {
    width: 24px;
    height: 24px;
    text-align: center;
    border: 1px solid #333;
    font-size: 0.9rem;
}

.sudoku-grid td:nth-child(3),
.sudoku-grid td:nth-child(6) {
    border-right: 2px solid var(--border-color);
}

.sudoku-grid tr:nth-child(3) td,
.sudoku-grid tr:nth-child(6) td {
    border-bottom: 2px solid var(--border-color);
}

.fibonacci-seq {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: var(--text-light);
    word-wrap: break-word;
}

.roblox-link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.6rem 1.4rem;
    background: var(--accent-red);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.roblox-link:hover {
    background: var(--accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.floating-about-btn {
    position:fixed;
    bottom: 90px;
    right: 30px;
    z-index: 1001;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.floating-about-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7);
}

.games-page {
    max-width: 1100px;
    margin: 2rem auto 4rem auto;
    padding: 0 1.5rem;
}

.games-header {
    text-align: center;
    margin-bottom: 2rem;
}

.games-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
}

.games-header p {
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
}

.games-back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--accent-red);
    text-decoration: none;
}

.games-back-link:hover {
    text-decoration: underline;
}

/* SOBRE MI / ABOUT PAGE */

.about-page {
    max-width: 1100px;
    margin: 2.5rem auto 4rem auto;
    padding: 0 1.5rem 2rem;
}

.about-hero {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
    gap: 2rem;
    padding: 2.5rem 2rem;
    border-radius: 18px;
    border: 1px solid rgba(220,38,38,0.6);
    background:
        radial-gradient(circle at top left, rgba(248,250,252,0.08), transparent),
        radial-gradient(circle at bottom center, rgba(127,29,29,0.55), transparent 65%),
        radial-gradient(circle at top right, rgba(21,128,61,0.55), rgba(2,6,23,1));
    box-shadow: 0 30px 60px rgba(0,0,0,0.7);
    margin-bottom: 3rem;
}

.about-hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    margin-bottom: 0.75rem;
}

.about-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--accent-red);
    margin-bottom: 0.5rem;
}

.about-subtitle {
    color: var(--text-muted);
    max-width: 560px;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.about-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(148,163,184,0.4);
}

.about-hero-card {
    background: rgba(15,23,42,0.9);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(248,250,252,0.12);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.about-avatar-glow {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #ef4444, #7f1d1d);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 35px rgba(239,68,68,0.8);
}

.about-avatar-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(248,250,252,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-family: 'Doctor Glitch', sans-serif;
}

.about-profession {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.about-profession i {
    color: var(--accent-red);
    margin-right: 0.35rem;
}

.about-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    background: var(--accent-red);
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0,0,0,0.8);
    transition: background 0.25s ease, transform 0.2s ease;
}

.about-hero-link:hover {
    background: var(--accent-red-hover);
    transform: translateY(-2px);
}

.about-section {
    margin-top: 3rem;
}

.about-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr);
    gap: 2rem;
}

.about-grid p {
    color: var(--text-muted);
}

.about-highlight-card {
    background: rgba(15,23,42,0.9);
    border-radius: 14px;
    border: 1px solid rgba(220,38,38,0.6);
    padding: 1.5rem 1.75rem;
    box-shadow: 0 18px 35px rgba(0,0,0,0.6);
}

.about-highlight-card h3 {
    margin-bottom: 0.75rem;
}

.about-highlight-card ul {
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.about-hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.about-hobby-card {
    background: rgba(15,23,42,0.95);
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.4);
    padding: 1.4rem 1.6rem;
    box-shadow: 0 18px 30px rgba(0,0,0,0.5);
}

.about-hobby-card h3 i {
    color: var(--accent-red);
    margin-right: 0.4rem;
}

.about-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.about-project-card {
    background: linear-gradient(140deg, rgba(15,23,42,0.95), rgba(30,64,175,0.65));
    border-radius: 16px;
    padding: 1.6rem 1.8rem;
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
}

.about-project-card h3 i {
    margin-right: 0.45rem;
    color: #f97316;
}

.about-link {
    display: inline-block;
    margin-top: 0.7rem;
    font-size: 0.9rem;
    color: #fbbf24;
    text-decoration: none;
}

.about-link:hover {
    text-decoration: underline;
}

.coming-soon {
    font-size: 0.9rem;
    color: #fbbf24;
    margin-top: 0.5rem;
    font-style: italic;
}

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

.about-social-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.4);
    text-decoration: none;
    color: var(--text-light);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.about-social-card i {
    font-size: 1.4rem;
    color: var(--accent-red);
}

.about-social-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(0,0,0,0.7);
    border-color: var(--accent-red);
}

@media (max-width: 900px) {
    .about-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.sudoku-board {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.sudoku-interactive input {
    width: 32px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 1rem;
    background: transparent;
    color: var(--text-light);
}

.sudoku-interactive td.fixed {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
}

.sudoku-interactive input.error {
    background: rgba(220, 38, 38, 0.25);
}

.sudoku-interactive input.correct {
    background: rgba(34, 197, 94, 0.2);
}

.sudoku-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.sudoku-controls select,
.sudoku-controls button {
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-darker);
    color: var(--text-light);
    font-family: 'Rajdhani', sans-serif;
    cursor: pointer;
}

.sudoku-controls button {
    background: var(--accent-red);
}

.sudoku-controls button:hover {
    background: var(--accent-red-hover);
}

.game-message {
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.game-message.error {
    color: #f87171;
}

.game-message.success {
    color: #4ade80;
}

.confetti {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: visible;
}

.confetti.hidden {
    display: none;
}

.confetti .spark {
    position: absolute;
    bottom: 0;
    width: 6px;
    height: 12px;
    background: #fbbf24;
    animation: spark-fall 0.8s ease-out forwards;
}

@keyframes spark-fall {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-40px) scale(0.5);
        opacity: 0;
    }
}

.sequence-game {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.sequence-input {
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-darker);
    color: var(--text-light);
}

.sequence-game button {
    align-self: flex-start;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--accent-red);
    color: #fff;
    cursor: pointer;
    margin-right: 0.5rem;
}

.sequence-game button:hover {
    background: var(--accent-red-hover);
}

.matches-game {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(220,38,38,0.4);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 550px;
}

.matches-intro {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.matches-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.matches-controls select,
.matches-controls button {
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-darker);
    color: var(--text-light);
    font-family: 'Rajdhani', sans-serif;
    cursor: pointer;
}

.matches-controls button {
    background: var(--accent-red);
}

.matches-controls button:hover {
    background: var(--accent-red-hover);
}

.matches-question {
    font-weight: 600;
}

.matches-input {
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-darker);
    color: var(--text-light);
    max-width: 200px;
}

.matches-board {
    position: relative;
    width: 100%;
    max-width: 260px;
    height: 180px;
    margin: 0.8rem auto 0.4rem;
    border-radius: 8px;
    background: radial-gradient(circle at center, rgba(148,163,184,0.2), transparent);
}

.match-stick {
    width: 10px;
    height: 40px;
    border-radius: 999px;
    background: #4b5563;
    box-shadow: 0 0 4px rgba(0,0,0,0.7);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.match-stick.active {
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(250,204,21,0.9);
    transform: translateY(-2px);
}

.match-stick:hover {
    transform: translateY(-3px) scale(1.03);
}

.word-games {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.word-game {
    background: var(--bg-darker);
    border-radius: 10px;
    border: 1px solid rgba(220, 38, 38, 0.5);
    padding: 1.5rem;
}

.scramble-word {
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0.5rem 0 0.75rem;
}

.word-input {
    width: 100%;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-darker);
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.word-check-btn,
.word-reset-btn,
.word-new-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--accent-red);
    color: #fff;
    cursor: pointer;
    margin-right: 0.25rem;
    margin-top: 0.25rem;
}

.word-reset-btn {
    background: var(--bg-darker);
}

.word-check-btn:hover {
    background: var(--accent-red-hover);
}

.back-to-top {
    position: fixed;
    bottom: 150px;
    right: 30px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: rgba(17,17,17,0.85);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1001;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-3px);
}

footer {
    background: var(--bg-darker);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.pro-cta{
    margin-top: 1.2rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.pro-cta-text{
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.pro-cta-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 1px solid rgba(248,113,113,0.55);
    box-shadow: 0 10px 22px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pro-cta-link:hover{
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.65);
    filter: saturate(1.15);
}

/* QUIÉN SOY (INFOGRAFÍA) */

.who-page{
    max-width: 1100px;
    margin: 2.5rem auto 4rem auto;
    padding: 0 1.5rem 2rem;
}

.who-top{
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.who-back{
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    width: fit-content;
    color: var(--text-light);
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(220,38,38,0.6);
    background: rgba(17,17,17,0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.55);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.who-back:hover{
    transform: translateY(-2px);
    background: rgba(17,17,17,0.85);
    border-color: var(--accent-red);
}

.who-kicker{
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--accent-red);
    margin-bottom: 0.5rem;
}

.who-title{
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    margin-bottom: 0.5rem;
}

.who-subtitle{
    color: var(--text-muted);
    max-width: 72ch;
}

.who-infographic{
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(220,38,38,0.6);
    background:
        radial-gradient(circle at top left, rgba(248,250,252,0.06), transparent),
        radial-gradient(circle at 20% 70%, rgba(127,29,29,0.45), transparent 65%),
        radial-gradient(circle at top right, rgba(21,128,61,0.35), rgba(2,6,23,1));
    box-shadow: 0 30px 60px rgba(0,0,0,0.7);
    padding: 2.25rem 2rem;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 1.5rem 1.75rem;
    align-items: start;
}

/* líneas decorativas */
.who-infographic::before{
    content:"";
    position:absolute;
    inset: 0;
    pointer-events:none;
    background:
        radial-gradient(circle at 50% 36%, rgba(220,38,38,0.38), transparent 58%),
        linear-gradient(90deg, transparent 0%, rgba(220,38,38,0.18) 50%, transparent 100%);
    opacity: 0.6;
}

.who-center{
    grid-column: 2;
    grid-row: 1 / span 2;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0.5rem 0.75rem;
}

.who-avatar{
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #ef4444, #7f1d1d);
    display:flex;
    align-items:center;
    justify-content:center;
    margin: 0 auto 1rem auto;
    box-shadow: 0 0 40px rgba(239,68,68,0.75);
    position: relative;
}

.who-avatar::after{
    content:"";
    position:absolute;
    inset:-18px;
    border-radius: 50%;
    border: 1px solid rgba(248,113,113,0.35);
    box-shadow: 0 0 0 1px rgba(220,38,38,0.15) inset;
}

.who-avatar-inner{
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid rgba(248,250,252,0.9);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size: 2.2rem;
    font-family: "DoctorGlitch", sans-serif;
    letter-spacing: 0.02em;
}

.who-blurb{
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 46ch;
    margin: 0 auto;
}

.who-panel{
    position: relative;
    z-index: 1;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.35);
    border-radius: 16px;
    padding: 1.2rem 1.25rem;
    box-shadow: 0 18px 35px rgba(0,0,0,0.55);
}

.who-panel-title{
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(248,250,252,0.92);
    margin-bottom: 0.85rem;
}

.who-list{
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
    color: var(--text-muted);
}

.who-list li{
    display:flex;
    align-items:flex-start;
    gap: 0.6rem;
    line-height: 1.45;
}

.who-list i{
    color: var(--accent-red);
    margin-top: 0.2rem;
}

.who-panel-left.who-panel-top{
    grid-column: 1;
    grid-row: 1;
}

.who-panel-left.who-panel-bottom{
    grid-column: 1;
    grid-row: 2;
}

.who-panel-right{
    grid-column: 3;
    grid-row: 1 / span 2;
}

.who-title-wrap{
    position: relative;
    z-index: 1;
}

.who-contact{
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.who-contact-item{
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-light);
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.35);
    background: rgba(2,6,23,0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.who-contact-item:hover{
    transform: translateY(-2px);
    border-color: rgba(220,38,38,0.7);
    background: rgba(2,6,23,0.55);
}

.who-contact-item i{
    color: var(--accent-red);
    font-size: 1.1rem;
}

.who-pro-cta{
    margin-top: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(220,38,38,0.35);
}

.who-pro-text{
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.who-pro-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 1px solid rgba(248,113,113,0.55);
    box-shadow: 0 12px 28px rgba(0,0,0,0.65);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.who-pro-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.75);
    filter: saturate(1.12);
}

@media (max-width: 980px){
    .who-infographic{
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 1.75rem 1.25rem;
    }
    .who-center{
        grid-column: 1;
        grid-row: auto;
        order: 1;
        padding: 0;
    }
    .who-panel-left.who-panel-top{ grid-column: 1; grid-row: auto; order: 2; }
    .who-panel-left.who-panel-bottom{ grid-column: 1; grid-row: auto; order: 3; }
    .who-panel-right{ grid-column: 1; grid-row: auto; order: 4; }
    .who-title{ font-size: 2.2rem; }
}

/* Responsive */
@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .floating-counter {
        bottom: 20px;
        right: 20px;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .floating-counter .counter-label {
        display: none;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .visitor-counter {
        position: static;
        opacity: 10px;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }

    .book-detail {
        flex-direction: column;
        padding: 1rem;
    }

    .book-cover-large {
        flex: 0 0 auto;
        max-width: 200px;
        margin: 0 auto;
    }

    .book-cover-large img {
        max-width: 100%;
    }

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

    .newsletter-form input {
        min-width: 100%;
    }

    .section-nav {
        padding: 0 1rem;
    }

    .nav-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }

    .menu ul {
        font-size: medium;
        padding-top: 10px;
        margin-bottom: 30px;
    }

    .menu ul li a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .portada {
        top: 80px;
    }

    #portada {
        top: 80px;
    }

    #portada_2 {
        top: 140px;
    }

    .open-btn {
        bottom: 20px;
        padding: 12px 24px;
    }

    .page.left,
    .page.right {
        background-size: cover;
        background-position: center;
    }
}

@media (max-width: 480px) {
    .language-selector {
        top: 5px;
        right: 5px;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .floating-counter {
        bottom: 10px;
        right: 10px;
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .menu ul {
        font-size: small;
    }

    .menu ul li a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .portada {
        top: 60px;
    }

    #portada {
        top: 60px;
    }

    #portada_2 {
        top: 110px;
    }
}

/* Accesibilidad - Focus visible */
*:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

/* Skip to content link para accesibilidad */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-red);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}
.shw{
    width: 20px;
    height: 20px;
    margin-left: auto;
    margin-right: 20px;
}
.goodreads a {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 400;
}
.goodreads:hover a {
    text-decoration: none;
}

.goodreads:visited a {
    text-decoration: none;
}
a .goodreads {
    text-decoration: none;
}
a:visited {
  color: inherit;
}
a .whoam {
    text-decoration: none;
}

