/* === Variables === */
:root {
  --main-bg: linear-gradient(135deg, #f8fafc 0%, #e0e7ef 100%);
  --card-bg: #fff;
  --chrono-color: #000000;
  --call-button-color: #25d366;
  --call-button-color-dark: #128c43;
  --primary: #ff6b6b;
  --primary-dark: #c0392b;
  --secondary: #4ecdc4;
  --secondary-dark: #38ada9;
  --accent: #ffe66d;
  --button-radius: 18px;
  --danger: #ff6b6b;
  --danger-dark: #c0392b;
  --info: #1a73e8;
  --info-dark: #1558b0;
  --text-main: #222;
  --text-muted: #555;
  --shadow: 0 4px 24px rgba(30, 34, 90, 0.10);
}

/* === Base Styles === */
* { user-select: none; box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--main-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}
header {
  width: 100vw;
  background: transparent;
  text-align: center;
  margin-bottom: 0;
  padding: 32px 0 0 0;
}
#titulo {
  font-size: 2.5em;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary-dark);
  margin: 0;
}
#subtitulo {
  font-size: .75em;
  font-style: italic;
  color: var(--text-muted);
  margin: 8px 0 0 0;
}
main#app {
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}
#main-content {
  border-radius: 24px;
  padding: 32px 20px 24px 20px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}
#cronometro {
  font-size: 5em;
  font-weight: 700;
  color: var(--chrono-color);
  margin: 0 0 16px 0;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px #e0e7ef;
}
#mensaje, #amiodaronaMensaje {
  display: none;
  font-size: 2em;
  margin-top: 12px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 2px 8px #e0e7ef;
}
#mensaje { color: var(--danger); background: #fff0f0; }
#amiodaronaMensaje { color: var(--info-dark); background: #e6f0ff; font-size: 1.5em; }

/* --- Modern Button Row --- */
.button-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  margin: 24px 0 12px 0;
}
.button-row button {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 0 8px 0;
  font-size: 1.1em;
  font-weight: 600;
  border: none;
  transition: background 0.2s, transform 0.1s;
  outline: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  background-color: transparent;
  gap: 6px;
}
.button-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--info);
  color: #fff;
  font-size: 2em;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px #e0e7ef;
}
#botonInicioRCP .button-icon { background: var(--primary); }
#botonAdrenalina .button-icon { background: var(--secondary); }
#botonDesfibrilacion .button-icon { background: var(--accent); color: var(--primary-dark); }
#botonDetener .button-icon { background: var(--info); }
.button-label {
  font-size: .7em;
  color: var(--primary-dark);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.button-row button:active .button-icon,
.button-row button:hover .button-icon {
  filter: brightness(0.95) contrast(1.1);
  transform: scale(1.08);
}
.button-row button:active .button-label,
.button-row button:hover .button-label {
  color: var(--info-dark);
}
/* Remove all-caps from button labels */
.button-row button .button-label {
  text-transform: none;
}

/* --- Other Buttons --- */
#nuevoPCR {
  display: none;
  width: 100%;
  max-width: 220px;
  height: 56px;
  background: var(--danger);
  color: #fff;
  font-size: 1.1em;
  border-radius: var(--button-radius);
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 18px 0 0 0;
  font-weight: 600;
  box-shadow: 0 2px 8px #e0e7ef;
}
#nuevoPCR:hover { background: var(--danger-dark); }
#speedControl {
  background: var(--primary);
  color: #fff;
  font-size: 1em;
  width: 100%;
  max-width: 220px;
  margin: 12px 0 0 0;
  border-radius: var(--button-radius);
  box-shadow: 0 2px 8px #e0e7ef;
}
#speedControl:hover { background: var(--primary-dark); }

.contadores {
  margin-top: 18px;
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
  justify-content: center;
}
.contador {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text-main);
  background: #f6f8fa;
  border-radius: 8px;
  padding: 8px 16px;
  box-shadow: 0 1px 4px #e0e7ef;
}
#contador { color: var(--danger); background: #fff0f0; }
#contadorChoques { color: var(--info-dark); background: #e6f0ff; }

.resumen-list {
  list-style-type: none;
  padding: 0;
  margin: 24px 0 0 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.resumen-list li {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 14px 10px;
  background: #f6f8fa;
  color: var(--text-main);
  font-size: 1.1em;
  font-weight: 500;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 1px 4px #e0e7ef;
}

@keyframes parpadeo {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.parpadeo {
  animation: parpadeo 1s infinite;
}

@media (max-width: 600px) {
  #main-content {
    max-width: 98vw;
    padding: 18px 2vw 18px 2vw;
  }
  .button-row {
    gap: 8px;
  }
  .resumen-list li {
    max-width: 98vw;
    font-size: 1em;
  }
  #cronometro {
    font-size: 2.7em;
  }
}

.lightning-icon {
  display: inline-block;
  width: 30px;
  height: 30px;
  margin-left: 10px;
}
.help-button {
  position: fixed;
  right: 20px;
  top: 20px;
  width: 120px;
  height: 120px;
  background-color: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  z-index: 1000;
  animation: pulse 1.5s infinite;
}
.help-button:hover { background-color: darkred; }
.help-button span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-shadow: 2px 2px 4px black;
}

.call-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--call-button-color);
  color: #fff;
  font-size: 1.5em;
  box-shadow: 0 2px 8px #e0e7ef;
  text-decoration: none;
  transition: background 0.18s, transform 0.12s;
  margin-left: 8px;
}
.call-button:hover, .call-button:active {
  background: var(--call-button-color-dark);
  transform: scale(1.08);
  color: #fff;
} 