/* ============================================
   Side Hustle Booster — Mobile-first styles
   ============================================ */

:root {
  --bg: #0f0a1e;
  --bg-soft: #171030;
  --card: #1c1440;
  --card-2: #241a52;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f1ff;
  --text-dim: #a89fd0;
  --accent: #ff6b35;
  --accent-2: #ffb347;
  --success: #2dd4a7;
  --danger: #ff5c7a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(255, 107, 53, 0.22), transparent 55%),
    radial-gradient(ellipse at 90% 20%, rgba(255, 179, 71, 0.12), transparent 50%),
    radial-gradient(ellipse at 50% 110%, rgba(45, 212, 167, 0.1), transparent 55%);
  background-attachment: fixed;
}

.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 10, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.logo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.today-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ===== CARDS ===== */
main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 18px;
  padding-bottom: 48px;
}

.card {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

.section-head h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.section-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding-top: 30px;
  padding-bottom: 28px;
}

.hero-kicker {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 0.98rem;
  max-width: 480px;
  margin: 0 auto 20px;
}

/* ===== QUOTE BOX ===== */
.quote-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  position: relative;
}

.quote-box blockquote {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
}

.quote-box cite {
  display: block;
  font-style: normal;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ===== STREAK ===== */
.streak-display {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.streak-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.streak-number span {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.streak-number small {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
  text-align: center;
}

.streak-dots {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
  max-width: 260px;
  margin: 0 auto;
}

.streak-dot {
  flex: 1;
  aspect-ratio: 1;
  max-width: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  transition: transform 0.15s ease;
}

.streak-dot.is-done {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  transform: scale(1.05);
}

.streak-dot.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.35);
}

/* ===== BUTTONS ===== */
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #1a0f05;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
}

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

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.checkin-note {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
}

.checkin-note.is-done {
  color: var(--success);
  font-weight: 600;
}

/* ===== GOAL FORM ===== */
.goal-form {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.goal-form input {
  flex: 1;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
  min-width: 0;
}

.goal-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.goal-form input::placeholder {
  color: var(--text-dim);
}

.goal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.goal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  animation: slide-in 0.25s ease;
}

.goal-item.is-done .goal-text {
  text-decoration: line-through;
  color: var(--text-dim);
}

.goal-check {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 9px;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.goal-item.is-done .goal-check {
  background: var(--success);
  border-color: var(--success);
  color: #06251c;
}

.goal-text {
  flex: 1;
  font-size: 0.95rem;
  word-break: break-word;
}

.goal-del {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  opacity: 0.7;
  -webkit-tap-highlight-color: transparent;
}

.goal-del:hover {
  opacity: 1;
  background: rgba(255, 92, 122, 0.12);
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 10px 0;
}

/* ===== GOAL PROGRESS ===== */
.goal-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.goal-progress-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--success), var(--accent));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.goal-progress span {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ===== TIMER ===== */
.timer-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px;
}

.timer-tab {
  flex: 1;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.timer-tab.is-active {
  background: var(--card-2);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.timer-tab[data-mode="break"].is-active {
  background: rgba(45, 212, 167, 0.18);
  color: var(--success);
}

.timer-display {
  font-size: 4rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 8px 0 18px;
}

.timer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.timer-controls .btn {
  min-width: 130px;
}

.timer-note {
  margin-top: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.timer-note.is-focus {
  color: var(--accent-2);
  font-weight: 600;
}

.timer-note.is-break {
  color: var(--success);
  font-weight: 600;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-tagline {
  margin-top: 6px;
  font-weight: 600;
  color: var(--text);
}

/* ===== ANIMATION ===== */
@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE (larger screens) ===== */
@media (min-width: 480px) {
  .card {
    padding: 28px 26px;
  }

  .streak-number {
    min-width: 100px;
  }

  .streak-number span {
    font-size: 2.8rem;
  }
}

@media (min-width: 768px) {
  main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 860px;
  }

  .hero {
    grid-column: 1 / -1;
  }

  .site-footer {
    max-width: 860px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  .site-header .header-inner {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  main {
    padding-bottom: max(48px, env(safe-area-inset-bottom));
  }
}
