:root {
    --window-bg: #f2ebe3;
    --yellow: #f4c566;
    --teal: #69c0b8;
    --pink: #e99695;
    --purple: #622d8b;
    --border: 2px solid #333;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 60px;
}

.brand-logo {
    height: 70px; /* Ajusta según tu imagen */
    width: auto;
    display: block;
}
.logo-link {
    text-decoration: none;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.logo-link:hover {
    transform: scale(1.05);
}

.nav-link-minimal {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    font-family: 'American Typewriter', 'Courier New', Courier, monospace;
}

.nav-link-minimal:hover {
    color: #622d8b;
}

.btn-login {
    background: var(--purple);
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Capriola', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-login:hover {
    background: #7a3aab;
}


body {
    background-color: #ede8f5;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 38%, rgba(210, 195, 245, 0.45) 0%, transparent 70%),
        radial-gradient(#c4b8e0 1px, transparent 1px);
    background-size: 100% 100%, 22px 22px;
    background-attachment: fixed;
    font-family: 'American Typewriter', 'Courier New', Courier, monospace;
    margin: 0;
    color: #333;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Capriola', sans-serif;
}

/* Estilo de Ventana */
.window {
    background: var(--window-bg);
    border: var(--border);
    box-shadow: 4px 4px 0px #000;
    margin-bottom: 20px;
    overflow: hidden;
}

.hero-window {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13), 4px 4px 0px #333;
}

.window-header {
    border-bottom: var(--border);
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 25px;
}


.deco-buttons {
    height: 18px;
    width: auto;
    display: block;
}

.hero-window .window-header .controls,
.why-window .window-header .controls {
    margin-left: auto;
}

.window-header .title {
    font-size: 0.85rem;
    font-weight: bold;
}

.window-body {
    padding: 20px;
}

.quote-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 12px;
}

.quote-text {
    font-size: 0.85rem;
    line-height: 1.75;
    color: #333;
    margin: 0;
    font-style: normal;
}

.quote-footer {
    display: flex;
    justify-content: flex-end;
}

.quote-next {
    font-size: 0.8rem;
    color: var(--purple);
    text-decoration: none;
    font-weight: bold;
}

.quote-next:hover {
    text-decoration: underline;
}

.pomodoro-window {
    display: flex;
    flex-direction: column;
}

.pomodoro-window .window-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.pomodoro-window .tabs {
    align-self: flex-start;
}

.pomodoro-window .timer-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.window-body h1,
.window-body h2 {
    padding-left: 20px;
    margin-bottom: 10px;
}

/* container de bienvenida */
.hero-action-area {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px;
    min-height: 220px;
    width: 100%;
    box-sizing: border-box;
}

.hero-action-area h2 {
    padding-left: 0;
    margin-bottom: 0;
    font-size: 1.5rem;
    max-width: 240px;
    line-height: 1.4;
    text-align: left;
    align-self: flex-start;
}

.hero-cta {
    text-align: center;
    padding: 10px 20px 40px;
}


/* Animación flotante del globo */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-12px); }
}

/* El globo de texto estilo Pixel Art */
.pixel-speech {
    background-image: url('../assets/img/ui/nube.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 400px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    font-family: 'American Typewriter', 'Courier New', Courier, monospace;
    font-size: 1.7rem;
    font-weight: bold;
    color: #69c0b8;
    padding: 15px 30px 70px 30px;
    box-sizing: border-box;

    border: none !important;
    background-color: transparent !important;
    position: relative;
    margin: 0;
    animation: float 3s ease-in-out infinite;
}

.mood-text {
    display: inline;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.mood-text::after {
    content: '|';
    color: #69c0b8;
    animation: blink 0.7s step-end infinite;
}



/* Texto de abajo centrado */
.tagline {
    text-align: center;
    margin-top: 50px;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #444;
}

.tagline strong {
    font-size: 1.5rem;
    display: block;
    color: #222;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

/* Colores de cabecera */
.yellow { background-color: var(--yellow); }
.teal { background-color: var(--teal); }
.pink { background-color: var(--pink); }
.purple-light { background-color: #b8b8d1; }

/* Contenedores */
.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative;
}

.hero-heading {
    text-align: center;
    font-size: 2.6rem;
    font-weight: bold;
    margin: 0 0 36px;
    color: #222;
    line-height: 1.3;
}

.hero-subheading {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin: 0 0 30px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* ── Why Journaling Section ──────────────────────────────────────────────── */
.why-journaling-section {
    margin-top: 64px;
}

.section-heading {
    text-align: center;
    font-size: 1.45rem;
    font-weight: bold;
    color: #222;
    margin: 0 0 28px;
    letter-spacing: 0.2px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.why-window {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.why-window:hover {
    transform: translateY(-4px);
    box-shadow: 4px 8px 0px #000;
}

.why-window .window-body {
    padding: 22px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.why-icon {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.why-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #222;
    margin: 0;
    line-height: 1.3;
}

.why-text {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.65;
    margin: 0;
}

.scroll-cue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 24px 0 8px;
    opacity: 0.65;
    transition: opacity 0.4s ease;
    animation: scrollBob 2s ease-in-out infinite;
}

.scroll-cue.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-arrow {
    font-size: 1rem;
    line-height: 1;
    color: #222;
}

.scroll-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #222;
    text-transform: uppercase;
}

@keyframes scrollBob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(4px); }
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Tipografía y Botones */

.pixel-font {
    font-family: 'Press Start 2P', cursive;
    font-size: 72px;
    font-weight: 100;
    letter-spacing: -1px;
}

/* Tabs del Pomodoro */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.tabs button {
    padding: 10px 22px;
    border: 2px solid var(--teal);
    background: white;
    color: #333;
    font-family: inherit;
    font-size: 0.85rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.1s;
}

.tabs button:hover:not(.active) {
    background: #e0f4f2;
    color: #4aa89e;
    transform: translateY(-2px);
}

.tabs button:active {
    transform: translateY(1px);
}

.tabs button.active {
    background: var(--teal);
    color: #000;
    font-weight: bold;
}

/* Timer Display */
.timer-display {
    background: #ebe5db;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
}

/* Botones */
.btn-start {
    background: var(--purple);
    color: white;
    padding: 18px 35px;
    border: none;
    border-radius: 15px;
    font-family: 'Capriola', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    box-shadow: 0 6px 0px #4a1d6d;
    transition: all 0.15s ease;
}

.btn-start:hover {
    background: #7a3aab;
    transform: translateY(-3px);
    box-shadow: 0 9px 0px #4a1d6d, 0 0 18px rgba(98, 45, 139, 0.28);
}

.btn-start:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0px #4a1d6d;
}

.btn-timer {
    background: var(--teal);
    color: white;
    padding: 12px 40px;
    border: none;
    border-radius: 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0px #4fa89e;
    transition: all 0.15s ease;
}

.btn-timer:hover {
    background: #7acfc8;
    transform: translateY(-2px);
    box-shadow: 0 6px 0px #4fa89e;
}

.btn-timer:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0px #4fa89e;
}

.timer-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}

.btn-restart {
    background: transparent;
    border: 2px solid var(--teal);
    color: var(--teal);
    box-shadow: none;
}

.btn-restart:hover {
    background: #e0f4f2;
    transform: translateY(-2px);
}

.btn-restart:active {
    transform: none;
    box-shadow: none;
}

/* Footer */
.main-footer {
    background: #333;
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    max-width: 260px;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 1px;
    font-family: 'American Typewriter', 'Courier New', Courier, monospace;
}

.footer-login-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.footer-login-cta p {
    margin: 0;
    font-size: 0.8rem;
    color: #aaa;
    font-family: inherit;
}

.footer-links {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: #e99695;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    border-top: 1px solid #444;
}

.copyright {
    font-size: 0.75rem;
    color: #aaa;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: #e99695;
    text-decoration: none;
    font-size: 0.75rem;
}

.footer-bottom-links a:hover {
    text-decoration: underline;
}

/* categories */
/* Estilos específicos para la página de categorías */
.category-selection-body {
    text-align: center;
    padding: 40px !important;
}

.center-text {
    text-align: center;
    padding-left: 0 !important;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1rem;
    color: #555;
    margin-bottom: 40px;
}

/* La cuadrícula de 5 columnas */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

/* Las tarjetas de categorías individuales */
.category-card {
    background: #e6e1d8; /* Color de fondo de tus cards */
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 2px 2px 0px #000;
    color: #333;
}

.category-card:hover {
    transform: translateY(-5px);
    background: #fff;
}

.category-card span {
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-card img {
    width: 50px; /* Ajusta según el tamaño de tus PNGs */
    height: 50px;
    object-fit: contain;
}

/* Botones de acción inferiores */
.category-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.btn-surprise {
    background: #ebe5db;
    color: #333;
    padding: 18px 35px;
    border: 2px solid #333;
    border-radius: 15px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 0px #999;
}

.btn-surprise:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0px #999;
}

.category-card.selected {
    background-color: var(--teal);
    color: white;
    border-color: #000;
    transform: translateY(2px);
    box-shadow: 1px 1px 0px #000;
}

/* Para que las imágenes se vean blancas si el fondo es oscuro (opcional) */
.category-card.selected img {
    filter: none;
}

/* prompt page */
/* --- Estilos para prompt.html --- */


.prompt-container {
    display: flex;
    gap: 40px;
    padding: 60px 40px !important;
    align-items: flex-start;
}

/* Floating icon-only pill sidebar with glassmorphism */
.prompt-sidebar {
    display: flex;
    flex-direction: column;
    /* Frosted glass panel — feels premium without being heavy */
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 8px;
    gap: 2px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
    min-width: unset;
    width: fit-content;
    position: sticky;
    top: 100px;
    overflow: visible; /* required for tooltips to escape the container */
}

/* Icon-only buttons — 48×48 tap targets */
.side-btn {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    font-weight: normal;
    padding: 0;
    gap: 0;
    transition: background 0.2s ease, transform 0.15s ease;
}

.side-btn:hover {
    background: rgba(98, 45, 139, 0.08);
    transform: scale(1.1);
}

.side-btn:active {
    transform: scale(0.93);
}

.side-btn:last-child {
    border-bottom: none;
}

.side-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    pointer-events: none;
}

/* Tooltip: appears to the right on hover */
.side-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-family: 'Capriola', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 100;
}

.side-btn:hover::after {
    opacity: 1;
}

/* El Stack de Cartas */
.stack-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prompt-stack {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 350px;
    margin-bottom: 30px;
}

.stack-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 26px;
    top: 0;
    left: 0;
    /* Three-layer atmospheric shadow: micro-lift, ambient spread, diffuse halo */
    box-shadow:
        0 1px 3px  rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 16px 42px rgba(0, 0, 0, 0.05);
    /* Soft edge — top highlight simulates ambient light from above */
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.80);
    /* Base transition for parallax — overridden inline during stack animation */
    transition: transform 0.16s ease-out;
}

/* Deepest card — most faded, warm cream, slight clockwise tilt */
.card-1 {
    background: linear-gradient(148deg, #f5ede0 0%, #ede3d5 100%);
    transform: translateY(-28px) scale(0.91) rotate(1.2deg);
    z-index: 1;
    opacity: 0.58;
}

/* Middle card — soft lavender, counter-tilted for natural shuffle look */
.card-2 {
    background: linear-gradient(148deg, #ede8f6 0%, #e2dcf1 100%);
    transform: translateY(-16px) scale(0.95) rotate(-0.7deg);
    z-index: 2;
    opacity: 0.74;
}

/* Front background card — close to main, barely tilted */
.card-3 {
    background: linear-gradient(148deg, #e3dff4 0%, #d9d4ef 100%);
    transform: translateY(-7px) scale(0.98) rotate(0.3deg);
    z-index: 3;
    opacity: 0.88;
}

.main-prompt-card {
    position: absolute;
    width: 100%;
    height: 100%;
    /* Calm sage gradient — light at top-left, deepens toward bottom-right */
    background: linear-gradient(155deg, #c6e0c5 0%, #b6d4b5 55%, #a9cba8 100%);
    /* Soft edge with strong top highlight for 3-D lift illusion */
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-top: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 26px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    box-sizing: border-box;
    /* Four-layer shadow: inner highlight, micro-lift, ambient, deep diffuse */
    box-shadow:
        inset 0 1px 0   rgba(255, 255, 255, 0.62),
        0 2px  6px  rgba(0, 0, 0, 0.05),
        0 10px 28px rgba(0, 0, 0, 0.10),
        0 32px 72px rgba(0, 0, 0, 0.09);
}

/* Subtle grain texture — paper-like surface feel */
.main-prompt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.038;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* Better reading rhythm: normal weight, generous line-height */
.main-prompt-card p {
    font-size: 1.3rem;
    line-height: 1.75;
    font-weight: normal;
    color: #2d3748;
    letter-spacing: 0.05px;
    margin: 0;
}

/* Botones de acción */
.prompt-footer-btns {
    display: flex;
    gap: 20px;
}

.btn-secondary {
    background: white;
    color: #333;
    padding: 15px 40px;
    border: 2px solid #333;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 0px #999;
}

.btn-new-prompt {
    padding: 15px 40px !important;
}

/* Category badge — anchors the prompt to its theme */
.category-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(98, 45, 139, 0.09);
    color: var(--purple);
    border: 1px solid rgba(98, 45, 139, 0.18);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 0.7rem;
    font-family: 'Capriola', sans-serif;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 16px;
    align-self: flex-start;
    transition: color 0.3s ease, background 0.3s ease;
}

/* Card entrance: rises from slightly below with a gentle, controlled spring */
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(22px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/*
 * Card leave: floats upward with a calm counter-clockwise drift.
 * Opacity fades early so the exit feels light, not harsh.
 */
@keyframes cardLeave {
    0%   { opacity: 1;   transform: translateY(0)     scale(1)    rotate(0deg);  }
    55%  { opacity: 0.3; }
    100% { opacity: 0;   transform: translateY(-115%) scale(0.86) rotate(-5deg); }
}

.main-prompt-card.animating-in {
    /* Gentle spring overshoot — calm, not bouncy */
    animation: cardEntrance 0.38s cubic-bezier(0.34, 1.05, 0.64, 1) forwards;
}

/* Leaving card floats out; pointer-events off so it can't be clicked mid-flight */
.main-prompt-card.is-leaving {
    animation: cardLeave 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    pointer-events: none;
}

/* Favorite: scale-bounce when adding to favorites */
@keyframes favPulse {
    0%   { transform: scale(1);    }
    35%  { transform: scale(1.55); }
    65%  { transform: scale(0.88); }
    100% { transform: scale(1);    }
}

/* Locked state — shown when user is not logged in */
.side-btn.locked {
    opacity: 0.30;
    cursor: not-allowed;
}
.side-btn.locked:hover {
    background: transparent;
    transform: none;
}

/* Warm tint when a prompt is already favorited */
.side-btn[data-action="favorite"].is-favorited {
    background: rgba(239, 68, 68, 0.10);
}

.side-btn[data-action="favorite"].pulse {
    animation: favPulse 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Toast — slides up from the bottom, pill shape */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 22px;
    border-radius: 100px;
    font-family: 'Capriola', sans-serif;
    font-size: 0.82rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Spinner for "Generating…" loading state */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 7px;
}

/* Prevent hover lift while button is disabled */
.btn-new-prompt:disabled {
    opacity: 0.78;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 6px 0px #4a1d6d !important;
}

/* ── Music Player ──────────────────────────────────────────────────────── */
.music-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px !important;
}

/* Large centered transport controls */
.music-transport {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    padding: 4px 0;
}

.music-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #2a2a2a;
    padding: 4px;
    line-height: 1;
    font-family: inherit;
    transition: opacity 0.12s ease, transform 0.1s ease;
}
.music-btn:hover  { opacity: 0.5;  transform: scale(1.15); }
.music-btn:active { opacity: 0.9;  transform: scale(0.87); }

.transport-btn  { font-size: 2rem; }
.transport-btn img { height: 2rem; width: auto; display: block; }
.transport-play { font-size: 2.8rem; }
.transport-play img { height: 2rem; }

/* Thick retro progress bar */
.music-progress-track {
    width: 100%;
    height: 13px;
    background: #e8e3da;
    border: 2px solid #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}
.music-progress-fill {
    height: 100%;
    width: 0%;
    background: #2a2a2a;
    transition: width 0.8s linear;
}

/* Bottom row: small buttons + signal bars */
.music-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.music-playback-btns {
    display: flex;
    gap: 4px;
    align-items: center;
}
.small-music-btn { font-size: 1.1rem; }
.small-music-btn img { height: 1.1rem; width: auto; display: block; }

/* Pixel-art ascending signal bars */
.music-vol-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
}
.vol-bar {
    width: 7px;
    background: #e99695;
    border-radius: 1px 1px 0 0;
    min-height: 4px;
    transform-origin: bottom;
}

/* Ascending bar heights — replaces inline style="height:Xpx" */
.vol-bar:nth-child(1) { height: 5px;  }
.vol-bar:nth-child(2) { height: 10px; }
.vol-bar:nth-child(3) { height: 16px; }
.vol-bar:nth-child(4) { height: 22px; }
.vol-bar:nth-child(5) { height: 28px; }
.vol-bar:nth-child(6) { height: 32px; }
.vol-bar:nth-child(7) { height: 25px; }
.vol-bar:nth-child(8) { height: 17px; }
.vol-bar:nth-child(9) { height: 9px;  }

/* Animate bars while music is playing */
@keyframes volPulse {
    0%, 100% { transform: scaleY(1);    }
    50%       { transform: scaleY(0.55); }
}
.music-window.is-playing .vol-bar { animation: volPulse 0.55s ease-in-out infinite; }
.music-window.is-playing .vol-bar:nth-child(1) { animation-duration: 0.50s; }
.music-window.is-playing .vol-bar:nth-child(2) { animation-duration: 0.65s; animation-delay: 0.08s; }
.music-window.is-playing .vol-bar:nth-child(3) { animation-duration: 0.45s; animation-delay: 0.14s; }
.music-window.is-playing .vol-bar:nth-child(4) { animation-duration: 0.60s; animation-delay: 0.04s; }
.music-window.is-playing .vol-bar:nth-child(5) { animation-duration: 0.52s; animation-delay: 0.20s; }
.music-window.is-playing .vol-bar:nth-child(6) { animation-duration: 0.48s; animation-delay: 0.10s; }
.music-window.is-playing .vol-bar:nth-child(7) { animation-duration: 0.70s; animation-delay: 0.06s; }
.music-window.is-playing .vol-bar:nth-child(8) { animation-duration: 0.44s; animation-delay: 0.16s; }
.music-window.is-playing .vol-bar:nth-child(9) { animation-duration: 0.58s; animation-delay: 0.02s; }

/* ── Shared Modal Overlay (Settings + Login) ──────────────────────────────── */
.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.settings-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.settings-modal {
    background: #ede8f5;
    border: var(--border);
    box-shadow: 6px 6px 0px #000;
    border-radius: 4px;
    width: 380px;
    max-width: calc(100vw - 40px);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.22s cubic-bezier(0.34, 1.1, 0.64, 1);
}

.settings-overlay.open .settings-modal {
    transform: translateY(0) scale(1);
}

.settings-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: var(--border);
    background: var(--teal);
}

.settings-modal-header h3 {
    font-family: 'Capriola', sans-serif;
    font-size: 0.95rem;
    margin: 0;
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    color: #333;
    font-weight: bold;
    transition: background 0.15s;
}

.btn-close-modal:hover {
    background: rgba(0, 0, 0, 0.10);
}

.settings-modal-footer {
    padding: 0 24px 20px;
}

.btn-apply-settings {
    width: 100%;
    padding: 13px;
    background: var(--teal);
    color: #fff;
    border: 2px solid #333;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #4fa89e;
    transition: all 0.15s ease;
}

.btn-apply-settings:hover {
    background: #7acfc8;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #4fa89e;
}

.btn-apply-settings:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #4fa89e;
}

/* ── Login Modal ─────────────────────────────────────────────────────────── */
.login-modal-body {
    padding: 8px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-welcome {
    text-align: center;
    font-family: 'Capriola', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding-top: 8px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #444;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #e8e3da;
    font-family: inherit;
    font-size: 0.9rem;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--teal);
    background: white;
}

.login-input.input-error {
    border-color: var(--pink);
}

.login-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-terms {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #555;
    cursor: pointer;
}

.login-terms input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--purple);
    cursor: pointer;
    flex-shrink: 0;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #555;
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--teal);
    cursor: pointer;
}

.login-forgot {
    font-size: 0.78rem;
    color: #555;
    text-decoration: none;
}

.login-forgot:hover {
    color: var(--purple);
    text-decoration: underline;
}

.login-error-msg {
    font-size: 0.75rem;
    color: #c0392b;
    text-align: center;
    margin: -6px 0 0;
    min-height: 1em;
}

.login-modal-footer {
    padding: 0 24px 20px;
    text-align: center;
}

.login-modal-footer p {
    font-size: 0.78rem;
    color: #aaa;
    margin: 0;
}

.login-register {
    color: var(--purple);
    font-weight: bold;
    text-decoration: none;
}

.login-register:hover {
    text-decoration: underline;
}

/* ── Hamburger button ────────────────────────────────────────────────────── */
.hamburger-btn {
    display: none; /* shown via media query */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: var(--window-bg);
    border: 2px solid #333;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px;
    box-shadow: 2px 2px 0 #333;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.hamburger-btn:hover {
    box-shadow: 3px 3px 0 #333;
    transform: translateY(-1px);
}

.hamburger-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: transform 0.22s ease, opacity 0.22s ease;
    transform-origin: center;
}

.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu overlay ─────────────────────────────────────────────────── */
.mobile-menu {
    display: none; /* shown via media query */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 800;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 270px;
    height: 100%;
    background: var(--window-bg);
    border-left: 3px solid #333;
    box-shadow: -4px 0 0 #333;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.34, 1.05, 0.64, 1);
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 3px solid #333;
    background: var(--teal);
}

.mobile-menu-title {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 0.04em;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
    line-height: 1;
    padding: 0;
}

.mobile-menu-body {
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    gap: 4px;
    flex: 1;
}

.mobile-nav-link {
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'American Typewriter', 'Courier New', Courier, monospace;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.mobile-nav-link:hover {
    color: #622d8b;
    padding-left: 16px;
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 12px 0;
}

.mobile-nav-group {
    display: flex;
    flex-direction: column;
}

.mobile-nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-nav-arrow {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-arrow {
    transform: rotate(90deg);
}

.mobile-nav-submenu {
    display: none;
    flex-direction: column;
    padding-left: 16px;
}

.mobile-nav-submenu.open {
    display: flex;
}

.mobile-nav-sublink {
    text-decoration: none;
    color: #622d8b;
    font-size: 0.82rem;
    font-weight: bold;
    font-family: 'American Typewriter', 'Courier New', Courier, monospace;
    padding: 10px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: padding-left 0.15s ease;
}

.mobile-nav-sublink:hover {
    padding-left: 20px;
}

.mobile-menu-login {
    width: 100%;
    margin-top: auto;
}

/* === Responsividad === */
@media (max-width: 768px) {
    .main-header {
        padding: 14px 20px;
    }

    .header-left {
        gap: 20px;
    }

    .brand-logo {
        height: 50px;
    }

    /* hide desktop nav links + login on mobile */
    .nav-link-minimal {
        display: none;
    }

    .header-right .btn-login {
        display: none;
    }

    /* show hamburger + mobile menu on mobile */
    .hamburger-btn {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .container {
        margin: 20px auto;
        padding: 0 12px;
    }

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

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

    .hero-action-area {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .hero-action-area h2 {
        align-self: flex-start;
        text-align: left;
        font-size: 1.1rem;
    }

    .pixel-speech {
        width: 100%;
        max-width: 320px;
        height: 160px;
        font-size: 1.3rem;
        padding: 12px 20px 50px 20px;
        align-self: center;
    }

    .hero-cta {
        padding: 8px 20px 32px;
    }

    .hero-cta a {
        display: block;
    }

    .hero-cta .btn-start {
        width: 100%;
        box-sizing: border-box;
    }

    .hero-cta .hero-subheading {
        margin-bottom: 16px;
        font-size: 0.9rem;
    }

    .hero-heading {
        font-size: 1.6rem;
        margin-bottom: 32px;
        text-align: center;
    }

    .window-body h1 {
        font-size: 1.4rem;
    }

    .window-body h2 {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .tagline strong {
        font-size: 1.15rem;
    }

    .pixel-font {
        font-size: 48px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prompt-container {
        flex-direction: column;
        padding: 30px 20px !important;
    }

    .prompt-sidebar {
        flex-direction: row;
        min-width: unset;
        width: 100%;
        position: static;
        justify-content: center;
        border-radius: 16px;
    }

    .side-btn {
        flex: 1;
        max-width: 64px;
        border-bottom: none;
        border-right: none;
    }

    /* Tooltips appear above buttons on mobile */
    .side-btn::after {
        left: 50%;
        top: auto;
        bottom: calc(100% + 10px);
        transform: translateX(-50%);
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
    }

    .footer-logo-img {
        height: 48px;
    }

    .footer-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        align-self: center;
    }

    .footer-bottom {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}