/* style.css — Pianoforte */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Georgia, 'Times New Roman', serif;
  background: #1a2a4a;
  color: #fff;
}

/* --- PANTALLAS --- */
.screen {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
}

/* --- PANTALLA DE BIENVENIDA --- */
#screen-welcome {
  background: linear-gradient(160deg, #1a2a4a 0%, #2a4a7a 60%, #1a3a5a 100%);
  gap: 24px;
}

.title-main {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-style: italic;
  letter-spacing: 0.04em;
  color: #f0c060;
  text-shadow: 0 2px 18px rgba(240,180,60,0.3);
}

.title-sub {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn {
  padding: 14px 36px;
  border: none;
  border-radius: 40px;
  font-family: Georgia, serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #e8a020;
  color: #1a2a4a;
  font-weight: bold;
  box-shadow: 0 4px 20px rgba(232,160,32,0.35);
}

.btn-primary:hover {
  background: #f0b830;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,160,32,0.5);
}

.btn-secondary {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.85rem;
}

.btn-secondary:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

/* --- PANTALLA DE CALIBRACIÓN --- */
#screen-calibration {
  background: linear-gradient(160deg, #1a2a4a 0%, #1a3a5a 100%);
  gap: 16px;
}

.calib-title {
  font-size: 1.6rem;
  font-style: italic;
  color: #f0c060;
  margin-bottom: 4px;
}

.calib-instructions {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  text-align: center;
  max-width: 380px;
  line-height: 1.6;
}

#calib-canvas {
  width: min(480px, 90vw);
  height: 220px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
}

/* --- PANTALLA DE JUEGO --- */
#screen-game {
  padding: 0;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Botón de pausa superpuesto */
#btn-pause {
  position: absolute;
  top: 12px;
  left: 68px;
  padding: 6px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: rgba(255,255,255,0.8);
  font-family: Georgia, serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

#btn-pause:hover {
  background: rgba(0,0,0,0.5);
}

/* --- PANTALLA DE RESULTADOS --- */
#screen-results {
  background: linear-gradient(160deg, #1a2a4a 0%, #2a4a7a 60%, #1a3a5a 100%);
  gap: 20px;
}

#results-content {
  text-align: center;
  margin: 8px 0 4px;
}
  background: rgba(10,20,40,0.88);
  backdrop-filter: blur(8px);
  gap: 20px;
}

.pause-title {
  font-size: 2rem;
  font-style: italic;
  color: #f0c060;
}

#pause-score {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
}
