/* ── Pantallas de inicio y fin ── */
.screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-screen, 300);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 2rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(10,5,20,0.98) 0%, rgba(5,2,10,0.99) 100%);
}
.screen.hidden { display: none; }

.screen-emoji {
  font-size: 5rem;
  animation: popIn 0.5s cubic-bezier(.36,1.8,.6,1) both;
}

.screen-title {
  font-size: clamp(2rem, 9vw, 3.5rem);
  color: white;
  line-height: 1.1;
}

.screen-sub {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  max-width: 280px;
}

/* ── Selector de dificultad ── */
.diff-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
}

.diff-btn {
  padding: 0.9rem 1.4rem;
  border-radius: 18px;
  border: 3px solid transparent;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: white;
  transition: background 0.15s, transform 0.1s;
  text-align: left;
}
.diff-btn:active { transform: scale(0.96); }
.diff-btn:hover  { background: rgba(255,255,255,0.10); }
.diff-btn.easy   { border-color: var(--diff-easy,   #39FF14); }
.diff-btn.normal { border-color: var(--diff-normal,  #FFE600); }
.diff-btn.hard   { border-color: var(--diff-hard,    #FF3060); }

.diff-icon { font-size: 1.8rem; flex-shrink: 0; }
.diff-info { flex: 1; }
.diff-name { display: block; line-height: 1; }
.diff-desc {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* ── Botones de fin de juego ── */
.btn-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-big {
  padding: 0.9rem 2rem;
  border-radius: var(--radius-pill, 50px);
  border: none;
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0,0,0,0.35);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-big:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,0.35); }
.btn-big.yellow { background: var(--yellow, #FFE600); color: #1a1000; }
.btn-big.green  { background: var(--green,  #39FF14); color: #0a1a05; }
.btn-big.cyan   { background: var(--cyan,   #00F0FF); color: #050e1a; }

/* ── Puntuación final ── */
.final-score {
  font-size: 4rem;
  animation: popIn 0.5s cubic-bezier(.36,1.8,.6,1) 0.2s both;
}
.final-label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -0.5rem;
  color: rgba(255,255,255,0.5);
}
.final-stars {
  font-size: 2.2rem;
  letter-spacing: 0.15rem;
  animation: popIn 0.5s cubic-bezier(.36,1.8,.6,1) 0.1s both;
}

/* ── Contador regresivo ── */
#countdown {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(8rem, 30vw, 14rem);
  color: white;
  pointer-events: none;
  opacity: 0;
}
#countdown.show { animation: cdPop 0.8s cubic-bezier(.36,1.6,.6,1); }

/* ── Combo ── */
#combo {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 202;
  font-size: 2.5rem;
  pointer-events: none;
  opacity: 0;
}
#combo.show { animation: comboAnim 0.8s ease-out forwards; }

/* ── Puntos flotantes ── */
.float-pts {
  position: fixed;
  pointer-events: none;
  z-index: var(--z-float, 201);
  font-size: 1.6rem;
  text-shadow: 0 0 10px currentColor;
  animation: floatPts 0.9s ease-out forwards;
  white-space: nowrap;
}

/* ── Keyframes ── */
@keyframes popIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
@keyframes cdPop {
  0%   { opacity: 1; transform: scale(0.5); }
  60%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(0.8); }
}
@keyframes comboAnim {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(0.8); }
  40%  { opacity: 1; transform: translate(-50%,-70%) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%,-100%) scale(0.9); }
}
@keyframes floatPts {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-140%) scale(0.8); }
}
