/* === Box sizing universal === */
html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* === Base del body === */
body {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text);
  font-size: var(--font-base);
  min-height: 100vh;
  padding-bottom: 7rem;
}

/* === Contenedores === */
.container,
.card,
form,
section,
main {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.app-container {
  max-width: 500px;
  margin: 0 auto;
  padding-bottom: 6rem;
}

/* === Títulos === */
h1, h2 {
  text-align: center;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 1rem 0;
}

/* === Tipografía base para elementos comunes === */
body,
label,
input,
select,
textarea,
button,
h1, h2, h3, h4, h5, h6,
p,
span,
small {
  color: var(--color-text);
}

/* === Inputs y campos interactivos === */
input,
textarea,
select {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* === Texto especial === */
#contador,
#pausaTexto,
.pausa-info,
.mensaje,
.mensaje span,
.contador,
.fin-exacto {
  color: var(--color-text);
}

/* === Botón activo === */
.modo-activo {
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 4px var(--color-accent);
  border-radius: var(--radius);
}

/* === Inputs deshabilitados === */
input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--color-muted);
  color: var(--color-text);
  opacity: 0.6;
}

/* === Responsive mínimos === */
@media (max-width: 480px) {
  h1, h2 {
    font-size: 1.25rem;
  }
  .app-container {
    padding: 0 1rem 6rem;
  }
}

/* === Scroll & overflow === */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* === Header fix === */
.header {
  position: relative;
}

/* === Botón logout === */
.btn-logout {
  background-color: var(--color-danger);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.2;
  transition: background-color 0.2s ease;
  height: 32px;
  min-width: 80px;
}

.btn-logout:hover {
  background-color: #c53030;
}

/* === MODO OSCURO === */
html[data-theme="dark"] .usuario-info {
  background-color: #111;
  color: #fff;
  border: 1px solid #444;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

html[data-theme="dark"] .btn-logout {
  background-color: #c00;
  color: #fff;
}

html[data-theme="dark"] #usuarioEmail {
  color: #fff;
}
/* === Tamaño del logo de la app === */
.logo {
  display: block;
  margin: 0 auto 0.5rem auto;
  width: 64px;
  height: auto;
}
