@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  color-scheme: dark;
  --ink: #e8f2f1;
  --muted: #9bb0b2;
  --paper: #071519;
  --card: #0d2025;
  --line: #263b3f;
  --teal: #3bc3b5;
  --teal-dark: #8be0d6;
  --mint: #153e39;
  --amber: #e9a23b;
  --danger: #ff8d82;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, rgba(59, 195, 181, .1), transparent 24rem),
    linear-gradient(180deg, #091b20, var(--paper));
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
}
button, input { font: inherit; }
button { cursor: pointer; }
.topbar {
  height: 72px; padding: 0 max(24px, calc((100% - 1120px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(187, 224, 220, .1); background: rgba(7, 21, 25, .86);
  backdrop-filter: blur(12px);
}
.brand { color: var(--ink); text-decoration: none; font: 800 18px Manrope; display: flex; gap: 10px; align-items: center; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  color: white; background: var(--teal); font-size: 11px; letter-spacing: -.03em;
}
.icon-button, .text-button {
  border: 0; background: transparent; color: var(--teal-dark); font-weight: 700; padding: 9px;
}
main { width: min(1120px, calc(100% - 32px)); margin: auto; }
.hero { padding: 68px 0 42px; max-width: 680px; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { font-family: Manrope, sans-serif; margin: 0; letter-spacing: -.04em; }
h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.02; }
h2 { font-size: 23px; }
.hero > p:last-child { color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 580px; }
.workspace { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.card, .settings {
  background: rgba(13, 32, 37, .96); border: 1px solid rgba(187, 224, 220, .12);
  border-radius: 20px; box-shadow: var(--shadow);
}
.card { padding: 30px; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.period { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.period-title, .suggestion-heading { display: flex; gap: 12px; align-items: center; }
.period-title small, .suggestion-heading small { display: block; color: var(--muted); margin-top: 2px; }
.period-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #3a3020; color: #ffc36c; }
.period-icon.moon { background: #173438; color: var(--teal); }
.time-row { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: end; margin-top: 19px; }
.time-row label, .settings label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
input {
  width: 100%; min-width: 0; padding: 13px 14px; color: var(--ink); background: #091a1f;
  border: 1px solid #365056; border-radius: 10px; outline: none;
}
input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 123, 116, .12); }
.connector { height: 1px; background: #365056; margin: 0 6px 23px; }
.primary-button, .secondary-button {
  border: 0; border-radius: 11px; font-weight: 800; padding: 14px 18px; transition: .2s;
}
.primary-button { width: 100%; margin-top: 28px; display: flex; justify-content: center; gap: 12px; color: white; background: #087b74; }
.primary-button:hover { background: #096a64; transform: translateY(-1px); }
.total-wrap { text-align: center; padding: 29px 0 22px; }
.total-wrap > span:first-child { display: block; color: var(--muted); font-size: 13px; }
.total-wrap > strong { display: block; font: 800 42px Manrope; letter-spacing: -.05em; margin: 5px 0 10px; }
.status { display: inline-block; padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status.neutral { background: #1a2b2f; color: var(--muted); }
.status.good { background: var(--mint); color: var(--teal-dark); }
.status.warn { background: #44341d; color: #ffc36c; }
.progress { height: 8px; background: #203337; border-radius: 8px; overflow: hidden; }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #39a58f); transition: width .45s ease; }
.progress-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 8px; }
.suggestion { margin-top: 27px; padding: 22px; border-radius: 15px; background: #102b2c; border: 1px solid #284846; }
.bulb { color: var(--teal); font-size: 24px; }
.suggestion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 21px; }
.suggestion-grid div { padding-bottom: 10px; border-bottom: 1px solid #294542; }
.suggestion-grid span { display: block; color: var(--muted); font-size: 11px; }
.suggestion-grid strong { font: 700 19px Manrope; }
.suggestion p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.secondary-button { width: 100%; color: var(--teal-dark); background: #12272b; border: 1px solid #365956; }
.settings { padding: 28px; margin-bottom: 24px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix input { flex: 1; }
.message { border-radius: 9px; margin-top: 20px; padding: 11px 13px; font-size: 13px; }
.error { color: var(--danger); background: #3b2222; }
.result-card.results-visible { animation: reveal-results .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes reveal-results {
  from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .result-card.results-visible { animation: none; }
  .progress span { transition: none; }
}
footer { padding: 42px 20px; text-align: center; color: var(--muted); font-size: 12px; }
[hidden] { display: none !important; }

@media (max-width: 780px) {
  .hero { padding-top: 46px; }
  .workspace { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 16px; }
  .icon-button { font-size: 0; }
  .icon-button span { font-size: 18px; }
  .card { padding: 22px; }
  .time-row { grid-template-columns: 1fr 18px 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
