:root {
  --bg: #070b16;
  --bg-soft: #0b1120;
  --surface: #0f1626;
  --surface-2: #141c31;
  --surface-3: #1a2339;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2ff;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --muted-2: #8494aa;
  --violet: #8b5cf6;
  --violet-light: #c4b5fd;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --danger: #fb7185;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.9);
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, blockquote {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(950px 620px at 7% -6%, rgba(124, 92, 255, 0.20), transparent 62%),
    radial-gradient(820px 560px at 98% 8%, rgba(34, 211, 238, 0.11), transparent 58%),
    radial-gradient(900px 700px at 48% 108%, rgba(52, 211, 153, 0.08), transparent 62%);
}

.bg-orbs::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 20%, transparent 78%);
}

.page {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 30px 24px 90px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.hidden {
  display: none !important;
}

.grad {
  background: linear-gradient(96deg, #c4b5fd 0%, #67e8f9 55%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 22, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
  color: #071021;
  box-shadow: 0 8px 26px -8px rgba(139, 92, 246, 0.8);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: -0.02em;
}

.brand-text strong {
  color: var(--text);
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.16s ease, background 0.16s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
}

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.save-state.saving .save-dot {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.7);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.65fr);
  gap: 44px;
  align-items: center;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(128deg, rgba(139, 92, 246, 0.18) 0%, rgba(15, 22, 38, 0.68) 44%, rgba(34, 211, 238, 0.09) 100%);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  right: -180px;
  top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(75% 85% at 74% 20%, #000 0%, transparent 76%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 780px;
  margin-top: 14px;
  font-size: clamp(32px, 4.1vw, 51px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-sub {
  max-width: 620px;
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 15.5px;
  line-height: 1.65;
}

.hero-sub strong {
  color: var(--text);
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.streak-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 13, 26, 0.55);
  backdrop-filter: blur(12px);
}

.flame {
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(251, 146, 60, 0.55));
}

.streak-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--font-display);
}

.streak-value strong {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: #fed7aa;
}

.streak-value span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.streak-caption {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-quote {
  padding-left: 16px;
  border-left: 2px solid rgba(139, 92, 246, 0.55);
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  line-height: 1.65;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(139, 92, 246, 0.9);
}

.btn.primary:hover {
  filter: brightness(1.1);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-strong);
  color: var(--text-soft);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.btn.soft {
  background: rgba(139, 92, 246, 0.13);
  border-color: rgba(139, 92, 246, 0.26);
  color: #ddd1ff;
}

.btn.soft:hover {
  background: rgba(139, 92, 246, 0.2);
}

.btn.danger {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
}

.btn.danger-ghost {
  background: rgba(244, 63, 94, 0.07);
  border-color: rgba(244, 63, 94, 0.26);
  color: #fda4af;
}

.btn.danger-ghost:hover {
  background: rgba(244, 63, 94, 0.13);
}

.btn.small {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 12px;
}

.btn.full {
  width: 100%;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.35);
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--text);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
}

.icon-btn.tiny {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border-color: transparent;
  background: transparent;
}

.icon-btn.tiny svg {
  width: 15px;
  height: 15px;
}

.icon-btn.danger:hover {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.1);
}

/* ---------- Inputs ---------- */

.input {
  width: 100%;
  min-height: 43px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input::placeholder {
  color: var(--muted-2);
}

.input:hover {
  border-color: var(--line-strong);
}

.input:focus {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

input[type="date"],
input[type="search"],
input[type="number"] {
  color-scheme: dark;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box .input {
  padding-left: 36px;
}

/* ---------- Footer ---------- */

.site-footer {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 26px 24px 54px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 11.5px;
}

.footer-actions {
  display: flex;
  gap: 16px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
