
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --bg: #0b1020;
  --panel: #131c30;
  --panel-light: #1b2941;
  --border: #293751;
  --text: #edf2ff;
  --muted: #91a0ba;
  --accent: #9a9eff;
  --accent-soft: #c2c3ff;
  --green: #6ee7b7;
  --ring: #a6a8ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% -20%, #303866 0, transparent 48%),
    var(--bg);
  font-family: 'DM Sans', sans-serif;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  height: 72px;
  padding: 0 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(145,160,186,.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 800 20px Manrope, sans-serif;
  text-decoration: none;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #10142b;
  background: var(--accent-soft);
  font-size: 23px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.today-label, footer {
  color: #75839e;
  font-size: 10px;
  letter-spacing: 1.4px;
}

.settings-button {
  width: 37px;
  height: 37px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel);
  font-size: 18px;
}

.container {
  width: min(1000px, calc(100% - 36px));
  margin: auto;
}

.intro {
  padding: 55px 0 34px;
  text-align: center;
}

.eyebrow {
  color: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

.intro h1 {
  margin: 13px 0 10px;
  font: 800 clamp(32px, 5vw, 48px)/1.15 Manrope, sans-serif;
  letter-spacing: -1.8px;
}

.intro h1 span {
  color: var(--accent-soft);
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}

.timer-panel, .side-panel {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: rgba(19,28,48,.92);
}

.timer-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mode-tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #0e1628;
}

.mode-tab {
  padding: 9px 15px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  transition: .2s;
}

.mode-tab.active {
  color: #11152e;
  background: var(--accent-soft);
  font-weight: 700;
}

.timer-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(280px, 100%);
  aspect-ratio: 1;
  margin: 25px 0 18px;
}

.timer-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring circle {
  fill: none;
  stroke-width: 7;
}

.ring-track {
  stroke: #293650;
}

.ring-progress {
  stroke: var(--ring);
  stroke-linecap: round;
  stroke-dasharray: 791.68;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .4s linear, stroke .3s;
}

.timer-content {
  position: relative;
  text-align: center;
}

.timer-caption {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

.timer-display {
  margin: 8px 0;
  font: 800 clamp(48px, 8vw, 65px)/1.1 Manrope, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -3px;
}

.timer-status {
  color: var(--muted);
  font-size: 11px;
}

.timer-actions {
  display: flex;
  gap: 10px;
  width: min(280px, 100%);
}

.start-button {
  flex: 1;
  min-height: 47px;
  border: 0;
  border-radius: 10px;
  color: #11152e;
  background: var(--accent-soft);
  font-weight: 700;
  font-size: 13px;
}

.start-button:hover, .save-settings:hover {
  filter: brightness(1.08);
}

.reset-button {
  width: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel-light);
  font-size: 22px;
}

.session-note {
  margin: 17px 0 0;
  color: #7786a2;
  font-size: 11px;
  text-align: center;
}

.side-panel {
  display: flex;
  flex-direction: column;
}

.panel-heading, .task-heading, .modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading h2, .modal-heading h2 {
  margin: 7px 0 0;
  font: 700 19px Manrope, sans-serif;
}

.progress-icon {
  color: var(--accent-soft);
  font-size: 25px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 23px 0 27px;
}

.stat-card {
  padding: 17px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-light);
}

.stat-number {
  display: block;
  margin-bottom: 5px;
  font: 700 27px Manrope, sans-serif;
  color: var(--accent-soft);
}

.stat-label {
  color: var(--muted);
  font-size: 10px;
}

.task-heading {
  margin-bottom: 12px;
}

.task-heading h3 {
  margin: 0;
  font: 700 15px Manrope, sans-serif;
}

.task-heading span {
  color: var(--muted);
  font-size: 10px;
}

.task-form {
  display: flex;
  gap: 8px;
}

.task-form input {
  min-width: 0;
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: #0e1628;
  font-size: 11px;
}

.task-form input:focus {
  border-color: var(--accent);
}

.task-form button {
  width: 42px;
  border: 0;
  border-radius: 9px;
  color: #11152e;
  background: var(--accent-soft);
  font-size: 23px;
}

.task-list {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(27,41,65,.65);
}

.task-item input {
  accent-color: var(--accent);
}

.task-text {
  flex: 1;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.task-item.completed .task-text {
  color: #7886a0;
  text-decoration: line-through;
}

.delete-task {
  border: 0;
  color: #8e9bb3;
  background: transparent;
  font-size: 16px;
}

.task-empty {
  margin: 16px 0 0;
  color: #74829c;
  font-size: 11px;
  text-align: center;
}

.quote-panel {
  margin: 18px 0;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(19,28,48,.65);
  text-align: center;
}

.quote-mark {
  color: var(--accent-soft);
  font: 700 35px Georgia, serif;
}

.quote-panel p {
  margin: 0 0 10px;
  font: 600 15px Manrope, sans-serif;
}

.quote-caption {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.5px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 2px 30px;
  font-size: 9px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4,8,18,.78);
}

.modal-backdrop[hidden] {
  display: none;
}

.settings-modal {
  width: min(420px, 100%);
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #151f34;
  box-shadow: 0 25px 80px #0008;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  background: var(--panel-light);
  font-size: 21px;
}

#settings-form {
  display: grid;
  gap: 17px;
  margin-top: 25px;
}

#settings-form label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

#settings-form label span {
  display: flex;
  align-items: center;
  gap: 8px;
}

#settings-form input {
  width: 65px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: #0e1628;
}

.save-settings {
  padding: 12px;
  border: 0;
  border-radius: 9px;
  color: #11152e;
  background: var(--accent-soft);
  font-weight: 700;
}

@media (max-width: 720px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .intro {
    padding-top: 43px;
  }

  .timer-panel, .side-panel {
    padding: 19px;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding: 0 18px;
  }

  .today-label {
    display: none;
  }

  .mode-tab {
    padding: 9px 10px;
    font-size: 10px;
  }

  .timer-wrap {
    width: 250px;
  }

  .quote-panel p {
    font-size: 13px;
  }
}