/* ==========================================================================
   Pomodoro — Mobile-first base styles
   Step 2: Make the UI clean + usable on mobile.
   Later steps add larger-screen layout with media queries.
   ========================================================================== */

/* ---------- Design tokens (easy to tweak) ---------- */
:root {
  color-scheme: light;

  --bg: #0b0d12;
  --surface: #121625;
  --surface-2: #171c2f;
  --text: #f3f5ff;
  --muted: #b6bdd6;
  --border: rgba(255, 255, 255, 0.12);

  --radius: 16px;

  /* Spacing scale (mobile-friendly) */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;

  /* Typography */
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ---------- Global reset-ish ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

h1,
h2,
p {
  margin: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: min(100%, 680px);
  margin-inline: auto;
  padding: var(--space-4) var(--space-3);
}

.layout {
  display: grid;
  gap: var(--space-4);
}

/* ---------- Header / Footer ---------- */
header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}

.site-title {
  font-size: 1.5rem;
  letter-spacing: 0.3px;
}

.site-subtitle {
  margin-top: var(--space-1);
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-5);
}

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

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card-title {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: var(--space-3);
}

/* ---------- Timer UI ---------- */
.mode {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: var(--space-2);
}

.time {
  font-size: 3rem;
  font-weight: 750;
  letter-spacing: 1px;
  margin-bottom: var(--space-3);
}

/* ---------- Controls (big tap targets) ---------- */
.controls {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 650;
  min-height: 48px; /* touch-friendly */
  flex: 1; /* buttons fill row nicely on mobile */
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.status {
  margin-top: var(--space-2);
  min-height: 1.5em; /* prevents layout jump when status text appears */
  color: var(--muted);
}

/* ---------- Settings form ---------- */
fieldset {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: var(--space-3);
}

legend {
  padding-inline: 8px;
  color: var(--muted);
  font-weight: 650;
}

.field {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.field-inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

label {
  color: var(--muted);
  font-weight: 600;
}

input[type="number"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 14px 12px;
  font: inherit;
  min-height: 48px;
}

.hint {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: 0.95rem;
}

.settings-actions {
  margin-top: var(--space-3);
}

/* ==========================================================================
   Media queries (larger screens)
   Step 2: Keep it minimal—real layout changes come later.
   ========================================================================== */

   @media (min-width: 900px) {
  .container {
    width: min(100%, 980px);
  }

  .layout {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }

  .time {
    font-size: 3.75rem;
  }

  .card {
    padding: var(--space-5);
  }
}
