:root {
    --blue-primary: #2563eb;
    --blue-dark: #1e40af;
    --green-primary: #10b981;
    --green-dark: #059669;
    --yellow: #facc15;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --bg-light: #f3f4f6;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background-color: var(--bg-light); color: var(--text-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Botones */
.btn { padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: linear-gradient(to right, var(--blue-primary), var(--blue-dark)); color: white; }
.btn-green { background: linear-gradient(to right, var(--green-primary), var(--green-dark)); color: white; }
.btn-outline { background: #eff6ff; color: var(--blue-primary); border: 1px solid #dbeafe; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn-full { width: 100%; justify-content: center; padding: 12px; margin-top: 15px; }

/* Text colors */
.text-green { color: var(--green-primary); }
.text-yellow { color: var(--yellow); }
.text-center { text-align: center; }
.text-muted { color: var(--text-light); font-size: 0.9rem; }
.mt-20 { margin-top: 20px; }

/* Footer */
footer { text-align: center; padding: 20px; border-top: 1px solid #e5e7eb; background: white; margin-top: 40px; color: var(--text-light); }

/* Responsive basics */
@media (max-width: 600px) {
    .btn span { display: none; } /* En móvil solo mostramos iconos en el header */
    .btn span.visible-mobile { display: inline; }
}

/* --- ANIMACIONES AVANZADAS DE INICIO --- */

/* 1. CONFIGURACIÓN DEL LOGO (Giro cada 7 segundos) */
.logo-img-anim {
    width: 40px; /* Ajusta el tamaño de tu logo aquí si es muy grande */
    height: auto;
    display: inline-block;
    /* Animación: nombre | duración | ritmo | repetición */
    animation: giroFrontal 7s linear infinite; 
}

@keyframes giroFrontal {
    0% { transform: rotate(0deg) scale(1); filter: brightness(100%); }
    50% { transform: rotate(180deg) scale(1.1); filter: brightness(130%); } /* Pequeño zoom y brillo a la mitad */
    100% { transform: rotate(360deg) scale(1); filter: brightness(100%); }
}


/* 2. MOVIMIENTOS INDIVIDUALES PARA CADA TEXTO */

/* A) Badge (El texto pequeño de arriba): Rebote desde arriba */
.badge-promo {
    animation: reboteEntrada 1s ease-out forwards;
    opacity: 0; /* Invisible al inicio */
}

@keyframes reboteEntrada {
    0% { opacity: 0; transform: translateY(-50px); }
    60% { opacity: 1; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* B) Título H2: Deslizar desde la izquierda con fuerza */
.hero h2 {
    animation: deslizarIzquierda 1s ease-out 0.3s forwards; /* 0.3s de retraso */
    opacity: 0;
}

@keyframes deslizarIzquierda {
    from { opacity: 0; transform: translateX(-100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* C) Párrafo P: Deslizar desde la derecha suavemente */
.hero p {
    animation: deslizarDerecha 1s ease-out 0.6s forwards; /* 0.6s de retraso */
    opacity: 0;
}

@keyframes deslizarDerecha {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* D) Estadísticas (Iconos amarillos): Aparecer con Zoom (Pop-up) */
.hero-stats {
    animation: zoomIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.9s forwards; /* Efecto elástico */
    opacity: 0;
    /* Aseguramos que los items internos se comporten bien */
    display: flex; 
    gap: 20px;
    justify-content: center;
}

@keyframes zoomIn {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

/* E) Botón CTA: Subir desde abajo con parpadeo final */
.btn-cta {
    animation: subirBoton 1s ease-out 1.2s forwards, pulsoBoton 2s infinite 2.2s;
    opacity: 0;
}

@keyframes subirBoton {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animación continua solo para el botón (para llamar la atención) */
@keyframes pulsoBoton {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); transform: scale(1); }
}

/* --- ESTILO AVANZADO DE LAS TARJETAS DE JUEGOS --- */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Diseño responsivo automático */
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    background: #2b2b2b;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--yellow-primary); /* Borde dorado al pasar el mouse */
}

/* Imagen y Overlay */
.game-img {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.game-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Al hacer hover en la tarjeta, la imagen hace zoom */
.game-card:hover .game-img img {
    transform: scale(1.1);
}

/* El cuadro negro transparente con el botón */
.overlay-play {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Invisible normalmante */
    transition: opacity 0.3s ease;
}

/* Al hacer hover, aparece el overlay */
.game-card:hover .overlay-play {
    opacity: 1;
}

/* Botón Jugar */
.btn-play {
    background: var(--yellow-primary); /* Amarillo */
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.game-card:hover .btn-play {
    transform: scale(1); /* Efecto pop del botón */
}

/* Contenedor principal del footer */
.site-footer {
    background-color: #ffffff; /* Fondo blanco */
    padding: 40px 20px;       /* Espacio arriba y abajo */
    text-align: center;       /* Todo centrado */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin-top: auto;         /* Empuja el footer al fondo si usas flexbox en el body */
}

/* Estilo del "Logo" (Pley2.win) */
.footer-brand {
    font-size: 1.5rem;        /* Tamaño grande (aprox 24px) */
    font-weight: 700;         /* Negrita */
    color: #3b82f6;           /* El color Azul (Pley2) */
    margin-bottom: 8px;       /* Separación con el eslogan */
}

.footer-brand span {
    color: #10b981;           /* El color Verde (.win) */
}

/* Estilo del Eslogan */
.footer-slogan {
    font-size: 1rem;          /* Tamaño normal (aprox 16px) */
    color: #6b7280;           /* Gris medio */
    margin: 0 0 20px 0;       /* Separación hacia abajo */
}

/* Textos legales (Copyright y Demo) */
.footer-legal p {
    font-size: 0.85rem;       /* Letra pequeña (aprox 13-14px) */
    color: #9ca3af;           /* Gris claro */
    margin: 4px 0;            /* Pequeña separación entre líneas */
    line-height: 1.5;
}

/* El texto de demostración puede ser un poco más claro u opaco si quieres */
.footer-legal .demo-text {
    opacity: 0.8;
}