:root {
  --bg-color: #fffdf7;
  --surface: #ffffff;
  --surface-hover: #f5f0e3;
  --text-primary: #17202a;
  --text-secondary: #475569;
  --accent: #d97706;
  --accent-glow: rgba(217, 119, 6, 0.18);
  --border: #e2e8f0;
}
[data-theme="dark"] {
  --bg-color: #17202a;
  --surface: #1e2b3c;
  --surface-hover: #26364a;
  --text-primary: #fffdf7;
  --text-secondary: #94a3b8;
  --accent: #f6b84b;
  --accent-glow: rgba(246, 184, 75, 0.2);
  --border: #334155;
}
[data-theme="dim"] {
  --bg-color: #1e3a8a;
  --surface: #2548a8;
  --surface-hover: #2e54bd;
  --text-primary: #fffdf7;
  --text-secondary: rgba(255, 253, 247, 0.78);
  --accent: #2bae9a;
  --accent-glow: rgba(43, 174, 154, 0.25);
  --border: rgba(255, 253, 247, 0.2);
}
[data-theme="black"] {
  --bg-color: #000000;
  --surface: #0a0a0a;
  --surface-hover: #141414;
  --text-primary: #fffdf7;
  --text-secondary: rgba(255, 253, 247, 0.7);
  --accent: #f6b84b;
  --accent-glow: rgba(246, 184, 75, 0.22);
  --border: rgba(255, 253, 247, 0.18);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

h1, h2, h3, .logo {
  font-family: 'Georgia', serif;
}

.app-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.dot {
  color: var(--accent);
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: normal;
}

.header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.calculator {
  background: var(--surface);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border: 1px solid var(--border);
}

.input-card {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px dashed var(--border);
}

.input-card label {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.time-input-wrapper input {
  background: var(--bg-color);
  border: 2px solid var(--border);
  color: var(--text-primary);
  font-size: 3.5rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s;
}

.time-input-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* Chrome/Safari fix for time picker icon */
::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.results-area h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.cycles-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cycle-card {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s;
}

.cycle-card:hover {
  transform: translateY(-2px);
}

.cycle-card .time {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cycle-card .info {
  text-align: right;
  font-size: 1.1rem;
}

.cycle-card .info span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cycle-card.optimal {
  border: 2px solid var(--accent);
  background: rgba(246, 184, 75, 0.05);
  position: relative;
}

.badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg-color);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.education-footer {
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.education-footer strong {
  color: var(--text-primary);
}

/* --- CSS DE REFERÊNCIAS --- */
.references { margin-top: 2rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; text-align: left; color: var(--text-primary); }
.references h3 { margin-top: 0; font-size: 1rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.references p { margin-bottom: 1rem; color: var(--text-secondary); }
.references ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.references li { margin-bottom: 0.5rem; color: var(--text-secondary); }
.references a { color: var(--accent); text-decoration: none; font-weight: bold; }
.references .disclaimer { margin-top: 1rem; font-style: italic; color: var(--text-secondary); font-size: 0.85rem; border-top: 1px solid var(--border); padding-top: 0.8rem; }
