/* ===================================================
   PENDIENTES// — tokens
=================================================== */
:root {
  --bg: #15171a;
  --surface: #1b1e22;
  --surface-hover: #212429;
  --border: #2a2e34;
  --text: #eae8e3;
  --text-dim: #7c8087;
  --orange: #ff5a1f;
  --orange-soft: rgba(255, 90, 31, 0.14);
  --orange-soft-strong: rgba(255, 90, 31, 0.28);
  --done: #52565d;

  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  background-image:
    radial-gradient(circle at 18% 8%, rgba(255, 90, 31, 0.06), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(255, 90, 31, 0.04), transparent 45%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* mouse-follow glow: soft orange spotlight that tracks the cursor */
.mouse-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 90, 31, 0.16),
    rgba(255, 90, 31, 0.06) 32%,
    transparent 60%
  );
}

.mouse-glow.is-active {
  opacity: 1;
}

@media (hover: none) {
  .mouse-glow {
    display: none;
  }
}

/* subtle scanline texture for the "futuristic terminal" feel */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012) 0px,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 50;
}

::selection {
  background: var(--orange-soft-strong);
  color: var(--text);
}

/* ===================================================
   Layout
=================================================== */
.app {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 48px;
}

@media (max-width: 600px) {
  .app {
    padding: 40px 16px 32px;
  }

  .title {
    font-size: clamp(26px, 8vw, 34px);
  }

  .composer {
    padding: 13px 14px;
  }

  .composer__btn {
    width: 100%;
    text-align: center;
  }

  .composer__prompt {
    display: none;
  }

  .app__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .clear-btn {
    padding: 0;
  }

  .task__delete {
    opacity: 1;
  }
}

@media (max-width: 360px) {
  .filters {
    flex-wrap: wrap;
  }

  .task__index {
    display: none;
  }
}

/* ===================================================
   Header
=================================================== */
.app__header {
  margin-bottom: 40px;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 6vw, 44px);
  letter-spacing: -0.01em;
  color: var(--text);
}

.title__slash {
  color: var(--orange);
}

.subtitle {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

/* ===================================================
   Composer (input row)
=================================================== */
.composer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.composer:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.composer__prompt {
  color: var(--orange);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.composer__input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  caret-color: var(--orange);
}

.composer__input::placeholder {
  color: var(--text-dim);
}

.composer__btn {
  flex-shrink: 0;
  background: var(--orange-soft);
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.composer__btn:hover {
  background: var(--orange);
  color: var(--bg);
}

/* ===================================================
   Filters
=================================================== */
.filters {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.filters__btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.filters__btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.filters__btn.is-active {
  color: var(--orange);
  border-color: var(--orange);
  background: var(--orange-soft);
}

/* ===================================================
   Task list
=================================================== */
.tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid transparent;
  border-radius: var(--radius);
  padding: 13px 14px;
  animation: enter 0.18s ease;
}

.task:hover {
  background: var(--surface-hover);
}

.task.is-done {
  border-left-color: var(--done);
}

.task:not(.is-done) {
  border-left-color: var(--orange);
}

@keyframes enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.task__check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.task__check:hover {
  border-color: var(--orange);
}

.task.is-done .task__check {
  background: var(--orange-soft);
  border-color: var(--orange);
}

.task__index {
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: 12px;
  width: 20px;
}

.task__text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--text);
  word-break: break-word;
}

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

.task__delete {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
  padding: 4px 6px;
}

.task:hover .task__delete {
  opacity: 1;
}

.task__delete:hover {
  color: var(--orange);
}

/* ===================================================
   Empty state
=================================================== */
.empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 40px 0;
  margin: 0;
}

.empty__bracket {
  color: var(--orange);
  margin-right: 6px;
}

/* ===================================================
   Footer
=================================================== */
.app__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.stats {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 6px 4px;
  transition: color 0.15s ease;
}

.clear-btn:hover {
  color: var(--orange);
}

.clear-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===================================================
   Brand
=================================================== */
.brand {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 0 0 32px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.brand__name {
  color: var(--orange);
  font-weight: 600;
}

/* ===================================================
   Accessibility
=================================================== */
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .task {
    animation: none;
  }
}