@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --bg: #0a1d2c;
  --bg-alt: #0f283c;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-solid: #102638;
  --ink: #f3f7fb;
  --muted: #b8c7d6;
  --accent: #4cc9ff;
  --accent-strong: #25a2db;
  --accent-warm: #ffc857;
  --shadow: 0 24px 60px rgba(5, 18, 30, 0.45);
  --radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #153449, #081522 55%);
  color: var(--ink);
  position: relative;
}

.bg-blur {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(76, 201, 255, 0.15), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(255, 200, 87, 0.12), transparent 60%),
    radial-gradient(circle at 50% 85%, rgba(37, 162, 219, 0.2), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  padding: 36px 20px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.mark {
  width: 64px;
  height: 64px;
  background: linear-gradient(150deg, #6ee7ff, #1e9bd6);
  border-radius: 50% 50% 55% 55%;
  position: relative;
  box-shadow: inset 0 6px 14px rgba(255, 255, 255, 0.35), var(--shadow);
  transform: rotate(-12deg);
}

.mark::after {
  content: "";
  position: absolute;
  inset: 14px 18px auto auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  color: var(--accent-warm);
}

h1 {
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-size: clamp(2.4rem, 2.2rem + 1.6vw, 3.4rem);
  margin: 6px 0 6px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(76, 201, 255, 0.18);
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill.subtle {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.1);
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
textarea {
  background: rgba(10, 29, 44, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.96rem;
  outline: none;
}

input[type="range"] {
  accent-color: var(--accent);
  width: 100%;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.control-inline {
  display: flex;
  gap: 12px;
  align-items: center;
}

.control-inline input[type="range"] {
  flex: 1;
}

.value {
  min-width: 64px;
  font-weight: 600;
}

.time-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.time-row .to {
  color: var(--muted);
  font-size: 0.9rem;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 6px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
}

.day.active {
  background: rgba(76, 201, 255, 0.2);
  border-color: var(--accent);
  color: var(--ink);
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch input {
  width: 18px;
  height: 18px;
}

.hint {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}

.progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  height: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6ee7ff, #1e9bd6);
  width: 0%;
  transition: width 0.4s ease;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

.quick-add {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.02em;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(5, 18, 30, 0.35);
}

.btn.primary {
  background: linear-gradient(120deg, #6ee7ff, #1e9bd6);
  color: #042133;
}

.btn.light {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.schedule .label {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0 0 4px;
}

.schedule .value {
  font-size: 1.1rem;
  margin: 0;
}

.streak {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.streak .label {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0 0 4px;
}

.streak .value {
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.week-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.week-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.week-bar {
  width: 100%;
  height: 120px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.week-bar-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #6ee7ff, #1e9bd6);
  transition: height 0.4s ease;
}

.week-day {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.week-col.today .week-day {
  color: var(--accent);
}

.footer {
  margin-top: 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .day-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
