/*
  games.css
  Estilos exclusivos de la sección #games del portfolio Nauthix.
  ─────────────────────────────────────────────────────────────────
  Depende de:
    • templatemo-neural-style.css  (variables de color, .glass, fuentes base)
    • nauthix-enhancements.css     (.sec-container, .section-subtitle, .filter-tabs)
    • projects.css                 (.filter-tab, .filter-tab.active)

  Orden de carga en el HTML:
    <link rel="stylesheet" href="css/templatemo-neural-style.css">
    <link rel="stylesheet" href="css/nauthix-enhancements.css">
    <link rel="stylesheet" href="css/projects.css">
    <link rel="stylesheet" href="css/games.css">            ← este archivo
  ─────────────────────────────────────────────────────────────────
  ÍNDICE
    1.  Sección wrapper             (.sec-games)
    2.  Grid                        (.games-grid)
    3.  Card base                   (.game-card)
    4.  Thumbnail base               (.game-thumb)
    5.  Thumbnail — imagen          (.game-thumb--image / overlay)
    6.  Thumbnail — placeholder     (.game-thumb-placeholder / .coming-soon-badge)
    7.  Info del juego              (.game-info / .game-genre-tag / .game-play-btn)
    8.  Nota de sección             (.games-note)
    9.  Filtro — estados ocultos    (.game-card.hidden / .game-card.card-exit)
    10. Responsive
  ─────────────────────────────────────────────────────────────────
*/

/* =============================================
   1. SECCIÓN WRAPPER
   ============================================= */

.sec-games {
    padding: 100px 0 80px;
    position: relative;
}

/* Separador superior */
.sec-games::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(224,163,255,0.3), transparent);
}

/* =============================================
   2. GRID
   ============================================= */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
    position: relative;
}

/* =============================================
   3. CARD BASE
   ============================================= */

.game-card {
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(147,112,219,0.18);
}

/* =============================================
   4. THUMBNAIL BASE
   ============================================= */

.game-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* =============================================
   5. THUMBNAIL — IMAGEN + OVERLAY DE PLAY
      ─────────────────────────────────────────
      • Hover (escritorio): oscurece fondo + escala ícono ▶
      • Táctil (móvil): tap abre el juego directo (onclick)
      • La descripción va como <details> acordeón en .game-info
        funcionando igual en escritorio y móvil sin JS extra
   ============================================= */

.game-thumb--image {
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
}

.game-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.2s ease;
}

.game-play-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

/* Escritorio: hover solo mejora el overlay de play, no muestra descripción */
@media (hover: hover) {
    .game-thumb--image:hover .game-play-overlay {
        background: rgba(0,0,0,0.55);
    }
    .game-thumb--image:hover .game-play-icon {
        transform: scale(1.12);
        background: rgba(255,255,255,0.28);
    }
}

/* =============================================
   6. THUMBNAIL — PLACEHOLDER (próximamente)
   ============================================= */

.game-thumb-placeholder {
    color: rgba(147,112,219,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 16px rgba(147,112,219,0.3));
}

.game-thumb-placeholder svg {
    animation: gamePulse 3s ease-in-out infinite;
    width: 44px;
}

@keyframes gamePulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%       { opacity: 0.85; transform: scale(1.05); }
}

.coming-soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,105,180,0.18);
    border: 1px solid rgba(255,105,180,0.4);
    color: #ff69b4;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

/* =============================================
   7. INFO DEL JUEGO
   ============================================= */

.game-info {
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-info h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e0a3ff;
    margin: 0;
}

.game-genre-tag {
    font-size: 0.65rem;
    color: rgba(147,112,219,0.6);
    font-style: italic;
    letter-spacing: 0.03em;
}

/* ── Descripción desplegable acordeón — funciona en escritorio y móvil ── */

.game-details {
    margin: 0;
}

/* Ocultar el triángulo nativo del navegador */
.game-details summary {
    list-style: none;
}
.game-details summary::-webkit-details-marker {
    display: none;
}

.game-summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: rgba(224,163,255,0.55);
    font-weight: 500;
    letter-spacing: 0.02em;
    user-select: none;
    transition: color 0.2s ease;
}

.game-summary::before {
    content: '▸';
    font-size: 0.6rem;
    display: inline-block;
    transition: transform 0.25s ease;
}

.game-details[open] .game-summary {
    color: #e0a3ff;
}

.game-details[open] .game-summary::before {
    transform: rotate(90deg);
}

.game-details p {
    font-size: 0.78rem;
    color: rgba(209,209,209,0.65);
    line-height: 1.5;
    margin: 8px 0 0;
    animation: detailsFade 0.25s ease;
}

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

/* ── Botón jugar ── */

.game-card .game-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(0,255,255,0.15), rgba(147,112,219,0.2));
    border: 1px solid rgba(0,255,255,0.35);
    border-radius: 30px;
    color: #00ffff;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    width: fit-content;
    cursor: pointer;
}

.game-card .game-play-btn:hover {
    background: linear-gradient(135deg, rgba(0,255,255,0.25), rgba(147,112,219,0.32));
    box-shadow: 0 0 20px rgba(0,255,255,0.2);
    transform: translateY(-2px);
}

/* =============================================
   8. NOTA DE SECCIÓN
   ============================================= */

.games-note {
    text-align: center;
    color: rgba(209,209,209,0.45);
    font-size: 0.85rem;
    padding: 8px;
    letter-spacing: 0.02em;
}

/* =============================================
   9. FILTRO — ESTADOS OCULTOS
       Mismo sistema que project-card en projects.css
   ============================================= */

/* Fase 1: animando salida (sigue en flujo del grid) */
.game-card.card-exit {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
    pointer-events: none;
}

/* Fase 2: completamente oculta (fuera del flujo) */
.game-card.hidden {
    display: none;
}

/* =============================================
   10. RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .game-info {
        padding: 8px 10px 10px;
    }

    .game-info h3 {
        font-size: 0.8rem;
    }

    .game-genre-tag {
        font-size: 0.6rem;
    }

    .game-card .game-play-btn {
        font-size: 0.68rem;
        padding: 5px 12px;
    }
}
