/* Launcher - Selector de Juegos */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.launcher {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.launcher-header {
    text-align: center;
    margin-bottom: 50px;
}

.launcher-header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: #ffd700;
    text-shadow: 3px 3px 0 #000, -1px -1px 0 #000;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.launcher-subtitle {
    font-size: 1.1rem;
    color: #aaa;
    font-style: italic;
}

/* Ranking banner (anuncio de ranking online) */
.ranking-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 auto 18px;
    padding: 14px 20px;
    width: 100%;
    max-width: 640px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 140, 66, 0.08));
    border: 1px solid rgba(255, 215, 0, 0.55);
    border-radius: 12px;
    color: #fff;
}

.ranking-banner-icon {
    font-size: 1.7rem;
    color: #ffd700;
    flex-shrink: 0;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.ranking-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ranking-banner-text strong {
    color: #ffd700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.ranking-banner-sub {
    font-size: 0.85rem;
    color: #ccc;
}

/* Download banner */
.download-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 auto 30px;
    padding: 14px 20px;
    width: 100%;
    max-width: 640px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.04));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
}

.download-banner:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 215, 0, 0.08));
    border-color: rgba(255, 215, 0, 0.7);
    transform: translateY(-1px);
}

.download-banner-icon {
    font-size: 1.6rem;
    color: #ffd700;
    flex-shrink: 0;
}

.download-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.download-banner-text strong {
    font-size: 1rem;
    color: #ffd700;
}

.download-banner-sub {
    font-size: 0.85rem;
    color: #ccc;
}

/* Games Grid */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex: 1;
}

/* Game Card */
.game-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.game-card:hover::before {
    opacity: 1;
}

/* Colores específicos por juego */
.game-card.charocracia {
    border-left: 5px solid #e60000;
}

.game-card.charocracia:hover {
    border-color: #e60000;
    box-shadow: 0 15px 40px rgba(230, 0, 0, 0.2);
}

.game-card.boomermania {
    border-left: 5px solid #f4a460;
}

.game-card.boomermania:hover {
    border-color: #f4a460;
    box-shadow: 0 15px 40px rgba(244, 164, 96, 0.2);
}

.game-card.resistire {
    border-left: 5px solid #c1272d;
}

.game-card.resistire:hover {
    border-color: #c1272d;
    box-shadow: 0 15px 40px rgba(193, 39, 45, 0.25);
}

.game-card.lapaguita {
    border-left: 5px solid #4CAF50;
}

.game-card.lapaguita:hover {
    border-color: #4CAF50;
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.2);
}

.game-card.papelesparatodos {
    border-left: 5px solid #1e3a5f;
}

.game-card.papelesparatodos:hover {
    border-color: #1e3a5f;
    box-shadow: 0 15px 40px rgba(30, 58, 95, 0.35);
}

.game-card.camino-a-casa {
    border-left: 5px solid #ff8c42;
}

.game-card.camino-a-casa:hover {
    border-color: #ff8c42;
    box-shadow: 0 15px 40px rgba(255, 140, 66, 0.25);
}

/* Game Icon */
.game-icon {
    font-size: 4rem;
    margin-right: 25px;
    flex-shrink: 0;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

/* Game Info */
.game-info {
    flex: 1;
}

.game-info h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    margin-bottom: 8px;
    color: #fff;
}

.game-tagline {
    font-size: 1rem;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 10px;
}

.game-description {
    font-size: 0.95rem;
    color: #bbb;
    line-height: 1.5;
    margin-bottom: 12px;
}

.game-genre {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Play Button */
.play-btn {
    background: linear-gradient(180deg, #4CAF50 0%, #388E3C 100%);
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 #2E7D32, 0 6px 10px rgba(0,0,0,0.3);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.game-card:hover .play-btn {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2E7D32, 0 4px 8px rgba(0,0,0,0.3);
}

.game-card:active .play-btn {
    transform: translateY(4px);
    box-shadow: 0 0px 0 #2E7D32, 0 2px 4px rgba(0,0,0,0.3);
}

/* Footer */
.launcher-footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.launcher-footer p {
    color: #888;
    margin-bottom: 15px;
}

.launcher-footer a {
    color: #ffd700;
    text-decoration: none;
}

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

.launcher-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-link {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-link:hover,
.footer-link:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    outline: none;
    text-decoration: none;
}

/* Badge: "NUEVO" / "Continuar" en cards */
.game-card {
    position: relative;
}

.game-badge-new,
.game-badge-continue {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ffd700;
    color: #1a1a2e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
    pointer-events: none;
}

.game-badge-continue {
    background: #4CAF50;
    color: #fff;
    top: auto;
    bottom: 12px;
    right: 12px;
}

/* Si hay ambos (NUEVO + Continuar), separar */
.game-badge-new + .game-badge-continue {
    bottom: 12px;
}

.game-badge-ranking {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ffd700, #ff8c42);
    color: #1a1a2e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    z-index: 2;
    pointer-events: none;
}

/* Modal Sobre */
.launcher-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.launcher-modal.active {
    display: flex;
}

.launcher-modal-content {
    background: linear-gradient(180deg, #1e2a4a, #121826);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 30px 24px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    color: #eee;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.launcher-modal-content h2 {
    color: #ffd700;
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    margin-bottom: 16px;
    padding-right: 30px;
}

.launcher-modal-content h3 {
    color: #ffd700;
    font-size: 1rem;
    margin: 20px 0 8px;
}

.launcher-modal-content p {
    line-height: 1.55;
    margin-bottom: 10px;
    color: #ccc;
}

.launcher-modal-content a {
    color: #ffd700;
    text-decoration: underline;
}

.launcher-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 1.4rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.launcher-modal-close:hover,
.launcher-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
}

.kofi-btn {
    display: inline-block;
    background: #ff5e5b;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.kofi-btn:hover {
    background: #ff4744;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 600px) {
    .launcher {
        padding: 25px 15px;
    }

    .game-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .game-icon {
        margin-right: 0;
        margin-bottom: 15px;
        font-size: 3.5rem;
    }

    .play-btn {
        margin-top: 15px;
        width: 100%;
        text-align: center;
    }

    .game-card.charocracia,
    .game-card.boomermania,
    .game-card.resistire,
    .game-card.lapaguita,
    .game-card.papelesparatodos,
    .game-card.camino-a-casa {
        border-left: 2px solid rgba(255, 255, 255, 0.1);
        border-top: 5px solid;
    }

    .game-card.charocracia {
        border-top-color: #e60000;
    }

    .game-card.boomermania {
        border-top-color: #f4a460;
    }

    .game-card.resistire {
        border-top-color: #c1272d;
    }

    .game-card.lapaguita {
        border-top-color: #4CAF50;
    }

    .game-card.papelesparatodos {
        border-top-color: #1e3a5f;
    }

    .game-card.camino-a-casa {
        border-top-color: #ff8c42;
    }
}

/* ===========================================
   DOWNLOADS PAGE
   =========================================== */
.downloads-intro {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 25px;
    color: #ddd;
    line-height: 1.6;
}

.downloads-intro code {
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.downloads-ranking-note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 215, 0, 0.18);
    font-size: 0.95em;
    color: #ccc;
}

.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 22px;
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
}

.download-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.download-item.recommended {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
}

.download-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.download-info {
    flex: 1;
    min-width: 0;
}

.download-info h2 {
    font-size: 1.15rem;
    margin-bottom: 4px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.download-info p {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.download-meta {
    font-size: 0.8rem;
    color: #888;
    font-family: 'Courier New', monospace;
}

.download-badge {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.download-action {
    font-size: 1.6rem;
    color: #ffd700;
    flex-shrink: 0;
}

.downloads-help {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 25px;
    color: #bbb;
    line-height: 1.6;
}

.downloads-help h3 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1rem;
}

.downloads-help code {
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.downloads-help pre {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    overflow-x: auto;
}

.downloads-help pre code {
    background: transparent;
    color: #f0e68c;
    padding: 0;
}

@media (max-width: 600px) {
    .download-item {
        padding: 14px 16px;
        gap: 12px;
    }

    .download-icon {
        font-size: 1.6rem;
    }

    .download-info h2 {
        font-size: 1rem;
    }
}

/* ===========================================
   PREFERS-REDUCED-MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
        transition-duration: 0.01ms !important;
    }

    /* Game cards */
    .game-card:hover {
        transform: none !important;
    }

    .game-card::before {
        transition: none !important;
    }

    .game-card:hover .play-btn {
        transform: none !important;
    }

    /* Ko-fi button */
    .kofi-btn:hover {
        transform: none !important;
    }
}
