/* ================== VARIABLES Y BASE ================== */
:root {
    --pink: #ff7eb8;
    --pink-strong: #ff2f7f;
    --pink-light: #ffe1f1;
    --purple: #7c6cff;
    --blue: #6dd6ff;
    --blue-strong: #3c8bff;
    --yellow: #ffd86b;
    --green: #8ee59b;
    --bg-main: #fff7e9;
    --text-main: #3b3450;
    --radius-card: 24px;
    --shadow-soft: 0 14px 40px rgba(0,0,0,0.12);
}

/* Reseteito suave */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

/* Contenedor */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ================== HEADER Y NAV ================== */

.site-header {
    background: linear-gradient(120deg, #65c5ff, #ff8fd8);
    padding: 22px 0 60px;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
    margin-bottom: 32px;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 18px; /* agrega este gap para que no se pegue el botón */
}


.logo {
    background: var(--pink-strong);
    color: white;
    padding: 14px 22px;
    border-radius: 22px;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.1;
    box-shadow: var(--shadow-soft);
}

.logo span {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

/* NAV */
.main-nav {
    background: rgba(255, 255, 255, 0.92);
    padding: 10px 26px;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    font-size: 14px;
    font-weight: 600;
}

.main-nav a {
    text-decoration: none;
    color: var(--pink-strong);
    position: relative;
    padding-bottom: 3px;
    transition: color .18s, transform .18s;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff7eb8, #ffda79);
    transition: width .18s;
}

.main-nav a:hover {
    color: #ff006e;
    transform: translateY(-1px);
}

.main-nav a:hover::after,
.main-nav a.activo::after {
    width: 100%;
}

/* ================== HERO GENERAL ================== */

.hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    align-items: center;
    color: white;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #ffffffcc;
    color: var(--pink-strong);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-title {
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 46px;
    text-shadow: 0 4px 0 rgba(0,0,0,0.15);
}

.hero-subtitle {
    margin-top: 12px;
    font-size: 15px;
    max-width: 430px;
}

.hero-buttons {
    margin-top: 22px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Botones */

.btn {
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 14px;
    transition: transform .18s, box-shadow .18s;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.btn a {
    text-decoration: none;
    color: inherit;
}

.btn-primary {
    background: linear-gradient(120deg, #ff7eb8, #ffda79);
    color: #43234a;
}

.btn-secondary {
    background: #ffffffdd;
    color: #43234a;
}

.btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 32px rgba(0,0,0,0.3);
}

/* Blob lado derecho */
.hero-blob {
    background: radial-gradient(circle at 20% 0, #fff, #ffb3d9);
    border-radius: 40px;
    height: 220px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.hero-blob::before,
.hero-blob::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.7;
    filter: blur(1px);
    animation: flotar 6s ease-in-out infinite;
}

.hero-blob::before {
    width: 80px;
    height: 80px;
    background: var(--yellow);
    top: 20px;
    left: 24px;
}
.hero-blob::after {
    width: 110px;
    height: 110px;
    background: var(--purple);
    bottom: -20px;
    right: 10px;
}

@keyframes flotar {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ================== SECCIONES ================== */

.section {
    padding: 40px 0 60px;
}

.section-title {
    text-align: center;
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 32px;
    color: var(--purple);
    margin-bottom: 6px;
}

.section-subtitle {
    text-align: center;
    font-size: 14px;
    max-width: 620px;
    margin: 0 auto 26px;
}

/* Badges y chips */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--purple);
    margin-bottom: 12px;
    box-shadow: var(--shadow-soft);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.chip {
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f3ff;
}

.chip.blue { background:#e0f4ff; color:#2870a8; }
.chip.yellow { background:#fff3c8; color:#ab7b00; }
.chip.pink { background:#ffe1f1; color:#c6407f; }

/* ================== CARDS GENERALES ================== */

.card {
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 20px 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

/* ================== CAPÍTULOS ================== */

.cap-card .cap-pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--pink-light);
    color: var(--pink-strong);
    width: fit-content;
    margin-bottom: 4px;
}

.cap-card .cap-title {
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 18px;
    margin-bottom: 4px;
}

.cap-video {
    margin-top: 8px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}
.cap-video video {
    width: 100%;
    display: block;
}

/* ================== PERSONAJES ================== */

.personaje-img-placeholder {
    border-radius: 16px;
    border: 2px dashed var(--pink-light);
    height: 150px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #b57bb0;
    background: #fff5fb;
}

.personaje-name {
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 20px;
}

.personaje-role {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}
.role-pink { color: var(--pink-strong); }
.role-purple { color: var(--purple); }
.role-green { color: #20a05b; }
/* ===== PERSONAJES AVANZADO ===== */

.personajes-hero {
    align-items: center;
}

.personajes-blob {
    position: relative;
}

.personajes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 18px;
}

.personaje-card {
    background: #fff;
    border-radius: 24px;
    padding: 18px 16px 20px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s, border .18s;
    border: 2px solid transparent;
    cursor: default;
}

.personaje-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255,255,255,0.7), transparent 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s;
}

.personaje-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 46px rgba(0,0,0,0.2);
    border-color: rgba(255, 182, 222, 0.7);
}

.personaje-card:hover::after {
    opacity: 1;
}

.personaje-chip {
    display: inline-block;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    font-weight: 600;
}

.personaje-chip-berry {
    background: #ffe1f1;
    color: #c02664;
}
.personaje-chip-tuxx {
    background: #e0f4ff;
    color: #1d4ed8;
}
.personaje-chip-tonny {
    background: #dcfce7;
    color: #166534;
}

.personaje-desc {
    font-size: 13px;
    margin-bottom: 8px;
}

.personaje-lista {
    list-style: none;
    font-size: 12px;
    padding-left: 0;
}

.personaje-lista li::before {
    content: "• ";
    color: var(--pink-strong);
}

.personaje-lista li {
    margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .personajes-grid {
        grid-template-columns: 1fr;
    }
}


/* ================== ACTIVIDADES ================== */

.activity-card {
    background: #fff;
    border-radius: var(--radius-card);
    padding: 18px 16px 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .18s, box-shadow .18s;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(0,0,0,0.18);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.icon-pink { background: linear-gradient(135deg, #ff7eb8, #ff2f7f); }
.icon-blue { background: linear-gradient(135deg, #6dd6ff, #3c8bff); }
.icon-purple { background: linear-gradient(135deg, #b38cff, #7c6cff); }
.icon-green { background: linear-gradient(135deg, #78e08f, #38ada9); }
.icon-yellow { background: linear-gradient(135deg, #ffd86b, #ffa502); }
.icon-lilac { background: linear-gradient(135deg, #d980fa, #82589f); }

.activity-title {
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 18px;
}

.activity-desc {
    font-size: 13px;
    margin: 6px 0 14px;
}

.activity-btn {
    align-self: flex-start;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    border: none;
    background: linear-gradient(120deg, #ff7eb8, #ffda79);
    color: #43234a;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: transform .15s, box-shadow .15s;
}
.activity-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.25);
}
.activity-btn a {
    text-decoration: none;
    color: inherit;
}

/* ================== CUENTOS ================== */

.cuento-title {
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 18px;
    margin-bottom: 6px;
}

.cuento-tag {
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e0f4ff;
    color: #2870a8;
    display: inline-block;
    margin-bottom: 8px;
}

/* ================== CONTACTO ================== */

.contact-wrapper {
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 24px 22px;
    max-width: 720px;
    margin: 0 auto;
}

.contact-note {
    font-size: 13px;
    margin-bottom: 12px;
    color: #666;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}
.form-group.full {
    grid-column: 1 / -1;
}

input, textarea {
    border-radius: 12px;
    border: 1px solid #ffd3ec;
    padding: 9px 10px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 40px;
}
textarea { min-height: 80px; }

input:focus, textarea:focus {
    outline: 2px solid #ff9ad0;
    border-color: transparent;
}

/* ================== FOOTER ================== */

.site-footer {
    text-align: center;
    font-size: 12px;
    padding: 18px 0 10px;
    color: #777;
}

/* ================== RESPONSIVE ================== */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .main-nav {
        display: none; /* para simplificar en móvil */
    }
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}
/* ===== BANNER DE GRACIAS + FOOTER CURVO ===== */

.thanks-strip {
    padding: 30px 0 10px;
    background: #ffeafd;
    text-align: center;
}

.thanks-pill {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 999px;
    background: #fff;
    color: #ff2f7f;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(0,0,0,0.12);
    font-size: 14px;
}

/* Footer grande con “onda” de color */

.site-footer-big {
    margin-top: 0;
    padding: 40px 0 24px;
    background: linear-gradient(120deg, #65c5ff, #ff8fd8);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.site-footer-big::before {
    content: "";
    position: absolute;
    top: -40px;
    left: -5%;
    width: 110%;
    height: 80px;
    background: #fff;
    border-top-left-radius: 50%;
    border-top-right-radius: 50%;
}

.footer-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.footer-title {
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 24px;
    margin-bottom: 4px;
}

.footer-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 14px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
}

.footer-nav a {
    text-decoration: none;
    color: #fff;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-copy {
    font-size: 11px;
    opacity: 0.9;
}
/* ===== TARJETAS GRANDES DE EPISODIOS ===== */

episode-list { /* por si te equivocas con el nombre, no pasa nada */ }

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.episode-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    background: #fff;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.episode-left {
    padding: 18px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.episode-number-card {
    width: 100%;
    max-width: 220px;
    border-radius: 20px;
    padding: 26px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.episode-number {
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 40px;
    line-height: 1;
}

.episode-label {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

/* Colores por episodio */
.episode-1 .episode-number-card {
    background: linear-gradient(135deg, #ff7eb8, #ff3e9a);
}
.episode-2 .episode-number-card {
    background: linear-gradient(135deg, #b38cff, #7c6cff);
}
.episode-3 .episode-number-card {
    background: linear-gradient(135deg, #ffd86b, #ff9f43);
}

.episode-right {
    padding: 18px 20px 20px;
}

.episode-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.episode-pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--pink-light);
    color: var(--pink-strong);
    font-weight: 700;
}

.episode-time {
    font-size: 12px;
    color: #555;
}

.episode-title {
    font-family: "Baloo 2", system-ui, cursive;
    font-size: 20px;
    margin-bottom: 6px;
}

.episode-desc {
    font-size: 14px;
    margin-bottom: 10px;
}

.episode-btn {
    font-size: 13px;
    padding-inline: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Videos debajo de cada tarjeta */
.episode-video-wrapper {
    margin: -6px 0 10px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: #000;
}

.episode-video-wrapper video {
    width: 100%;
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .episode-card {
        grid-template-columns: 1fr;
    }
}
/* ===== BOTÓN DE MODO OSCURO ===== */

.theme-toggle {
    border: none;
    background: #ffffffdd;
    border-radius: 999px;
    font-size: 18px;
    padding: 6px 10px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
    transition: transform .15s, box-shadow .15s, background .15s;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.22);
}

@media (max-width: 900px) {
    .theme-toggle {
        position: absolute;
        top: 18px;
        right: 16px;
        z-index: 5;
    }
}
/* ===== MODO OSCURO ===== */

body.tema-oscuro {
    --bg-main: #020617;       /* fondo general */
    --text-main: #e5e7eb;     /* texto principal */
    --pink: #fb379c;
    --pink-strong: #f973c9;
    --pink-light: #3b1d3f;
    --purple: #a855f7;
    --blue: #38bdf8;
    --blue-strong: #2563eb;
    --yellow: #facc15;
    --green: #22c55e;
}

/* header más oscuro */
body.tema-oscuro .site-header {
    background: linear-gradient(120deg, #020617, #4c1d95);
    box-shadow: 0 18px 40px rgba(0,0,0,0.7);
}

/* tarjetas y secciones más oscuras */
body.tema-oscuro .card,
body.tema-oscuro .activity-card,
body.tema-oscuro .contact-wrapper,
body.tema-oscuro .thanks-pill {
    background: #020617;
    color: var(--text-main);
    box-shadow: 0 16px 40px rgba(0,0,0,0.75);
    border: 1px solid #111827;
}

/* fondo general */
body.tema-oscuro {
    background: radial-gradient(circle at top, #1f2937 0, #020617 55%);
}

/* nav y footer */
body.tema-oscuro .main-nav {
    background: rgba(15,23,42,0.9);
}

body.tema-oscuro .main-nav a {
    color: #e5e7eb;
}

body.tema-oscuro .footer-nav a,
body.tema-oscuro .footer-title,
body.tema-oscuro .footer-subtitle,
body.tema-oscuro .footer-copy {
    color: #f9fafb;
}

/* botón en oscuro cambia a sol */
body.tema-oscuro .theme-toggle {
    background: #111827;
    color: #facc15;
}

/* campos de formulario */
body.tema-oscuro input,
body.tema-oscuro textarea {
    background: #020617;
    color: #e5e7eb;
    border-color: #1f2937;
}
/* ===== MINIJUEGO DE MEMORIA ===== */

.memory-game {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 14px;
    justify-items: center;
    margin: 20px auto 14px;
    max-width: 420px;
}

.memory-card {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, #ff9ad0, #ff7eb8);
    box-shadow: var(--shadow-soft);
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}

.memory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

.memory-card.revealed {
    background: #ffffff;
    color: #3b3450;
}

.memory-card.matched {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #ffffff;
    cursor: default;
    transform: scale(1.02);
}

.memory-message {
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
}
/* Barra de estado del juego */
.memory-status {
    display: flex;
    justify-content: center;
    gap: 18px;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
}

.memory-status span {
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffe1f1;
    color: #3b3450;
}

body.tema-oscuro .memory-status span {
    background: #1f2937;
    color: #e5e7eb;
}

/* Animación cuando gana */
.memory-win .memory-game {
    animation: memoryPulse 0.7s ease-in-out 2;
}

@keyframes memoryPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.04); }
    50% { transform: scale(0.98); }
    75% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Modo oscuro */
body.tema-oscuro .memory-card {
    background: linear-gradient(135deg, #4c1d95, #1d4ed8);
    color: #e5e7eb;
}
body.tema-oscuro .memory-card.revealed {
    background: #020617;
    color: #e5e7eb;
}
body.tema-oscuro .memory-card.matched {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
body.tema-oscuro .memory-message {
    color: #e5e7eb;
}
/* Botón de ficha de personaje */
.personaje-btn {
    margin-top: 10px;
    border: none;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(120deg, #ff7eb8, #ffda79);
    color: #43234a;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    transition: transform .15s, box-shadow .15s;
}

.personaje-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.22);
}

/* Layout de fichas de personaje */

.ficha-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
    gap: 24px;
    margin-top: 20px;
}

.ficha-main .personaje-img-placeholder {
    height: 180px;
    margin-bottom: 14px;
}

.ficha-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 11px;
}

.ficha-tag {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f3f4ff;
    font-weight: 500;
}

.ficha-tag-berry { background:#ffe1f1; color:#c02664; }
.ficha-tag-tuxx { background:#e0f4ff; color:#1d4ed8; }
.ficha-tag-tonny { background:#dcfce7; color:#166534; }

.ficha-side .card {
    font-size: 13px;
}

.ficha-side dl {
    margin: 0;
}

.ficha-side dt {
    font-weight: 700;
    margin-top: 6px;
}

.ficha-side dd {
    margin: 0 0 4px 0;
}

/* Botón volver */
.btn-back {
    margin-top: 14px;
    border-radius: 999px;
    border: none;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffffdd;
    box-shadow: var(--shadow-soft);
}

/* Responsive */
@media (max-width: 900px) {
    .ficha-layout {
        grid-template-columns: 1fr;
    }
}
/* Marco de imagen en cards de personajes */
.personaje-media{
  width: 100%;
  height: 260px;           /* ajusta si quieres más alto: 280-320 */
  border-radius: 18px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Imagen dentro del marco: NO se recorta, se ajusta completa */
.personaje-img{
  width: 100%;
  height: 100%;
  object-fit: contain;     /* CLAVE */
  display: block;
  transform: translateZ(0);
}

/* En modo oscuro para que el marco no se vea raro */
body.tema-oscuro .personaje-media{
  background: rgba(255,255,255,0.08);
}
/* Imagen más grande en ficha */
.ficha-media{
  height: 320px; /* súbelo a 360 si quieres más */
}
/* Contenedor de imagen en fichas */
.ficha-media{
  width: 100%;
  height: 380px;              /* más alto para personajes verticales */
  border-radius: 22px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Imagen completa, sin recorte */
.ficha-img{
  width: 100%;
  height: 100%;
  object-fit: contain;        /* CLAVE: no recorta */
  object-position: center;
}

/* Modo oscuro */
body.tema-oscuro .ficha-media{
  background: rgba(255,255,255,0.08);
}
/* ================== TEMA VERDE (OVERRIDE) ==================
   Pégalo AL FINAL de tu CSS para cambiar azul -> verde
============================================================== */

/* 1) Variables base */
:root{
  --blue: #8ee59b;          /* antes azul, ahora verde suave */
  --blue-strong: #20a05b;   /* verde fuerte */
  --bg-main: #f3fff6;       /* fondo verdoso muy clarito */
  --text-main: #2b2b2b;     /* texto un poco más neutro */
}

/* 2) Header y Footer: de azul/rosa a verde/rosa */
.site-header{
  background: linear-gradient(120deg, #22c55e, #ff8fd8);
}

.site-footer-big{
  background: linear-gradient(120deg, #22c55e, #ff8fd8);
}

/* 3) Enlaces/nav y subrayado: de rosa+amarillo a verde+amarillo */
.main-nav a{
  color: #15803d; /* verde legible */
}

.main-nav a:hover{
  color: #166534;
}

.main-nav a::after{
  background: linear-gradient(90deg, #22c55e, #ffda79);
}

/* 4) Chips y tags que se llamaban "blue" */
.chip.blue{
  background: #dcfce7;
  color: #166534;
}

.cuento-tag{
  background: #dcfce7;
  color: #166534;
}

/* 5) Iconos azules (actividades) ahora verdes */
.icon-blue{
  background: linear-gradient(135deg, #86efac, #16a34a);
}

/* 6) Ajustes de blob para que no se sienta azul */
.hero-blob{
  background: radial-gradient(circle at 20% 0, #fff, #bff7cd);
}

/* 7) Botones: mantén el look rosa/amarillo (bonito para niños)
      pero si quieres el botón principal más verde, descomenta esto: */
/*
.btn-primary{
  background: linear-gradient(120deg, #22c55e, #ffda79);
  color: #0f2a1a;
}
*/

/* 8) Modo oscuro: conserva tu dark, pero cambia los azules a verdes */
body.tema-oscuro{
  --blue: #22c55e;
  --blue-strong: #16a34a;
}

/* Header oscuro con toquecito verde */
body.tema-oscuro .site-header{
  background: linear-gradient(120deg, #020617, #14532d);
}
/* Animación exclusiva para el título */
@keyframes pulso-letras {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Aplicar la animación solo al título del Hero */
.hero-title {
    display: inline-block; /* Importante para que la animación funcione bien */
    animation: pulso-letras 2s infinite alternate ease-in-out;
    font-family: 'Baloo 2', cursive;
}
/* --- ANIMACIONES --- */

/* 1. Pulso suave para las letras */
@keyframes pulso-letras {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* 2. Flotación para las figuritas 3D y formas */
@keyframes flotar-3d {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* --- APLICAR A LOS ELEMENTOS --- */

/* Solo a los títulos del Hero */
.hero-title {
    display: inline-block;
    animation: pulso-letras 2s infinite alternate ease-in-out;
}

/* A todas las caritas, emojis y círculos decorativos */
.smiley-3d, .decoracion, .circulo-deco, .cuadrado-curvo, .hero-visual i {
    display: inline-block;
    animation: flotar-3d 5s infinite ease-in-out;
}

/* Tip: Si quieres que no se muevan todas al mismo tiempo, 
   añade esto a algunas en el HTML: style="animation-delay: 1s;" */
   /* --- ANIMACIÓN DE RESPIRACIÓN O PULSO SUAVE --- */
@keyframes pulso-zen {
    0% { transform: scale(1); }
    100% { transform: scale(1.03); } /* Solo crece un 3%, casi imperceptible */
}

/* --- ANIMACIÓN DE FLOTE CALMADO --- */
@keyframes flote-calmado {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); } /* Sube poquito */
}

/* --- APLICAR A TODO EL SITIO --- */

/* 1. Títulos y Letras: Pulso muy lento (4 segundos) */
.hero-title, .section-title, .book-title, .char-name {
    display: inline-block;
    animation: pulso-zen 4s infinite alternate ease-in-out;
}

/* 2. Tarjetas (Cuentos, Personajes, Actividades): Pulso aún más lento */
.card-inicio, .char-card, .libro-portada, .story-card-pro {
    animation: pulso-zen 5s infinite alternate ease-in-out;
}

/* 3. Figuritas 3D y Emojis: Flote muy suave */
.smiley-3d, .decoracion, .hero-visual i, .book-icon {
    display: inline-block;
    animation: flote-calmado 6s infinite alternate ease-in-out;
}

/* 4. Botones: Pulso para que inviten a dar clic sin estresar */
.btn-inicio, .btn-ficha-magica, .theme-button {
    animation: pulso-zen 3s infinite alternate ease-in-out;
}
/* --- ANIMACIONES RÍTMICAS (NODO ESTUDIO) --- */

/* 1. Pulso Activo (Para letras y tarjetas) */
@keyframes pulso-activo {
    0% { transform: scale(1); }
    100% { transform: scale(1.04); } /* Un pelo más de crecimiento */
}

/* 2. Flote con Flow (Para figuritas y emojis) */
@keyframes flote-flow {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-12px) rotate(3deg); } /* Sube y gira tantito */
}

/* --- APLICAR A LOS ELEMENTOS --- */

/* Títulos y nombres: Pulso a 2.5s */
.hero-title, .section-title, .book-title, .char-name {
    display: inline-block;
    animation: pulso-activo 2.5s infinite alternate ease-in-out;
}

/* Tarjetas de Cuentos, Capítulos y Personajes: Pulso a 3s */
.card-inicio, .char-card, .libro-portada, .story-card-pro, .card-cuento {
    animation: pulso-activo 3s infinite alternate ease-in-out;
}

/* Figuritas 3D, Emojis e Iconos: Flote a 2.5s para que se vea alegre */
.smiley-3d, .decoracion, .hero-visual i, .book-icon, .card-icon-box {
    display: inline-block;
    animation: flote-flow 2.5s infinite alternate ease-in-out;
}

/* Botones: Pulso rápido para invitar al clic */
.btn-inicio, .btn-ficha-magica, .theme-button {
    animation: pulso-activo 2s infinite alternate ease-in-out;
}
/* --- EFECTO SUAVE PARA BOTONES (TRANSITIONS) --- */

.btn-inicio, .btn-ficha-magica, .theme-button, .card-inicio, .libro-portada {
    /* Esto es la clave: hace que todo cambio dure 0.3 segundos y sea fluido */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* 1. Al pasar el mouse (Hover) */
.btn-inicio:hover, .btn-ficha-magica:hover {
    transform: scale(1.05); /* Crece un poquito */
    filter: brightness(1.1); /* Brilla tantito */
}

/* 2. Al hacer clic (Active) - EL EFECTO DE HUNDIRSE */
.btn-inicio:active, .btn-ficha-magica:active, .theme-button:active, .card-inicio:active {
    transform: translateY(5px) scale(0.95) !important; /* Se hunde 5px y se achica */
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.2) !important; /* Sombra interna para realismo */
}

/* 3. Animación de rebote suave al soltar */
@keyframes rebote-click {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
/* --- EFECTO GELATINA (SÚPER SUAVE) --- */

.btn-inicio, .btn-ficha-magica, .theme-button, .card-inicio, .libro-portada, .logo-box {
    /* Aumentamos el tiempo a 0.6s para que la transición sea lenta y fluida */
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1) !important;
    cursor: pointer;
    backface-visibility: hidden; /* Evita parpadeos raros */
}

/* 1. Al pasar el mouse (Hover) - Se infla despacito */
.btn-inicio:hover, .btn-ficha-magica:hover, .logo-box:hover {
    transform: scale(1.08) translateY(-3px);
    filter: brightness(1.05);
}

/* 2. AL CLICAR (Active) - El hundimiento lento */
.btn-inicio:active, .btn-ficha-magica:active, .theme-button:active, .logo-box:active {
    /* El truco es que tarde lo mismo en bajar que en subir */
    transition: all 0.4s ease-out !important; 
    transform: translateY(8px) scale(0.92) !important;
    box-shadow: 0 2px 0 rgba(0,0,0,0.2) !important;
}

/* 3. Para las tarjetas, que el hundimiento sea más sutil */
.card-inicio:active, .libro-portada:active {
    transform: scale(0.96);
    transition: all 0.4s ease-out !important;
}