/* ===== Base / Tokens ===== */
:root {
  --bg: #000;
  --text: #fff;

  /* default = cyan */
  --neon: #00ffff;
  --neon-soft: rgba(0, 255, 255, 0.6);
  --neon-bg: rgba(0, 255, 255, 0.08);

  --radius: 14px;
  --pad: 16px;
  --shadow-outer: 0 0 10px var(--neon), 0 0 20px var(--neon);
  --shadow-outer-soft: 0 0 8px var(--neon), 0 0 18px var(--neon);
  --shadow-text: 0 0 3px var(--neon), 0 0 6px var(--neon);

  --muted: rgba(255,255,255,0.65);
}

/* Theme variants via data-theme on <html> */
html[data-theme="purple"] {
  --neon: hsl(270, 94%, 51%);
  --neon-soft: hsla(270, 94%, 51%, 0.6);
  --neon-bg: hsla(270, 94%, 51%, 0.08);
}
html[data-theme="red"] {
  --neon: #ff0000;
  --neon-soft: rgba(255, 0, 0, 0.6);
  --neon-bg: rgba(255, 0, 0, 0.08);
}

/* ===== Reset / Structure ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Text Me One", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  width: min(100% - 2rem, 840px);
  margin: 40px auto 80px;
}

/* ===== Brand header ===== */
.brand {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.logo {
  width: 64px; height: 64px;
  display: block;
  filter: drop-shadow(0 0 10px var(--neon));
}
h1 {
  margin: 0;
  font-size: 24px;
  text-shadow: 0 0 8px #ffffff, 0 0 16px #ffffff;
  animation: whiteGlowPulse 2.5s ease-in-out infinite alternate;
}

/* ===== Panels / Cards ===== */
.panel {
  border: 3px solid var(--neon);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.35);
  box-shadow: 0 0 12px var(--neon), 0 0 24px var(--neon);
  animation: neonPulse 2.6s ease-in-out infinite alternate;
  padding: 18px;
}

/* Theme panel */
.theme-panel {
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.theme-title { font-size: 18px; color: var(--muted); }
.theme-switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-btn {
  appearance: none;
  background: #0a0a0a;
  color: var(--text);
  border: 2px solid var(--neon);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  text-shadow: var(--shadow-text);
  box-shadow: inset 0 0 10px var(--neon-bg);
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.theme-btn:hover { background: var(--neon-bg); }
.theme-btn[aria-pressed="true"] {
  background: var(--neon-bg);
  box-shadow: inset 0 0 14px var(--neon-soft), 0 0 10px var(--neon);
}

/* ===== Todo panel ===== */
.todo { margin-top: 24px; }

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.input {
  width: 100%;
  background: #0b0b0b;
  color: var(--text);
  border: 2px solid var(--neon);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  box-shadow: inset 0 0 12px var(--neon-bg);
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.input:focus {
  box-shadow: inset 0 0 16px var(--neon-soft), 0 0 10px var(--neon-bg);
}

.btn {
  background: #0a0a0a;
  color: var(--text);
  border: 2px solid var(--neon);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  text-shadow: var(--shadow-text);
  box-shadow: inset 0 0 12px var(--neon-bg);
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover {
  background: var(--neon-bg);
  box-shadow: inset 0 0 16px var(--neon-soft), 0 0 10px var(--neon-bg);
}
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent;
  border-style: dashed;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.muted { color: var(--muted); }

/* ===== List / Items ===== */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow: auto;
}

.item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  margin: 6px 0;
  animation: fadeIn .25s ease-out;
}

.checkbox {
  width: 20px; height: 20px;
  accent-color: var(--neon);
  cursor: pointer;
}

.label {
  font-size: 18px;
  text-shadow: var(--shadow-text);
  word-break: break-word;
}

.actions {
  display: flex;
  gap: 8px;
}
.icon-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--neon);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  text-shadow: var(--shadow-text);
  box-shadow: inset 0 0 8px var(--neon-bg);
  transition: background .2s ease, box-shadow .2s ease, transform .06s ease;
}
.icon-btn:hover { background: var(--neon-bg); }
.icon-btn:active { transform: translateY(1px); }

.item.completed .label {
  opacity: .65;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

/* ===== Scrollbar ===== */
.scroll::-webkit-scrollbar { height: 10px; width: 10px; }
.scroll::-webkit-scrollbar-track { background: #111; border-radius: 10px; }
.scroll::-webkit-scrollbar-thumb {
  background: var(--neon);
  border-radius: 10px;
}

/* ===== Animations ===== */
@keyframes neonPulse {
  0%   { box-shadow: 0 0 10px var(--neon), 0 0 20px var(--neon); }
  100% { box-shadow: 0 0 22px var(--neon), 0 0 40px var(--neon); }
}
@keyframes whiteGlowPulse {
  0%   { text-shadow: 0 0 6px #fff, 0 0 12px #fff; opacity: 0.9; }
  50%  { text-shadow: 0 0 18px #fff, 0 0 36px #fff; opacity: 1; }
  100% { text-shadow: 0 0 6px #fff, 0 0 12px #fff; opacity: 0.9; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Footer ===== */
.footer {
  
  text-align: center;
  color: var(--text);
  font-size: 16px;
 
}

.footer p {
  margin: 0;
  text-shadow: 0 0 4px var(--neon), 0 0 8px var(--neon);
}

/* ===== Responsive ===== */
@media (max-width: 520px) {
  .wrap { width: min(100% - 1.25rem, 760px); }
  .row { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .item { grid-template-columns: 28px 1fr; }
  .actions { justify-content: flex-end; }
}

/* Keep the list from creating a sideways scroll */
.list { overflow-x: hidden; }

/* Long words won't push the row wider than the screen */
.label { overflow-wrap: anywhere; }

/* Mobile layout: put actions on a new line */
@media (max-width: 520px) {
  .item {
    grid-template-columns: 28px 1fr;               /* checkbox + text */
    grid-template-areas:
      "cb label"
      "actions actions";                           /* buttons below */
    align-items: start;
  }

  .checkbox { grid-area: cb; }
  .label    { grid-area: label; font-size: 16px; }

  .actions {
    grid-area: actions;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;                               /* wrap if needed */
  }

  .icon-btn {
    padding: 10px 12px;
    font-size: 15px;
    /* allow two buttons to sit side-by-side if space allows */
    flex: 0 1 auto;
    max-width: 48%;
  }
}

