@import url('https://fonts.googleapis.com/css2?family=Lilita+One&display=swap');

/* Estilos generales y enfoque mobile-first */
body {
    font-family: 'Righteous', sans-serif;
    background-color: #eef1f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    height: 100vh;
    padding: 2rem;
    margin: 0;
}

#game-container {
    text-align: center;
    width: 90%;
    max-width: 400px;
    position: relative;

    /* Contenedor flexible para centrar todo su contenido */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Reemplaza tu antiguo estilo h1 con este */
h1 {
    font-family: 'Lilita One', cursive; /* La nueva tipografía importada */
    font-size: 4.5rem; /* Un tamaño más impactante */
    margin-bottom: 0.5rem;
    
    /* Efecto de gradiente para el color del texto */
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    -webkit-background-clip: text; /* Permite que el fondo sea visible solo en el texto */
    background-clip: text;
    color: transparent; /* Oculta el color original de la fuente */
    
    /* Sombra y contorno para darle profundidad y legibilidad */
    -webkit-text-stroke: 1.5px #002b4d; /* Contorno oscuro */
    text-stroke: 1.5px #002b4d;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.15); /* Sombra sutil */
}

/* Estilos para las cartas */
.card-pile,
.card {
    width: 280px;
    height: 400px;
    background-color: white;
    border: 2px solid #ff6347;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    padding: 20px;
    cursor: pointer;
}

.card:hover,
.card-pile:hover {
    transform: scale(1.03);
}

#active-card {
    cursor: default;
}

.card-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    font-size: 5rem;
    line-height: 1;
}

.card-title {
    font-size: 2.5rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}

/* Dise\u00f1os espec\u00edficos para cada tipo de carta */
#deck {
    background-color: #1a759f;
    background-image: radial-gradient(circle at 100% 150%, #1a759f 24%, #d9ed92 25%, #d9ed92 28%, #1a759f 29%, #1a759f 36%, #d9ed92 36%, #d9ed92 40%, transparent 40%, transparent),
                      radial-gradient(circle at 0 150%, #1a759f 24%, #d9ed92 25%, #d9ed92 28%, #1a759f 29%, #1a759f 36%, #d9ed92 36%, #d9ed92 40%, transparent 40%, transparent),
                      radial-gradient(circle at 50% 100%, #d9ed92 10%, #1a759f 11%, #1a759f 23%, #d9ed92 24%, #d9ed92 30%, #1a759f 31%, #1a759f 43%, #d9ed92 44%, #d9ed92 50%, #1a759f 51%, #1a759f 63%, #d9ed92 64%, #d9ed92 71%, transparent 71%, transparent);
    background-size: 100px 50px;
    font-family: 'Bangers', cursive;
    font-size: 3rem;
    color: #f7b267;
    text-shadow: 3px 3px 0px #c1121f;
    letter-spacing: 2px;
}

.card-choca {
    background-color: #ffc300;
    background-image: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2), rgba(255,255,255,0.2) 10px, transparent 10px, transparent 20px);
    animation: spin 30s linear infinite;
    font-family: 'Lilita One', cursive;
}
.card-choca .card-icon {
    animation: pop-in 0.5s ease-out;
}

.card-punos {
    background: linear-gradient(to top, #03045e, #0077b6, #00b4d8);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
}

.bubbles span {
    position: absolute;
    bottom: -50px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: bubble-rise 10s infinite;
    z-index: 1;
}
.bubbles span:nth-child(1) { left: 10%; animation-duration: 6s; }
.bubbles span:nth-child(2) { left: 80%; animation-duration: 8s; animation-delay: 2s; width: 15px; height: 15px;}
.bubbles span:nth-child(3) { left: 50%; animation-duration: 5s; animation-delay: 4s; }
.bubbles span:nth-child(4) { left: 25%; animation-duration: 9s; animation-delay: 1s; width: 25px; height: 25px;}
.bubbles span:nth-child(5) { left: 65%; animation-duration: 7s; animation-delay: 3s; }


/* --- Propuesta 2 para At\u00fan Feliz: "Ola Hologr\u00e1fica" --- */
#card-atun,
.card-atun {
    /* Un fondo oscuro para que los colores ne\u00f3n resalten */
    background-color: #1a1a2e;
    font-family: 'Permanent Marker', cursive; /* Mantenemos la tipograf\u00eda */
    background-size: 400% 400%; /* Hacemos el fondo mucho m\u00e1s grande que la carta */
    /* El gradiente con todos los colores de la felicidad */
    background-image: linear-gradient(
        -45deg,
        #f00,
        #ff7b00,
        #ffff00,
        #0f0,
        #00f,
        #4b0082,
        #ee82ee
    );
    /* La animaci\u00f3n que mover\u00e1 el fondo */
    animation: holographic-wave 10s ease-in-out infinite;
}

/* La animaci\u00f3n que mueve la posici\u00f3n del fondo para crear el efecto */
@keyframes holographic-wave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Adaptamos el color del texto para que contraste con el fondo oscuro */
#card-atun .card-title,
.card-atun .card-title {
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Sombra m\u00e1s pronunciada */
}
.card-cambio {
    background: linear-gradient(135deg, #8338ec 50%, #3a86ff 50%);
    font-family: 'Righteous', cursive;
    color: #fff;
}
.card-cambio .card-content {
    animation: slide-in 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.card-cambio .card-icon {
    animation: arrows-move 1.5s ease-in-out infinite;
}

/* Animaciones */
@keyframes fly-away {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-150%) rotate(20deg); opacity: 0; }
}

@keyframes pass-move {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(150%) rotate(-20deg); opacity: 0; }
}

@keyframes pop-check {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pop-in {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bubble-rise {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-500px) translateX(20px); opacity: 0; }
}


@keyframes slide-in {
    from { transform: translateY(100px); opacity: 0;}
    to { transform: translateY(0); opacity: 1;}
}

@keyframes arrows-move {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.check-emoji {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2em;
    animation: pop-check 0.5s forwards;
}

.animate-complete {
    animation: fly-away 0.6s forwards;
}

.animate-pass {
    animation: pass-move 0.6s forwards;
}

/* Estilos para los botones */
#action-buttons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

button {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#pass-btn {
    background-color: #dc3545;
    color: white;
}
#pass-btn:hover {
    background-color: #c82333;
}

#complete-btn {
    background-color: #28a745; /* Verde */
    color: white;
}
#complete-btn:hover {
    background-color: #218838;
}

#restart-btn {
    margin-top: 20px;
    background-color: #ff6347;
    color: white;
}

/* Botón para activar o desactivar cartas de Cambio */
#change-toggle-btn {
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background-color: #28a745; /* Verde por defecto */
    color: #fff; /* Texto en blanco */
}

/* Clase de utilidad para ocultar elementos */
.hidden {
    display: none !important;
}

#card-count {
    margin-top: 10px;
    font-weight: bold;
}

/* Tooltip para informacion adicional */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 8px;
    z-index: 100;
}

.tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 200;
    top: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip.info-icon {
    position: absolute;
    top: 10px;
    right: 10px;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.2em;
    background-color: #ffeb3b;
    color: #333;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s, transform 0.2s;
}

.info-icon:hover {
    background-color: #ffe066;
    transform: scale(1.1);
}

footer {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}
