/* ===========================
   Ficha de juego universal (Gemini style)
   =========================== */

:root {
    --card-bg: #ffffff;
    --card-border: #f3f4f6;
    --text-main: #111827;
    --text-muted: #6b7280;
    --primary: #4f46e5;
    --primary-light: #eef2ff;
    --success: #15803d;
    --success-light: #f0fdf4;
    --radius: 12px;
    --shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.1);
}

/* Contenedor Principal */
.game-card {
    width: 100%;
    max-width: 380px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0 auto 20px auto;
}

/* Cabecera (Parte visible siempre) */
.card-header {
    display: flex;
    gap: 16px;
    padding: 12px;
    cursor: pointer;
    position: relative;
    background: #ffffff;
}

/* Imagen */
.card-image-wrapper {
    width: 96px;
    flex-shrink: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 2/3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Información */
.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 4px;
    padding-bottom: 4px;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.card-subtitle {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Icono Chevron */
.chevron-icon {
    color: #9ca3af;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.chevron-icon.is-rotated {
    transform: rotate(180deg);
}

/* Metadata (plataformas / nota) – opcional */
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.platform-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
}

/* Badge de nota – opcional */
.score-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--success-light);
    border: 1px solid #dcfce7;
    padding: 2px 8px;
    border-radius: 6px;
}

.score-num {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--success);
    line-height: 1;
}

.score-text {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #16a34a;
    letter-spacing: 0.025em;
}

/* Menú Desplegable */
.card-menu {
    background-color: #f9fafb;
    border-top: 1px solid var(--card-border);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
}

.card-menu.is-open {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.4s ease-in;
}

/* Grid de opciones */
.menu-grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.menu-grid-row:first-child {
    border-bottom: 1px solid #e5e7eb;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    text-decoration: none;
    color: var(--text-muted);
    transition: background-color 0.2s;
    border-right: 1px solid #e5e7eb;
    background: #f9fafb;
}

.menu-item:last-child {
    border-right: none;
}

.menu-item:hover {
    background-color: #ffffff;
}

.menu-item:hover span {
    color: var(--primary);
}

.menu-item svg {
    color: var(--primary);
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
    transition: transform 0.2s;
}

.menu-item:hover svg {
    transform: scale(1.1);
}

.menu-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Estado deshabilitado: sin enlace pero ocupa su sitio */
.menu-item--disabled {
    cursor: default;
    opacity: 0.45;
}

.menu-item--disabled:hover {
    background-color: #f9fafb;
}

.menu-item--disabled svg {
    color: #c4b5fd;
}

/* Bloque con los enlaces antiguos de {$AxlCabecera}, lo ocultamos */
.axl-legacy-links {
    display: none;
}

/* Ajuste para móviles muy pequeños */
@media (max-width: 480px) {
    .game-card {
        max-width: 100%;
    }

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