/* Importa los nuevos estilos al principio de tu archivo principal de CSS */
@import url('daily-challenge.css');

html { height: 100%; }
body { 
    min-height: 100%; 
    display: flex; 
    flex-direction: column; 
    background-color: #F9FAFB; 
    overflow-x: hidden; /* Evita el scroll horizontal */
    touch-action: manipulation; /* Desactiva el doble toque para hacer zoom */
}
.main-content { flex-grow: 1; }
.title-gradient { 
    background: linear-gradient(to right, #854d0e, #F97316); 
    -webkit-background-clip: text; 
    background-clip: text; 
    color: transparent; 
    padding-bottom: 0.25em; /* Añade espacio inferior para evitar cortes */
}
.header-icon { 
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out; 
}
.header-icon:hover { 
    transform: scale(1.2); 
}

.dark .header-icon:hover {
    color: #9CA3AF; /* brand-gray-400 */
}

/* Estilo para el efecto glass del menú */
.glass-menu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Estilos para el nuevo Modal de Perfil */
#profile-name-input-modal {
    background: none;
    border: none;
    border-bottom: 2px solid #6B7280; /* brand-gray-500 */
    text-align: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: #1F2937; /* Color base para modo claro */
    padding-bottom: 0.5rem;
    border-radius: 0;
}
.dark #profile-name-input-modal {
    color: white; /* Color para modo oscuro */
    border-color: #6B7280;
}
#profile-name-input-modal:focus {
    outline: none;
    border-color: #F97316; /* brand-orange */
}

/* Animación de vibración para el cofre */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}
.shake {
  animation: shake 0.5s;
}

/* --- ESTILOS Y ANIMACIÓN PARA LA LLUVIA DE NEURONAS (COLOR CORREGIDO) --- */
.neuron {
    position: fixed;
    z-index: 100;
    font-size: 2rem;
    color: #F97316; /* CORREGIDO: Color naranja de la marca */
    cursor: pointer;
    user-select: none;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* --- Estilos de la Tarjeta de Introducción (Hero) --- */
.info-card-hero {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    border-top: 4px solid #F97316;
}
.dark .info-card-hero {
    background-color: #1F2937;
    border-color: #F97316;
}

/* --- CORRECCIÓN PARA TEXTO EN NEGRITA EN MODO OSCURO --- */
.prose strong {
    color: #111827;
}
.dark .prose strong, .dark strong, .dark b {
    color: #F9FAFB !important;
}

.prose u {
    text-decoration-color: #F97316;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* --- Estilos de las Tarjetas de Beneficios --- */
.benefit-card {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transition: all 0.3s ease-in-out;
}
.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.benefit-icon {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}
.dark .benefit-card {
    background-color: #1F2937;
    border: 1px solid #374151;
}


/* --- Estilos de la Tarjeta de Newsletter --- */
.newsletter-card {
    background-color: #f3f4f6;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #e5e7eb;
}
.dark .newsletter-card {
    background-color: #1F2937;
    border-color: #374151;
}


/* --- Estilos del Blog --- */
.blog-card {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transition: all 0.3s ease-in-out;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.dark .blog-card {
    background-color: #1F2937;
    border: 1px solid #374151;
}


/* --- Estilos de Ajustes --- */
html.dark .bg-white { background-color: #1F2937; }
html.dark .bg-brand-gray-50 { background-color: #111827; }
html.dark .text-brand-gray-900 { color: #F9FAFB; }
html.dark .text-brand-gray-700 { color: #E5E7EB; }
html.dark .text-brand-gray-500 { color: #9CA3AF; }
html.dark .border-brand-gray-200 { border-color: #374151; }
html.dark .title-gradient {
    background: linear-gradient(to right, #F97316, #fbbf24);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
html.dark .logo-light { display: none; }
html.dark .logo-dark { display: inline-block; }
body.font-dyslexia { font-family: 'Lexend', sans-serif; }
body.font-dyslexia .font-display { font-family: 'Lexend', sans-serif; }
body.colorblind-mode { filter: grayscale(100%); }
html.text-large { font-size: 18px; }

/* ======================================= */
/* --- ESTILOS PARA TARJETAS DE JUEGO --- */
/* ======================================= */
.game-card {
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease-in-out;
}
.dark .game-card {
    background-color: #1f2937;
    border-color: #374151;
}
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.game-card-icon {
    width: 4rem; height: 4rem; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 1rem;
}
.game-card-title { font-size: 1.25rem; font-weight: 700; color: #111827; }
.dark .game-card-title { color: #ffffff; }
.game-card-description { color: #6b7280; margin-top: 0.5rem; min-height: 2.5rem; }
.dark .game-card-description { color: #9ca3af; }
.game-card-button {
    display: inline-block; margin-top: 1.5rem; width: 100%;
    padding: 0.75rem 1rem; background-color: #f3f4f6;
    color: #374151; font-weight: 600; border-radius: 0.5rem;
    border: 1px solid #d1d5db; transition: all 0.2s ease-in-out;
}
.dark .game-card-button {
    background-color: #374151; color: #e5e7eb; border-color: #4b5563;
}
.game-card-button:hover { background-color: #e5e7eb; border-color: #9ca3af; }
.dark .game-card-button:hover { background-color: #4b5563; border-color: #6b7280; }

/* --- ESTILOS PARA NOTIFICACIONES (TOAST) --- */
.toast {
    visibility: hidden; min-width: 250px; background-color: #333; color: #fff; text-align: center;
    border-radius: 8px; padding: 16px; position: fixed; z-index: 100; left: 50%;
    transform: translateX(-50%); bottom: 30px; font-size: 17px; opacity: 0;
    transition: opacity 0.3s, visibility 0.3s, bottom 0.3s;
}
.toast.show { visibility: visible; opacity: 1; bottom: 50px; }

/* --- ESTILOS PARA LOS INPUTS DEL PIN --- */
.pin-input {
    width: 3.5rem; height: 4rem; text-align: center; font-size: 1.875rem;
    font-weight: bold; border-radius: 0.75rem; border: 2px solid #D1D5DB;
    background-color: #F3F4F6; color: #111827; caret-color: #F97316;
    transition: all 0.2s ease-in-out;
}
.dark .pin-input { border-color: #4B5563; background-color: #374151; color: white; }
.pin-input:focus {
    outline: none; border-color: #F97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.4);
}
.bg-white .pin-input {
    background-color: #F3F4F6; border-color: #D1D5DB; color: #111827;
}
.bg-white .pin-input:focus { border-color: #F97316; }

/* ======================================= */
/* --- ESTILOS PARA TARJETAS DE RECOMPENSA --- */
/* ======================================= */
.reward-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(145deg, #2d3748, #1a202c);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 320px;
}
.reward-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}
.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.reward-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 1rem;
    border: 2px solid transparent;
    background: linear-gradient(145deg, transparent, transparent) padding-box, linear-gradient(145deg, #f97316, #4c1d95) border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.reward-card:hover::after {
    opacity: 1;
}