body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE and Edge */
}
body::-webkit-scrollbar, html::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera */
}
#pasapalabra-game * {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#pasapalabra-game {
--primary: #4f46e5;
--success: #22c55e;
--error: #ef4444;
--warning: #eab308;
--bg-dark: #1e1b4b;
--text-light: #fff;
--radius: 12px;
font-family: system-ui, -apple-system, sans-serif;
background: radial-gradient(circle, var(--bg-dark) 0%, #0a0826 100%);
color: var(--text-light);
display: none; /* Ocultar inicialmente */
flex-direction: column;
align-items: center;
min-height: 100vh;
width: 100%;
overflow: hidden;
}
.loaded #pasapalabra-game {
display: flex;
}
#pasapalabra-game .game {
width: 100%;
max-width: 1200px;
padding: 1rem;
display: none; /* Ocultar el contenido del juego inicialmente */
position: relative;
margin: 0 auto !important;
flex-direction: column;
}
#pasapalabra-game .welcome {
text-align: center;
padding: 2rem;
display: flex;
flex-direction: column;
align-items: center;
}
#pasapalabra-game .welcome h1 {
font-size: 2.5rem;
margin-bottom: 0.75rem;
}
#pasapalabra-game .welcome img {
height: 40vh;
margin-top:1.5rem;
}
div#pasapalabra-welcome .btn {
margin-top: 2rem;
height: 44px;
width: 200px;
}
/* Animación de pálpito para el botón de comenzar */
.btn-pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
.game-container {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2rem;
}
.rosco-container {
display: flex;
flex-direction: column;
align-items: center;
}
#pasapalabra-game .header {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding-bottom: 1rem;
gap: 1rem;
}
#pasapalabra-game .stats {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
flex: 1;
}
#pasapalabra-game .stats div {
display: flex;
align-items: center;
gap: 0.5rem;
}
#pasapalabra-game .config {
display: flex;
gap: 0.5rem;
flex-shrink: 0;
}
#pasapalabra-game .btn {
padding: 0.5rem 1rem;
border: none;
border-radius: var(--radius);
cursor: pointer;
font-weight: 600;
transition: all 0.2s;
background: var(--primary);
color: var(--text-light);
}
#pasapalabra-game .btn:hover {
transform: translateY(-2px);
filter: brightness(1.1);
}
#pasapalabra-game .btn:active {
transform: translateY(0);
}
#pasapalabra-game .btn-hint {
background: var(--warning);
}
#pasapalabra-game .btn-hint:disabled {
background: #666;
cursor: not-allowed;
opacity: 0.7;
}
#pasapalabra-game .btn-settings {
background: #6366f1;
}
#pasapalabra-game .btn-bg-mute {
background: #ff5722;
}
#pasapalabra-game .btn-pause {
background: #607d8b;
}
#pasapalabra-game .rosco {
position: relative;
width: min(70vmin, 500px);
aspect-ratio: 1 / 1; /* Mantener relación 1:1 */
max-height: calc(100vh - 200px);
margin: 0 auto;
animation: pasapalabra-float 6s ease-in-out infinite;
transition: transform 0.5s;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff; /* Fondo blanco para evitar líneas negras */
box-shadow: 0 0 10px rgba(0,0,0,0.1); /* Sombra suave */
}
#pasapalabra-game #pasapalabra-duck {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50%;
max-width: 280px;
display: none;
opacity: 1;
z-index: 11;
}
#pasapalabra-game .countdown {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 5rem;
color: #fff;
opacity: 0;
}
.countdown.animate {
animation: countdown-animation 1s forwards;
}
@keyframes countdown-animation {
0% {
transform: translate(-50%, -50%) scale(0.5);
opacity: 0;
}
50% {
transform: translate(-50%, -50%) scale(1);
opacity: 1;
}
100% {
transform: translate(-50%, -50%) scale(1.5);
opacity: 0;
}
}
#pasapalabra-game .letter {
position: absolute;
width: clamp(2rem, 4.5vw, 2.8rem);
height: clamp(2rem, 4.5vw, 2.8rem);
background: var(--primary);
border-radius: 50%;
display: grid;
place-items: center;
font-weight: 700;
font-size: clamp(0.8rem, 2.2vw, 1.1rem);
border: 2px solid var(--text-light);
transition: all 0.3s;
cursor: pointer;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
opacity: 0;
transform: scale(0);
}
#pasapalabra-game .letter.animate-in {
opacity: 1;
transform: scale(1);
}
#pasapalabra-game .letter.correct {
background: var(--success);
}
#pasapalabra-game .letter.incorrect {
background: var(--error);
}
#pasapalabra-game .letter.current {
animation: pasapalabra-pulse 1.5s infinite;
box-shadow: 0 0 15px rgba(255,255,255,0.5);
}
#pasapalabra-game .game-ui {
display: flex;
flex-direction: column;
width: 40%; /* Ancho fijo del 40% */
max-width: 400px; /* Ancho máximo de 400px */
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: var(--radius);
padding: 1rem;
position: relative;
box-sizing: border-box;
}
#pasapalabra-game .timer-bubble {
position: absolute;
top: 50%;
left: 50%;
background: orange;
border: 2px solid #fff;
color: #fff;
width: clamp(45px, 10vw, 65px);
height: clamp(45px, 10vw, 65px);
border-radius: 50%;
display: none; /* Ocultar inicialmente */
align-items: center;
justify-content: center;
font-size: clamp(0.8rem, 1.8vw, 0.9rem);
cursor: default;
transition: background-color 0.5s;
z-index: 10;
}
#pasapalabra-game .timer-bubble.blink {
animation: blink 1s infinite;
}
#pasapalabra-game .question {
font-size: clamp(1rem, 2.8vw, 1.2rem);
text-align: center;
margin: 0.5rem 0;
min-height: 2rem;
word-wrap: break-word;
overflow-wrap: break-word;
}
#pasapalabra-game .current-hint {
font-size: clamp(1.1rem, 3.5vw, 1.4rem);
text-align: center;
margin: 0.5rem 0;
color: var(--warning);
transition: opacity 0.5s;
display: none;
}
#pasapalabra-game .input-group {
display: flex;
gap: 0.5rem;
justify-content: center;
margin-top: 0.75rem;
flex-wrap: wrap;
}
#pasapalabra-game .answer-input {
padding: 0.7rem 1rem;
border-radius: var(--radius);
border: 2px solid var(--primary);
background: rgba(255,255,255,0.9);
font-size: 1rem;
width: min(100%, 300px);
}
#pasapalabra-game .answer-input:focus {
outline: 0;
border-color: #818cf8;
}
#pasapalabra-game .controls {
display: flex;
gap: 1rem;
justify-content: center;
margin-top: 1.25rem;
flex-wrap: wrap;
}
#pasapalabra-game .modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.8);
backdrop-filter: blur(5px);
z-index: 100;
}
#pasapalabra-game .modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--bg-dark);
padding: 2rem;
border-radius: var(--radius);
width: min(90%, 400px);
text-align: center;
}
#pasapalabra-game .modal h2 {
margin-bottom: 1rem;
}
#pasapalabra-game .modal label {
display: block;
margin: 0.5rem 0;
}
#pasapalabra-game .modal input[type=number] {
width: 100%;
padding: 0.5rem;
margin-bottom: 1rem;
border-radius: var(--radius);
border: 1px solid var(--primary);
}
#pasapalabra-game .stars {
margin: 1rem 0;
}
#pasapalabra-game .stars .star {
font-size: 2rem;
color: gold;
animation: pasapalabra-bounce 0.5s ease infinite alternate;
}
#pasapalabra-game .hints-display {
display: none;
margin: 3rem auto 1rem auto;
font-size: 1.2rem;
color: var(--text-light);
transition: opacity 0.5s;
text-align: center;
text-transform: uppercase;
}
#pasapalabra-game .hints-display.active {
display: block;
}
#pasapalabra-game .rosco.move-up {
animation: moveRoscoUp 0.5s forwards;
}
#pasapalabra-game .rosco.move-down {
animation: moveRoscoDown 0.5s forwards;
}
@keyframes pasapalabra-pulse {
0% { transform: scale(1); }
50% { transform: scale(1.1); }
100% { transform: scale(1); }
}
@keyframes pasapalabra-float {
0% { transform: translateY(0); }
50% { transform: translateY(-10px); }
100% { transform: translateY(0); }
}
@keyframes pasapalabra-bounce {
from { transform: translateY(0); }
to { transform: translateY(-10px); }
}
@keyframes blink {
0%, 90% { opacity: 1; }
95%, 100% { opacity: 0; }
}
@keyframes pasapalabra-duck-fadeout {
0% { opacity: 1; }
100% { opacity: 0; }
}
.fade-out {
animation: pasapalabra-duck-fadeout 1s forwards;
animation-delay: 1.5s;
}
@keyframes moveRoscoUp {
from { transform: translateY(0); }
to { transform: translateY(-100px); }
}
@keyframes moveRoscoDown {
from { transform: translateY(-100px); }
to { transform: translateY(0); }
}
/* Animación para la cuenta regresiva */
@keyframes countdown-animation {
0% {
transform: translate(-50%, -50%) scale(0.5);
opacity: 0;
}
50% {
transform: translate(-50%, -50%) scale(1);
opacity: 1;
}
100% {
transform: translate(-50%, -50%) scale(1.5);
opacity: 0;
}
}
.countdown.animate {
animation: countdown-animation 1s forwards;
}
/* Ajustes para resoluciones amplias */
@media (min-width: 768px) {
.game-container {
flex-direction: row;
align-items: center;
justify-content: center;
gap: 5.625rem;
}
#pasapalabra-game .game-ui {
margin-top: 0;
}
#pasapalabra-game .rosco {
width: min(500px, 70vmin);
aspect-ratio: 1 / 1; /* Mantener relación 1:1 */
}
}
/* Evitar que el rosco exceda el alto de la pantalla */
@media (min-height: 500px) {
#pasapalabra-game .rosco {
max-height: calc(100vh - 200px);
}
}
/* Ajustes responsivos */
@media (max-width: 767px) {
.game-container {
flex-direction: column;
}
}
@media (max-width: 480px) {
#pasapalabra-game .header {
flex-direction: column-reverse;
gap: 1rem;
}
#pasapalabra-game .stats {
justify-content: center;
}
#pasapalabra-game .config {
justify-content: center;
}
.game-container {
flex-direction: column;
align-items: center;
}
#pasapalabra-game .rosco {
width: min(85vw, 400px);
margin: 1rem auto;
}
#pasapalabra-game .letter {
width: clamp(1.8rem, 4vw, 2.5rem);
height: clamp(1.8rem, 4vw, 2.5rem);
font-size: clamp(0.7rem, 2vw, 1rem);
}
#pasapalabra-game .timer-bubble {
width: clamp(40px, 8vw, 55px);
height: clamp(40px, 8vw, 55px);
font-size: clamp(0.7rem, 1.6vw, 0.85rem);
}
#pasapalabra-game .countdown {
font-size: 3rem;
}
}
/* Scrollbar Invisible pero Funcional */
/* Firefox */
body, html {
scrollbar-width: none; /* Oculta scrollbar en Firefox */
}
/* Chrome, Safari y Opera */
body::-webkit-scrollbar, html::-webkit-scrollbar {
width: 0px;
background: transparent; /* Opcional: color del scrollbar */
}