/* --- Variables y Reseteo --- */
:root {
    --bg-color: #e8f6e5;
    --text-color: #333333;
    --heading-color: #2c3e50;
    --link-color: #34495e;
    --hover-color: #3498db;
    --action-color: #5cb85c;
    --action-hover-color: #4cae4c;
    --action-dark-color: #438d43;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --nav-bg: #eeeeee;
    --footer-bg: #f4f4f4;
    --border-color: #cccccc;
    --ui-font: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --content-font: "Roboto", sans-serif;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #181a1b;
    --text-color: #d4d4d4;
    --heading-color: #f0f0f0;
    --link-color: #cfd8dc;
    --hover-color: #5aa9f0;
    --card-bg: #232527;
    --header-bg: #232527;
    --nav-bg: #202224;
    --footer-bg: #1c1e1f;
    --border-color: #3a3d3f;
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

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

body {
    font-family: var(--ui-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Títulos Globales */
h1, h2, h3 {
    font-family: var(--content-font);
    color: var(--heading-color);
    /* margin-bottom: 20px; */
    font-weight: 700; /* Devuelto a negrita fuerte */
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--hover-color);
}

.action-button:hover,
.action-button:focus-visible {
    color: #fff;
    background-color: var(--game-button, var(--action-color)) !important;
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* --- Estructura Principal --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    background-color: var(--card-bg);
    min-height: 100vh;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

/* --- Cabecera y Menú --- */
header {
    width: 100%;
}

.banner-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

nav {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.theme-toggle img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Navegación y Migas de pan */
.brand, .brand a {
    font-family: var(--content-font);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading-color);
}

.breadcrumb-sep {
    color: var(--border-color);
    margin: 0 5px;
}

.breadcrumb-current {
    color: var(--text-color);
    opacity: 0.75;
}

.posts-list {
    list-style: none;
    padding-left: 0;
}

.posts-list-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.posts-list-date {
    display: inline-block;
    width: 100px;
    color: var(--text-color);
    opacity: 0.65;
    font-size: 0.9rem;
}

.posts-list-link {
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    font-family: var(--ui-font);
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    padding: 5px 10px;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
}

/* --- Contenido Estático (Home) --- */
main {
    padding: clamp(1rem, 2vw, 1.875rem);
    flex-grow: 1;
}

section {
    margin-bottom: 40px;
}

section h2 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    letter-spacing: 0.01em;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 25px;
}

section h2::before {
    content: "";
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--action-color);
}

.home-promo-title::before {
    background: #c5b42a;
}

#support h2::before {
    background: #ff5e5b;
}

#posts h2::before {
    background: var(--hover-color);
}

.support-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    background: linear-gradient(135deg, #fff8f0 0%, #ffe9e4 100%);
    border: 2px solid #dfe8df;
    border-radius: 18px;
    padding: 32px;
    flex-wrap: wrap;
    overflow: hidden;
}

.support-box-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 158, 120, 0.35) 0%, rgba(255, 158, 120, 0) 70%);
    pointer-events: none;
}

.support-box-icon-wrap {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #dfe8df;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.support-box-icon {
    width: 120px;
    height: 120px;
}

.support-box-content {
    flex: 1;
    min-width: 240px;
    position: relative;
    z-index: 1;
}

.support-box-heading {
    color: var(--heading-color);
    font-size: 1.35rem;
    margin: 0 0 8px;
}

.support-box-lead {
    color: var(--text-color);
    margin: 0 0 14px;
    font-size: 0.95rem;
}

.support-box-perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.support-box-perks li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.92rem;
}

.support-box-perk-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.support-box-perk-icon--star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e0a020;
    font-size: 1.1rem;
}

.support-box-kofi-widget {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .support-box {
        flex-direction: column;
        text-align: center;
        padding: 26px;
    }

    .support-box-perks li {
        justify-content: center;
    }

    .support-box-kofi-widget {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

.home-promo {
    margin: 0 0 32px;
}

.home-promo-title {
    font-size: clamp(1.3rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.home-promo-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border-radius: 18px;
    border: 2px solid #b9aa45;
    color: inherit;
    text-decoration: none;
    transition: filter 0.25s ease, box-shadow 0.25s ease;
}

.home-promo-showcase:hover,
.home-promo-showcase:focus-visible {
    filter: brightness(1.04) saturate(1.12);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.home-promo-showcase:focus-visible {
    outline: 3px solid #2f5d45;
    outline-offset: 3px;
}

.home-promo-product {
    display: grid;
    grid-template-columns: minmax(130px, 35%) 1fr;
    min-height: 272px;
    color: inherit;
    text-decoration: none;
}

.home-promo-product--yellow {
    background: linear-gradient(135deg, #fff8b5 0%, #f4df58 58%, #c5b42a 100%);
}

.home-promo-product--tail {
    background: linear-gradient(135deg, #fff4bd 0%, #e8c95a 52%, #a87932 100%);
    border-left: 2px solid #c8a95a;
}

.home-promo-image-wrap {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 10px;
    background: rgba(255, 255, 255, 0.28);
}

.home-promo-image {
    display: block;
    width: 100%;
    max-height: 218px;
    object-fit: contain;
    filter: drop-shadow(0 10px 10px rgba(40, 34, 15, 0.16));
}

.home-promo-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px 20px 18px;
    background: rgba(255, 253, 232, 0.42);
}

.home-promo-product--tail .home-promo-content {
    background: rgba(255, 247, 218, 0.68);
}

.home-promo-tag {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(30, 30, 30, 0.72);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.home-promo-product h3 {
    margin: 0 0 10px;
    font-size: clamp(1.05rem, 1.6vw, 1.45rem);
    line-height: 1.15;
    color: #1f2724;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}

.home-promo-product p {
    margin: 0;
    color: rgba(28, 38, 36, 0.8);
    font-size: 0.98rem;
    line-height: 1.5;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.65);
}

.home-promo-product--tail h3 {
    color: #302516;
}

.home-promo-product--tail p {
    color: #4b3925;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.home-promo-buy {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4b390e;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.65);
}

.home-promo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(31, 39, 36, 0.14);
}

.home-promo-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e1f1f;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.55);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #dfe8df;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 3px;
    transition: var(--transition);
}

.card:hover,
.card:focus-within {
    border-color: var(--action-color);
    box-shadow: 0 8px 20px rgba(76, 174, 76, 0.14);
}

.card--crystal {
    background: #c4e5ea;
    border-color: #8fc4ce;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.card--crystal:hover,
.card--crystal:focus-within {
    border-color: #5fa8b7;
    box-shadow: 0 8px 20px rgba(72, 143, 157, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.card--yellow {
    background: #fff0a6;
    border-color: #e6cc6b;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.card--yellow:hover,
.card--yellow:focus-within {
    border-color: #b88d12;
    box-shadow: 0 8px 20px rgba(170, 128, 20, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.card--pink {
    background: #f8dce7;
    border-color: #e6aac0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.card--pink:hover,
.card--pink:focus-within {
    border-color: #c2688b;
    box-shadow: 0 8px 20px rgba(194, 91, 122, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.card--emerald {
    background: #b7d8bd;
    border-color: #79ad84;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.card--emerald:hover,
.card--emerald:focus-within {
    border-color: #4c9462;
    box-shadow: 0 8px 20px rgba(52, 135, 90, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.card--emerald-cross {
    background: #b7d2df;
    border-color: #7da8bc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.card--emerald-cross:hover,
.card--emerald-cross:focus-within {
    border-color: #5e8ca5;
    box-shadow: 0 8px 20px rgba(69, 125, 153, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.card--unova {
    background: #c7cbce;
    border-color: #858d92;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.card--unova:hover,
.card--unova:focus-within {
    border-color: #5e6870;
    box-shadow: 0 8px 20px rgba(67, 77, 84, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.game-img-container {
    width: 100%;
    position: relative;
    min-height: 184px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background-color: #eee;
    overflow: hidden;
}

.card--crystal .game-img-container {
    background-color: #b5dfe5;
    isolation: isolate;
}

.card--crystal .game-img-container::before {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.92) 0 0.7px, transparent 1.15px),
        radial-gradient(circle at 36% 74%, rgba(255, 255, 255, 0.82) 0 0.65px, transparent 1.05px),
        radial-gradient(circle at 62% 22%, rgba(255, 255, 255, 0.9) 0 0.7px, transparent 1.15px),
        radial-gradient(circle at 86% 62%, rgba(255, 255, 255, 0.8) 0 0.65px, transparent 1.05px),
        radial-gradient(circle at 74% 88%, rgba(255, 255, 255, 0.76) 0 0.65px, transparent 1.05px),
        radial-gradient(circle at 48% 44%, rgba(255, 255, 255, 0.74) 0 0.55px, transparent 0.95px),
        radial-gradient(circle at 22% 86%, rgba(255, 255, 255, 0.76) 0 0.6px, transparent 1px),
        radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.8) 0 0.65px, transparent 1.05px),
        radial-gradient(circle at 14% 52%, rgba(255, 255, 255, 0.8) 0 0.65px, transparent 1.05px),
        radial-gradient(circle at 58% 66%, rgba(255, 255, 255, 0.76) 0 0.6px, transparent 1px),
        radial-gradient(circle at 80% 28%, rgba(255, 255, 255, 0.82) 0 0.7px, transparent 1.1px),
        radial-gradient(circle at 30% 32%, rgba(255, 255, 255, 0.72) 0 0.55px, transparent 0.95px),
        radial-gradient(circle at 66% 58%, rgba(255, 255, 255, 0.9) 0 0.7px, transparent 1.15px),
        radial-gradient(circle at 18% 72%, rgba(255, 255, 255, 0.8) 0 0.6px, transparent 1px),
        radial-gradient(circle at 42% 12%, rgba(255, 255, 255, 0.78) 0 0.6px, transparent 1px),
        radial-gradient(circle at 84% 82%, rgba(255, 255, 255, 0.8) 0 0.6px, transparent 1px),
        radial-gradient(circle at 52% 82%, rgba(255, 255, 255, 0.75) 0 0.55px, transparent 0.95px);
    background-repeat: repeat-x;
    background-size: 120px 100%;
    content: "";
    opacity: 0.98;
    pointer-events: none;
    z-index: 0;
    animation: none;
}

.card--crystal:hover .game-img-container::before,
.card--crystal:focus-within .game-img-container::before {
    animation: crystal-scroll 1.3s linear infinite;
}

.card--crystal .game-img {
    position: relative;
    z-index: 1;
}

@keyframes crystal-scroll {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 120px 0;
    }
}

.card--yellow .game-img-container {
    background-color: #fbe88f;
}

.card--pink .game-img-container {
    background-color: #f4cddd;
}

.card--emerald .game-img-container {
    background-color: #9dc7a5;
}

.card--emerald-cross .game-img-container {
    background-color: #a7c8d6;
}

.card--unova .game-img-container {
    background-color: #adb4b8;
}

.game-img {
    width: 240px;
    height: 160px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px 6px 0 0;
}

.card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-align: left;
}

.card-link:hover,
.card-link:focus-visible {
    color: inherit;
}

.card-body {
    flex: 1;
    padding: 10px 15px 4px;
    background: #f7faf7;
    border-top: 1px solid #e8efe8;
}

.card--crystal .card-body,
.card--crystal .card-footer {
    background: #e5f5f7;
}

.card--yellow .card-body,
.card--yellow .card-footer {
    background: #fffbe8;
}

.card--pink .card-body,
.card--pink .card-footer {
    background: #fff7fa;
}

.card--emerald .card-body,
.card--emerald .card-footer {
    background: #eaf6ec;
}

.card--emerald-cross .card-body,
.card--emerald-cross .card-footer {
    background: #edf6f9;
}

.card--unova .card-body,
.card--unova .card-footer {
    background: #eceeef;
}

.card-body h3 {
    margin: 0 0 6px;
    font-size: 1.22rem;
    line-height: 1.25;
    text-align: center;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 15px 10px;
    background: #f7faf7;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.card-action--primary {
    gap: 5px;
    background: var(--action-dark-color);
    color: #fff;
}

.card-action-icon {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.card-action--primary:hover,
.card-action--primary:focus-visible {
    background: var(--action-dark-color);
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.card-action--crystal {
    background: #4f9baa;
}

.card-action--crystal:hover,
.card-action--crystal:focus-visible {
    background: #4f9baa;
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.card-action--yellow {
    background: #b8860b;
}

.card-action--yellow:hover,
.card-action--yellow:focus-visible {
    background: #b8860b;
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.card-action--pink {
    background: #c45b7a;
}

.card-action--pink:hover,
.card-action--pink:focus-visible {
    background: #c45b7a;
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.card-action--emerald {
    background: #34875a;
}

.card-action--emerald:hover,
.card-action--emerald:focus-visible {
    background: #34875a;
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.card-action--emerald-cross {
    background: #457d99;
}

.card-action--emerald-cross:hover,
.card-action--emerald-cross:focus-visible {
    background: #457d99;
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.card-action--unova {
    background: #4d5961;
}

.card-action--unova:hover,
.card-action--unova:focus-visible {
    background: #4d5961;
    filter: brightness(1.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62), 0 3px 10px rgba(0, 0, 0, 0.12);
    color: #fff;
}

.card-action--secondary {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(92, 105, 92, 0.32);
    color: #2c3e50;
}

.card-action--secondary:hover,
.card-action--secondary:focus-visible {
    background: #fff;
    border-color: rgba(92, 105, 92, 0.52);
    color: #2c3e50;
}

@media (max-width: 420px) {
    .card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.social-card .social-img-container {
    height: 120px;
    background-color: #fdfdfd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-card img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* ==========================================================================
   ESTILOS PARA MARKDOWN (Páginas de Juegos y Blog)
   ========================================================================== */

.game-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

.game-hero {
    margin: 0 0 28px;
}

.game-cover-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    width: 100%;
    padding: 12px 20px 10px;
    border-radius: 14px;
    background: var(--game-card-bg, #f8f8f8);
    border: 1px solid var(--game-border, rgba(85, 98, 85, 0.55));
    box-shadow: 0 10px 26px rgba(25, 30, 28, 0.08);
    overflow: hidden;
}

.game-cover-shell > * {
    position: relative;
    z-index: 1;
}

.game-page--crystal .game-cover-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.88) 0 0.7px, transparent 1.1px),
        radial-gradient(circle at 36% 74%, rgba(255, 255, 255, 0.72) 0 0.65px, transparent 1px),
        radial-gradient(circle at 62% 22%, rgba(255, 255, 255, 0.82) 0 0.75px, transparent 1.1px),
        radial-gradient(circle at 86% 62%, rgba(255, 255, 255, 0.76) 0 0.65px, transparent 1px),
        radial-gradient(circle at 74% 88%, rgba(255, 255, 255, 0.66) 0 0.7px, transparent 1.05px),
        radial-gradient(circle at 48% 44%, rgba(255, 255, 255, 0.58) 0 0.55px, transparent 0.95px),
        radial-gradient(circle at 22% 86%, rgba(255, 255, 255, 0.52) 0 0.55px, transparent 0.95px),
        radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.62) 0 0.6px, transparent 1px);
    background-size: 19px 17px, 23px 21px, 17px 24px, 26px 18px, 21px 25px, 15px 20px, 24px 16px, 18px 23px;
    opacity: 0.9;
    pointer-events: none;
    animation: crystal-glitter 12s linear infinite;
    z-index: 0;
}

.game-cover-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 auto;
}

.game-cover-art {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 160px;
    max-width: 100%;
    max-height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
}

.game-cover-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    background: rgba(255,255,255,0.08);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.game-cover-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--game-border, rgba(85, 98, 85, 0.4));
    border-radius: 12px;
    background: var(--game-panel-bg, #f6f9f6);
}

.game-cover-title-wrap h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-align: left;
    color: var(--heading-color, #1c1c1c);
}

.game-cover-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--game-border, rgba(85, 98, 85, 0.4)) 72%, transparent);
    color: #4e4e4e;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    text-transform: none;
}

.game-cover-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.game-download-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 26px 0 12px;
}

.game-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 0;
    padding: 12px 22px;
    border-radius: 8px;
    background: var(--game-button, var(--action-color));
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    line-height: 1;
    min-height: 46px;
    width: auto;
    max-width: 240px;
}

.game-header-button img {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.game-header-button:hover,
.game-header-button:focus-visible {
    filter: brightness(1.06);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
    color: #fff;
}

.game-header-button--secondary {
    background: transparent;
    color: var(--game-button, var(--action-color));
    box-shadow: none;
    border: 2px solid var(--game-button, var(--action-color));
}

.game-header-button--secondary:hover,
.game-header-button--secondary:focus-visible {
    background: var(--game-button, var(--action-color));
    color: #fff;
}

@media (max-width: 700px) {
    .home-promo-showcase {
        grid-template-columns: 1fr;
    }

    .home-promo-product {
        grid-template-columns: 34% 1fr;
        min-height: 238px;
    }

    .home-promo-product--tail {
        border-left: 0;
        border-top: 2px solid #c8a95a;
    }

    .home-promo-image-wrap {
        padding: 14px 8px;
    }

    .home-promo-content {
        padding: 18px 16px 16px;
    }

    .home-promo-product h3 {
        font-size: 1.12rem;
    }

    .home-promo-product p {
        font-size: 0.88rem;
        line-height: 1.4;
    }

    .game-cover-shell {
        flex-direction: column;
        align-items: stretch;
    }

    .game-cover-art {
        flex-basis: auto;
        width: 100%;
    }

    .game-cover-title-wrap h1 {
        text-align: center;
    }
}

.post-content, .game-content {
    font-family: var(--content-font);
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

.post-content h1, .game-content h1 {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

/* Títulos de secciones (Story, Features...) */
.post-content h2, .game-content h2 {
    font-size: 1.75rem; /* Tamaño ajustado, ni gigante ni pequeño */
    margin-top: 1em;
    margin-bottom: 15px;
    border-bottom: none;
    padding-bottom: 0;
    font-weight: 700; /* Negrita */
}

.post-content h3, .game-content h3 {
    font-size: 1.4rem;
    margin-top: 1.2em;
    font-weight: 700;
}

.post-content p, .game-content p {
    margin-bottom: 0.3em;
}

/* Listas compactas e indentadas hacia adentro */
.post-content ul, .game-content ul,
.post-content ol, .game-content ol {
    margin-bottom: 1.5em;
    padding-left: 2.5em; /* Sangría correcta para alinear los puntos */
}

.post-content li, .game-content li {
    margin-bottom: 0.2em; /* Puntos muy juntos */
}

/* Líneas separadoras hr */
.post-content hr, .game-content hr {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 1.2em 0;
}

.post-content hr + h2, .game-content hr + h2,
.post-content hr + h3, .game-content hr + h3 {
    margin-top: 0.5em;
}

/* Limpieza de imágenes */
.post-content img, .game-content img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent;
}

/* El logo centrado del juego */
img.logo-juego {
    max-width: 350px !important;
    margin: 0 auto 2.5em auto !important;
}

/* Estilos para código en línea */
.post-content code, .game-content code {
    background-color: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 10px 30px 10px;
}

.saves-page {
    width: 100%;
}

.saves-page > h1 {
    margin-bottom: 8px;
}

.page-title-accent {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

.saves-page > h1.page-title-accent {
    margin-bottom: 25px;
}

.page-title-accent::before {
    content: "";
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--action-color);
}

.page-title-accent--saves::before {
    background: var(--hover-color);
}

.page-title-accent--artwork::before {
    background: #ff5e5b;
}

.page-title-accent--patcher::before {
    background: #c5b42a;
}

.saves-game {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--game-card-bg, #fff);
    border-color: var(--game-border, var(--border-color));
}

.saves-game h2 {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 1.35rem;
}

.saves-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    padding: 8px 10px;
    border-radius: 5px;
    background: var(--game-panel-bg, #f7faf7);
    cursor: pointer;
    list-style: none;
}

.saves-toggle::-webkit-details-marker {
    display: none;
}

.saves-toggle h2 {
    flex: 1;
}

.saves-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--game-border, #b9c5b9);
    border-radius: 50%;
    color: var(--game-button, var(--action-dark-color));
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
}

.saves-toggle:hover .saves-toggle-icon,
.saves-toggle:focus-visible .saves-toggle-icon {
    background: var(--game-button, var(--action-dark-color));
    color: #fff;
}

.saves-game[open] .saves-toggle-icon {
    font-size: 0;
}

.saves-game[open] .saves-toggle-icon::before {
    content: "−";
    font-size: 1.25rem;
}

.saves-game[open] .saves-toggle {
    margin-bottom: 14px;
}

.saves-list {
    display: grid;
    gap: 10px;
}

.save-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--game-border, #d9dfd9);
    border-radius: 6px;
    background: var(--game-panel-bg, #f7faf7);
}

.save-item h3,
.save-item p {
    margin: 0;
}

.save-item h3 {
    font-size: 1rem;
}

.save-item p {
    color: #666;
    font-size: 0.88rem;
}

.save-item .save-author {
    margin-top: 2px;
    font-size: 0.8rem;
    font-weight: 700;
}

.save-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 32px;
    padding: 7px 12px;
    border: 0;
    border-radius: 5px;
    background: var(--game-button, var(--action-dark-color));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.game-page .save-section {
    margin: 30px 0;
    padding: 18px;
    border: 1px solid var(--game-border, var(--border-color));
    border-radius: 8px;
    background: var(--game-card-bg, #fff);
}

.game-page .save-section h2 {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 1.35rem;
}

.game-page .saves-toggle {
    margin: 0;
}

.game-page .save-section[open] .saves-toggle {
    margin-bottom: 14px;
}

.boxart-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
}

.boxart-category {
    margin-bottom: 0;
}

.boxart-category-title {
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 1.05rem;
    color: var(--game-button, var(--action-dark-color));
}

.boxart-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.boxart-item {
    display: flex;
    flex: 0 0 140px;
    width: 140px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--game-border, #d9dfd9);
    border-radius: 6px;
    background: var(--game-panel-bg, #f7faf7);
    color: inherit;
    cursor: zoom-in;
}

.boxart-item:hover,
.boxart-item:focus-visible {
    border-color: var(--game-button, var(--action-color));
    color: inherit;
}

.boxart-image {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: contain;
    padding: 8px;
    background: #fff;
}

.boxart-caption {
    padding: 8px 10px;
    font-size: 0.85rem;
}

.boxart-caption .save-author {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    font-weight: 700;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(20, 20, 20, 0.88);
    z-index: 1000;
}

.lightbox:target {
    display: flex;
}

.lightbox--closed {
    display: none !important;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.lightbox img {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}

.lightbox-close {
    position: absolute;
    z-index: 2;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    text-decoration: none;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    color: #fff;
    opacity: 0.75;
}

@media (max-width: 600px) {
    .boxart-categories {
        gap: 18px;
    }

    .boxart-grid {
        gap: 10px;
    }

    .boxart-item {
        flex-basis: 110px;
        width: 110px;
    }

    .boxart-image {
        height: 110px;
    }

    .lightbox {
        padding: 16px;
    }
}

.game-related-posts {
    margin: 28px 0 18px;
    padding: 18px 20px;
    border: 1px solid rgba(90, 103, 110, 0.18);
    border-radius: 12px;
    background: #f3f3f3;
    box-shadow: 0 6px 16px rgba(25, 30, 28, 0.1), inset 0 1px 0 rgba(255,255,255,0.7);
}

.game-related-posts h2 {
    margin: 0 0 12px;
    padding: 0;
    border: none;
    font-size: 1.7rem;
    line-height: 1.2;
}

.game-related-posts ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.game-related-posts li {
    margin: 0;
    padding: 0;
}

.game-related-posts a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border-radius: 0;
    color: var(--heading-color);
    background: transparent;
    border: none;
    transition: var(--transition);
}

.game-related-posts a::before {
    content: "•";
    color: var(--game-button, var(--action-dark-color));
    font-size: 1.1rem;
    line-height: 1;
}

.game-related-posts a:hover,
.game-related-posts a:focus-visible {
    background: transparent;
    border: none;
    transform: none;
    color: var(--heading-color);
}

@media (max-width: 600px) {
    .save-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 24px;
}

.site-footer p {
    font-family: var(--content-font);
    color: #2b4566;
    font-size: 1.05rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.site-social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 24px;
}

.site-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--heading-color);
    text-decoration: none;
    padding: 0;
    border-radius: 0;
    transition: none;
    line-height: 1;
}

.site-social-links a:hover {
    background: transparent;
    color: var(--heading-color);
}

.site-social-links svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
}

.site-social-icon {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

[data-theme="dark"] .site-social-icon--x {
    filter: invert(1);
}

@media (max-width: 720px) {
    .site-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

.kofi-floating-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--action-color);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(92, 184, 92, 0.25);
    z-index: 9999;
}

.kofi-floating-button:hover,
.kofi-floating-button:focus-visible {
    color: #fff;
    background: var(--action-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(76, 174, 76, 0.32);
}

.kofi-floating-button__logo {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

@media (min-width: 1200px) {
    .kofi-floating-button {
        display: inline-flex;
    }
}

/* --- Media Queries (Responsividad) --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        gap: 15px;
        z-index: 10;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
}

/* Estilos base para todas las alertas */
.alert {
  padding: 16px 20px;
  margin-bottom: 20px;
  border-radius: 4px; /* Entre 3 y 5px como pediste */
  border-width: 2px;  /* 2px para que el borde se note bien */
  border-style: solid;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

/* Soporte para enlaces dentro de las alertas */
.alert a {
  color: inherit; /* Hereda el color oscuro del texto de la alerta */
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.alert a:hover {
  opacity: 0.75;
}

/* --- Variantes de color --- */

/* Primary (Azul) */
.alert-primary {
  background-color: #d0e2ff;
  border-color: #a6c8ff;
  color: #002379; /* Alto contraste */
}

/* Secondary (Gris) */
.alert-secondary {
  background-color: #e5e5e5;
  border-color: #cccccc;
  color: #333333;
}

/* Success (Verde) */
.alert-success {
  background-color: #d2f4d6;
  border-color: #a8e6b0;
  color: #0a4d1a;
}

/* Danger (Rojo) */
.alert-danger {
  background-color: #ffd7d9;
  border-color: #ffb3b8;
  color: #7d0006;
}

/* Warning (Amarillo) */
.alert-warning {
  background-color: #ffebb6;
  border-color: #ffd166;
  color: #5c3800;
}

/* Info (Celeste) */
.alert-info {
  background-color: #d0f0fd;
  border-color: #9cdbf9;
  color: #004368;
}

/* Agrupación del input y el botón */
.input-group {
    display: flex;
    gap: 12px; /* Espacio entre el campo de texto y el botón */
    margin-bottom: 24px;
}

/* Campo de email */
.input-group input {
    flex: 1; /* Ocupa todo el espacio disponible */
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    border: 1px solid #d4d4d4; /* Borde gris similar a la card de Pokémon */
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto al hacer clic en el input */
.input-group input:focus {
    outline: none;
    border-color: #273c53;
    box-shadow: 0 0 0 3px rgba(39, 60, 83, 0.15);
}

/* Botón inspirado en "View all posts" */
.input-group button {
    background-color: #273c53; /* El color exacto del botón de tu imagen */
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.input-group button:hover {
    background-color: #1d2d3e; /* Un tono más oscuro al pasar el ratón */
}

/* --- ESTILOS PARA LOS MENSAJES DE RESULTADO --- */
#result {
    display: none; /* Oculto por defecto */
    padding: 16px 20px;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    border-width: 2px;
    border-style: solid;
}

/* Mensaje de éxito */
#result.success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* Mensaje de error */
#result.error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Enlace dentro del resultado */
#result a {
    display: inline-block;
    margin-top: 8px;
    color: #273c53; /* Azul oscuro corporativo */
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-all; /* Evita que el enlace largo rompa el diseño en móviles */
    transition: color 0.2s;
}

#result a:hover {
    color: #4a6583;
}

/* Diseño responsivo para móviles */
@media (max-width: 480px) {
    .input-group {
        flex-direction: column; /* Pone el botón debajo del input en pantallas pequeñas */
    }

    .input-group button {
        width: 100%; /* Botón de ancho completo en móviles */
    }
}

/* --- GBA ROM Patcher --- */
.patcher-page {
    width: 100%;
    padding: 0 0 30px;
    font-family: var(--ui-font);
}

.patcher-hero {
    margin: 0 0 28px;
}

.patcher-hero h1.page-title-accent {
    margin: 0 0 25px;
    font-size: 2rem;
}

.patcher-hero p:last-child {
    margin: 0;
    color: #65748a;
}

.patcher-eyebrow,
.patcher-step {
    margin: 0 0 8px;
    color: var(--action-dark-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.patcher-card {
    margin: 14px 0;
    padding: 20px;
    border: 1px solid rgba(90, 103, 110, 0.18);
    border-radius: 8px;
    background: #f3f3f3;
    box-shadow: 0 6px 16px rgba(25, 30, 28, 0.1), inset 0 1px 0 rgba(255,255,255,0.7);
}

.patcher-card h2 {
    margin: 0 0 13px;
    font-size: 1.1rem;
}

.patcher-card input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.patcher-file-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 14px;
    border: 1px solid #a9c4aa;
    border-radius: 6px;
    background: #edf7ec;
    color: var(--heading-color);
    font-weight: 750;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.patcher-file-button:hover,
.patcher-file-button:focus-visible {
    border-color: var(--action-color);
    background: #e1f2df;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.15);
}

.patcher-file-name {
    margin: 10px 0 0;
    color: #65748a;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.patcher-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.patcher-info div {
    min-width: 0;
    padding: 10px;
    border-radius: 6px;
    background: #edf5ec;
}

.patcher-info b {
    display: block;
    margin-bottom: 3px;
    color: #65748a;
    font-size: 0.72rem;
}

.patcher-info span {
    display: block;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.8rem;
}

.patcher-action-card {
    background: #f3f3f3;
}

.patcher-apply {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 6px;
    background: var(--action-dark-color);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.patcher-apply:hover,
.patcher-apply:focus-visible {
    background: var(--action-hover-color);
    box-shadow: 0 5px 14px rgba(76, 174, 76, 0.24);
}

.patcher-apply:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.patcher-progress {
    height: 8px;
    margin: 16px 0 12px;
    overflow: hidden;
    border-radius: 99px;
    background: #dce8dc;
}

.patcher-progress div {
    width: 0;
    height: 100%;
    background: var(--action-color);
    transition: width 0.08s;
}

.patcher-status {
    margin: 0;
    color: #536276;
    white-space: pre-wrap;
    line-height: 1.45;
}

.patcher-success {
    color: #26733a;
}

.patcher-error {
    color: #a23737;
}

.patcher-note {
    max-width: 620px;
    margin: 20px auto;
    color: #65748a;
    font-size: 0.84rem;
    line-height: 1.5;
    text-align: center;
}

.patcher-terminal {
    margin: 18px 0 0;
    overflow: hidden;
    border: 1px solid #1e2935;
    border-radius: 5px;
    background: #050706;
    box-shadow: 0 6px 18px rgba(25, 48, 32, 0.16);
}

.patcher-terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #263342;
    background: #1b2026;
}

.patcher-terminal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.patcher-terminal-window-title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
}

.patcher-terminal-window-title h2 {
    margin: 0;
    overflow: hidden;
    color: #c4ccd4;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.82rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patcher-terminal-toggle,
.patcher-copy-logs {
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #47644b;
    border-radius: 4px;
    background: #1c2c20;
    color: #c7e4c7;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.patcher-terminal-toggle:hover,
.patcher-terminal-toggle:focus-visible,
.patcher-copy-logs:hover,
.patcher-copy-logs:focus-visible {
    border-color: #78ad84;
    background: #29432f;
    color: #fff;
}

.patcher-logs {
    min-height: 132px;
    max-height: 260px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    background: #050706;
    color: #c4f5bd;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.patcher-log-line {
    color: #fff;
}

.patcher-log-time {
    color: #8da2bd;
}

.patcher-log-type {
    color: #9da9b8;
}

.patcher-log-type--ready {
    color: #78ad84;
}

.patcher-log-type--success {
    color: #86efac;
}

.patcher-log-type--error {
    color: #fca5a5;
}

@media (max-width: 560px) {
    .patcher-page {
        padding-top: 0;
    }

    .patcher-card {
        padding: 16px;
    }

    .patcher-info {
        grid-template-columns: 1fr;
    }

    .patcher-terminal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .patcher-terminal-actions {
        width: 100%;
    }

    .patcher-terminal-toggle,
    .patcher-copy-logs {
        flex: 1;
    }
}

.spoiler {
    background-color: #111214; /* Fondo casi negro */
    color: transparent;        /* Texto invisible */
    cursor: pointer;           /* Cursor de click */
    border-radius: 4px;
    padding: 0 4px;
    user-select: none;         /* Evita seleccionar el texto oculto */
    transition: background-color 0.1s ease;
}

/* Efecto al pasar el ratón por el spoiler oculto */
.spoiler:hover {
    background-color: #1e1f22;
}

/* Estilo del Spoiler Revelado */
.spoiler.revealed {
    background-color: #2b2d31; /* Fondo gris oscuro */
    color: inherit;            /* Restaura el color del texto */
    cursor: text;              /* Cursor de texto normal */
    user-select: text;         /* Permite seleccionar el texto */
}

/* ==========================================================================
   MODO OSCURO: ajustes de texto, bordes y paneles que no usaban variables
   ========================================================================== */
[data-theme="dark"] .nav-links a {
    color: var(--text-color);
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a:focus-visible {
    color: #ffffff;
}

[data-theme="dark"] section h2,
[data-theme="dark"] .page-title-accent {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .post-content,
[data-theme="dark"] .game-content {
    color: var(--text-color);
}

[data-theme="dark"] .post-content hr,
[data-theme="dark"] .game-content hr {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .post-content code,
[data-theme="dark"] .game-content code {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ff9ec2;
}

[data-theme="dark"] .social-card .social-img-container {
    background-color: #2a2c2e;
}

/* Sombra de hover más brillante para que destaque sobre el fondo oscuro */
[data-theme="dark"] .card:hover,
[data-theme="dark"] .card:focus-within {
    box-shadow: 0 0 22px rgba(76, 174, 76, 0.45), 0 10px 26px rgba(76, 174, 76, 0.4);
}

[data-theme="dark"] .card--crystal:hover,
[data-theme="dark"] .card--crystal:focus-within {
    box-shadow: 0 0 22px rgba(95, 168, 183, 0.5), 0 10px 26px rgba(95, 168, 183, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .card--yellow:hover,
[data-theme="dark"] .card--yellow:focus-within {
    box-shadow: 0 0 22px rgba(230, 175, 30, 0.5), 0 10px 26px rgba(230, 175, 30, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .card--pink:hover,
[data-theme="dark"] .card--pink:focus-within {
    box-shadow: 0 0 22px rgba(194, 104, 139, 0.5), 0 10px 26px rgba(194, 104, 139, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .card--emerald:hover,
[data-theme="dark"] .card--emerald:focus-within {
    box-shadow: 0 0 22px rgba(76, 148, 98, 0.5), 0 10px 26px rgba(76, 148, 98, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .card--emerald-cross:hover,
[data-theme="dark"] .card--emerald-cross:focus-within {
    box-shadow: 0 0 22px rgba(94, 140, 165, 0.5), 0 10px 26px rgba(94, 140, 165, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .card--unova:hover,
[data-theme="dark"] .card--unova:focus-within {
    box-shadow: 0 0 22px rgba(158, 174, 184, 0.5), 0 10px 26px rgba(158, 174, 184, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .support-box {
    background: linear-gradient(135deg, #2a2622 0%, #2b201f 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .support-box-icon-wrap {
    background: #232527;
    border-color: var(--border-color);
}

[data-theme="dark"] .game-cover-shell {
    background: var(--game-card-bg, #26282a);
    border-color: var(--game-border, var(--border-color));
}

[data-theme="dark"] .game-cover-title-wrap {
    background: var(--game-panel-bg, #26282a);
    border-color: var(--game-border, var(--border-color));
}

/* Los paneles con colores de juego (card_palette) son siempre claros: se fuerza texto oscuro */
[data-theme="dark"] .card-body h3,
[data-theme="dark"] .saves-toggle h2,
[data-theme="dark"] .save-item h3,
[data-theme="dark"] .save-item strong,
[data-theme="dark"] .game-cover-title-wrap h1,
[data-theme="dark"] .boxart-caption strong {
    color: #1c1c1c;
}

[data-theme="dark"] .game-cover-meta,
[data-theme="dark"] .save-item .save-author,
[data-theme="dark"] .boxart-caption .save-author {
    color: #4e4e4e;
}

[data-theme="dark"] .saves-game,
[data-theme="dark"] .game-page .save-section {
    background: var(--game-card-bg, #232527);
    border-color: var(--game-border, var(--border-color));
}

[data-theme="dark"] .saves-toggle,
[data-theme="dark"] .save-item,
[data-theme="dark"] .boxart-item {
    background: var(--game-panel-bg, #2a2c2e);
    border-color: var(--game-border, var(--border-color));
}

[data-theme="dark"] .save-item p {
    color: #a0a6ab;
}

[data-theme="dark"] .boxart-image {
    background-color: #2a2c2e;
}

[data-theme="dark"] .lightbox img {
    background: #1c1e1f;
}

[data-theme="dark"] .game-related-posts {
    background: #2d3134;
    border-color: #4a5054;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .site-footer p {
    color: var(--text-color);
}

[data-theme="dark"] .input-group input {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

/* Alertas y mensajes de resultado con tonos atenuados para modo oscuro */
[data-theme="dark"] .alert-primary { background-color: #16233d; border-color: #2c4a7c; color: #a9c6f5; }
[data-theme="dark"] .alert-secondary { background-color: #2a2c2e; border-color: var(--border-color); color: var(--text-color); }
[data-theme="dark"] .alert-success { background-color: #133321; border-color: #276b41; color: #8fe0ac; }
[data-theme="dark"] .alert-danger { background-color: #3a1417; border-color: #7a2b30; color: #f5a3a8; }
[data-theme="dark"] .alert-warning { background-color: #3a2c0d; border-color: #7a5a17; color: #f0c869; }
[data-theme="dark"] .alert-info { background-color: #0f2c38; border-color: #245972; color: #92d6f5; }

[data-theme="dark"] #result.success { background-color: #133321; border-color: #276b41; color: #8fe0ac; }
[data-theme="dark"] #result.error { background-color: #3a1417; border-color: #7a2b30; color: #f5a3a8; }

/* --- Patcher en modo oscuro --- */
[data-theme="dark"] .patcher-hero p:last-child,
[data-theme="dark"] .patcher-file-name,
[data-theme="dark"] .patcher-info b,
[data-theme="dark"] .patcher-status,
[data-theme="dark"] .patcher-note {
    color: #9aa4ad;
}

[data-theme="dark"] .patcher-card,
[data-theme="dark"] .patcher-action-card {
    background: #2d3134;
    border-color: #4a5054;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .patcher-info div {
    background: #2a2c2e;
}

[data-theme="dark"] .patcher-file-button {
    background: #2a2c2e;
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .patcher-file-button:hover,
[data-theme="dark"] .patcher-file-button:focus-visible {
    background: #303234;
}

[data-theme="dark"] .patcher-progress {
    background: #2a2c2e;
}
