* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html, body {
  height: 100%;
}

body {
  background: linear-gradient(180deg, #e4f1ff, #f7fbff);
  color: #123152;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Tema escuro */
body.dark {
  background: radial-gradient(circle at top, #111827, #020617);
  color: #f9fafb;
}

.header {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  color: #fff;
  box-shadow: 0 2px 10px rgba(15,23,42,0.35);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-title .emoji {
  font-size: 1.8rem;
}

.header-text h1 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.header-text small {
  font-size: 0.8rem;
  opacity: 0.9;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.header-actions button {
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.header-actions button:hover {
  background: rgba(255,255,255,0.28);
}

.controls {
  padding: 1.25rem 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

label {
  min-width: 80px;
  font-size: 0.9rem;
}

select,
input[type="number"],
input[type="search"] {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  min-width: 160px;
  background: #ffffff;
  font-size: 0.9rem;
}

button#read,
button#audio,
button#find {
  border-radius: 999px;
  border: none;
  padding: 0.45rem 0.9rem;
  background: #facc15;
  color: #1f2933;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.9rem;
}

button#read:hover,
button#audio:hover,
button#find:hover {
  background: #fde047;
}

.content {
  flex: 1;
  padding: 1.25rem 1.5rem 1.5rem;
  max-width: 960px;
  width: 100%;
  margin: 0.5rem auto 0;
  background: rgba(255,255,255,0.95);
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: 0 -4px 18px rgba(15,23,42,0.08);
  overflow-y: auto;
}

body.dark .content {
  background: rgba(15,23,42,0.92);
  box-shadow: 0 -4px 18px rgba(0,0,0,0.5);
}

.content p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.content h3 {
  margin: 0.75rem 0 0.4rem;
}

mark {
  background: #facc15;
  padding: 0 0.15rem;
}

.footer {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #4b5563;
}
