/* Aplicar fuente a toda la aplicación */
body {
    /* 'Inter' es la fuente, 'sans-serif' es el respaldo estándar del navegador */
    font-family: 'Inter', sans-serif;
    
    /* Configuración recomendada para que Inter se vea nítida en todas las pantallas */
    font-optical-sizing: auto;
    font-style: normal;
    background: linear-gradient(-45deg, #f3e7e9, #e3eeff, #e3eeff, #f3e7e9);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    margin: 0;
    color: #2c3e50;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1 { 
    text-align: center; 
    font-size: 1.8rem; 
    margin-bottom: 10px; 
    background: -webkit-linear-gradient(45deg, #6200ea, #ff007f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.1));
}
		
/* Estilo elegante para títulos */
h2, h3 {
    font-weight: 700;
    letter-spacing: -0.5px; /* Reduce ligeramente el espacio entre letras, muy elegante */
}

/* Estilo para los botones y textos pequeños */
button, .card, #texto-gracioso {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

button:focus {
    outline: none; /* Quita el recuadro de selección en PC */
}

button {
    -webkit-tap-highlight-color: transparent; /* Quita el parpadeo gris al tocar en móviles */
}

.app-container {
	height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 20px 20px 95px 20px; /* Margen inferior extra para el banner */
	box-sizing: border-box;
}

#pregunta { 
	font-size: 1.3rem; 
	text-align: center; 
	margin-bottom: 15px; 
	line-height: 1.5;
	color: #1a1a2e;
	text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.opciones-grid {
	display: flex;
	flex-direction: column;
	gap: 15px;
	flex-grow: 1;
}

.card {
	flex: 1;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 24px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	font-size: 1.1rem;
	font-weight: bold;
	color: #333;
}

.card:active {
	transform: scale(0.95);
}
.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 35px rgba(98, 0, 234, 0.15);
	border-color: rgba(98, 0, 234, 0.3);
	animation: none !important; /* Detener la animación al hacer hover */
}

.emoji { 
	font-size: 3rem; 
	margin-bottom: 10px; 
	filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
	transition: transform 0.3s ease;
}
.card:hover .emoji {
	transform: scale(1.1) rotate(5deg);
}	
		
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.5s ease-in-out;
    width: 100%; /* Por defecto siempre ocupan todo el ancho */
    padding: 15px;
    box-sizing: border-box; /* Importante para que el padding no rompa el ancho */
}

/* Cuando el usuario vota, añadimos esta clase para el efecto visual */
.card.resultado {
    background-color: #f0f0f0;
    border: 2px solid #ddd;
}		
#btn-skip {
    margin-top: 20px;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;         /* Forma redondeada */
    color: #666;                 /* Color gris neutro */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

#btn-skip:hover {
    background: #fff;
    border-color: #999;
    color: #333;
    transform: translateY(-2px);
}

#btn-skip:active {
    transform: scale(0.98);      /* Pequeño efecto de "pulsado" */
}

/* Menú Flotante de Configuración (FAB) */
.fab-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-main {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.fab-action {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.fab-main:hover, .fab-action:hover {
    transform: scale(1.1);
    background: white;
}
.close { float: right; cursor: pointer; font-size: 24px; }
/* Fondo del modal (oscuridad sutil) */
.modal {
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    z-index: 2000;
}

/* Contenedor centralizado */
.modal-content {
    background: rgba(255, 255, 255, 0.98);
    margin: 5vh auto;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    width: 65%;
    max-width: 400px;
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.5);
    animation: modalPop 0.5s ease-out;
}

@keyframes modalPop {
    0% { transform: scale(0.4); opacity: 0; }
    40% { transform: scale(1.15); opacity: 1; }
    70% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes modalClose {
    0% { transform: scale(1); opacity: 1; }
    40% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.1); opacity: 0; }
}

.modal-content.closing {
    animation: modalClose 0.35s ease-in forwards;
}

/* Títulos y textos */
.modal-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5rem;
}

#texto-gracioso {
    font-size: 1.1rem;
    color: #555;
    margin: 20px 0;
    line-height: 1.4;
}

/* Botón "Siguiente" */
.modal-content button {
    background: linear-gradient(135deg, #6200ea 0%, #ff007f 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(98, 0, 234, 0.3);
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(98, 0, 234, 0.5);
}

.modal-content button:active {
    transform: scale(0.95);
}

.modal-content .btn-secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    margin-top: 12px;
}

.modal-content .btn-secondary:hover {
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.5);
}

/* Estilos para la pantalla de START */
.start-modal {
    padding: 50px 30px;
}

.start-icon {
    font-size: 5.5rem;
    margin-bottom: 15px;
    display: inline-block;
    animation: floatBreathe 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

.start-title {
    font-size: 2.2rem;
    margin: 0 0 15px 0;
    background: -webkit-linear-gradient(45deg, #ff007f, #6200ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-start {
    font-size: 1.4rem !important;
    letter-spacing: 2px;
    padding: 18px 40px !important;
    background: linear-gradient(135deg, #ff007f 0%, #6200ea 100%) !important;
    animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
    0% { transform: scale(1); box-shadow: 0 8px 20px rgba(255, 0, 127, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 15px 35px rgba(255, 0, 127, 0.6); }
    100% { transform: scale(1); box-shadow: 0 8px 20px rgba(255, 0, 127, 0.4); }
}

.progress-container {
    width: 100%;
    height: 10px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    display: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff007f, #6200ea);
    box-shadow: 0 0 10px rgba(98, 0, 234, 0.5);
    transition: width 0.1s linear;
}

.progress-bar.danger {
    background: linear-gradient(90deg, #ff0844, #ffb199);
    box-shadow: 0 0 10px rgba(255, 8, 68, 0.6);
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes cardPop {
    0% { opacity: 0; transform: scale(0.5); }
    70% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.anim-question {
    animation: fadeInUp 0.5s ease-out;
}

.anim-card {
    animation: cardPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes floatBreathe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

.floating {
    animation: floatBreathe 1s ease-in-out infinite;
}
#btn-a.floating { animation-delay: 0s; }
#btn-b.floating { animation-delay: 0.1s; } /* Empieza a la mitad del ciclo de la otra */

/* Contenedor del banner publicitario */
.ad-banner-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    background: #e0e0e0; /* Color de fondo por si la pantalla es muy ancha */
    z-index: 1500;       /* Por encima del contenido pero debajo de modales */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}
.ad-banner-container img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: 75px; /* Altura intermedia de un banner móvil */
}