/* --- Estilos base y variables (similares a style.css) --- */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #f4f6f7;
    --card-background: #ffffff;
    --text-color: #34495e;
    --light-text: #ffffff;
    --header-bg: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex-grow: 1; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; text-align: left; }

/* --- Header, Nav y Footer (sin cambios) --- */
header { background-color: var(--header-bg); box-shadow: 0 2px 10px rgba(0,0,0,0.08); padding: 0 20px; position: sticky; top: 0; z-index: 1000; }
.header-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; height: 70px; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 25px; }
nav a { text-decoration: none; color: var(--text-color); font-weight: 600; padding: 5px 10px; border-radius: 5px; transition: color .3s, background-color .3s; }
nav a:hover { color: var(--secondary-color); background-color: #ecf0f1; }
footer { background-color: var(--primary-color); color: #bdc3c7; text-align: center; padding: 20px; margin-top: auto; }
footer p { margin: 0; font-size: 0.9rem; }

/* --- Títulos --- */
h1 { color: var(--primary-color); font-size: 2.5rem; margin-bottom: 0.5rem; }
.subtitle { font-size: 1.1rem; color: #4d4d4d; margin-top: 0; max-width: 600px; margin-left: auto; margin-right: auto; }

/* --- Sección de la Rueda --- */
.wheel-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    padding: 30px 20px;
}

.wheel-wrapper {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 40px solid #e74c3c;
    z-index: 10;
}

#wheel-canvas {
    transition: transform 5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#spin-btn {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #fff;
    color: var(--primary-color);
    border: 8px solid #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    /* --- CAMBIO: Texto más pequeño --- */
    font-size: 1.4rem; 
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 5;
    padding: 0; /* Asegura que el texto se centre bien */
}

#spin-btn:hover {
    transform: scale(1.1);
}

#spin-btn:disabled {
    cursor: not-allowed;
    background-color: #eee;
}

/* --- Panel de Selección de Animales --- */
.selection-panel {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 300px;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.selection-panel h3 {
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.selection-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.selection-controls button {
    background-color: #ecf0f1;
    color: var(--text-color);
    border: 1px solid #bdc3c7;
    font-size: 0.8rem;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
}
.selection-controls button:hover { background-color: #dfe6e9; }

.animal-checklist {
    overflow-y: auto;
    flex-grow: 1;
}

.checklist-item {
    display: block;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
}
.checklist-item:hover { background-color: #f4f6f7; }
.checklist-item input { margin-right: 10px; vertical-align: middle; }

/* --- Modal de Resultados --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.5s;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    max-width: 350px;
    text-align: center;
    position: relative;
    animation: slideIn 0.5s;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-btn:hover { color: #000; }

#modal-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

#modal-name { color: var(--primary-color); font-size: 2rem; margin-bottom: 10px; }
#modal-fact { font-size: 1rem; line-height: 1.6; }

/* --- NUEVO: Sección "Sobre la App" --- */
.about-section {
    background-color: #ffffff;
    padding: 60px 20px;
    border-top: 1px solid #e0e0e0;
}
.about-section h2 { font-size: 2rem; color: var(--primary-color); }
.about-section p { max-width: 1200px; margin: 15px auto 0; line-height: 1.7; }


@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
@keyframes slideIn { from {transform: translateY(-50px);} to {transform: translateY(0);} }

/* --- Menú responsivo para móviles --- */
@media (max-width: 768px) {
    header {
        position: static;
        box-shadow: none;
    }
    .header-container {
        flex-direction: column;
        height: auto;
        align-items: flex-start;
        padding: 10px 0;
    }
    .logo {
        margin-bottom: 10px;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center;
    }
    nav a {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }
    .generator-wrapper, .subtitle, .container{
        width: 85%;
    }
}