/* GlowFlow Tasks styles */
:root{
  --bg1: #0a0f1e;
  --bg2: #101b3a;
  --fg: #eaf2ff;
  --muted: #a9b8d6;
  --good: #57f287;
  --warn: #ffd166;
  --bad: #ff6b6b;
  --accent1: #6a5af9;
  --accent2: #00e7ff;
  --accent3: #ff00e5;

  --glass: rgba(255,255,255,0.06);
  --glass-strong: rgba(255,255,255,0.12);
  --shadow: 0 0 20px rgba(106,90,249,0.6), 0 0 60px rgba(0,231,255,0.4);
}

*{box-sizing:border-box}

html, body{
  height:100%;
  margin:0;
  color:var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
  background: radial-gradient(1200px 800px at 10% 10%, rgba(106,90,249,0.25), transparent 60%),
              radial-gradient(1200px 800px at 90% 20%, rgba(0,231,255,0.25), transparent 60%),
              linear-gradient(120deg, var(--bg1), var(--bg2));
  overflow-x:hidden;
}

.bg{
  position:fixed;
  inset:0;
  filter: blur(60px) saturate(140%);
  opacity:0.9;
  pointer-events:none;
  background: conic-gradient(from 180deg at 50% 50%, var(--accent1), var(--accent2), var(--accent3), var(--accent1));
  animation: swirl 20s linear infinite;
  mix-blend-mode: screen;
}

@keyframes swirl{
  to{ transform: rotate(360deg); }
}

.app-header{
  text-align:center;
  padding: 32px 16px 8px;
  text-shadow: 0 0 30px rgba(106,90,249,0.7), 0 0 50px rgba(0,231,255,0.5);
}
.app-header h1{
  margin:0 0 6px 0;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: 1px;
}
.tagline{
  margin:0;
  color:var(--muted);
}

.container{
  width:min(1100px, 92%);
  margin: 16px auto 80px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(130%);
}

.composer{
  padding: 12px;
  border-radius:12px;
  background: var(--glass);
  margin-bottom: 12px;
}

#taskForm{
  display:grid;
  gap:10px;
  grid-template-columns: 1fr 150px 160px 1fr 120px;
}
.input, .select{
  width:100%;
  padding: 12px 14px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(10,15,30,0.6);
  color:var(--fg);
  outline:none;
  transition: box-shadow .2s ease, transform .1s ease, border-color .2s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 10px rgba(106,90,249,0.15);
}
.input:focus, .select:focus{
  border-color: rgba(0,231,255,0.6);
  box-shadow: 0 0 0 3px rgba(0,231,255,0.25), 0 0 20px rgba(106,90,249,0.35);
  transform: translateY(-1px);
}
.hint{ color:var(--muted); }

.toolbar{
  display:flex;
  gap:12px;
  align-items:center;
  margin: 10px 0 18px;
}
.toolbar .stretch{
  flex:1;
}
.actions{ display:flex; gap:10px; }

.btn{
  padding: 10px 14px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(16,27,58,0.5);
  color:var(--fg);
  cursor:pointer;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  box-shadow: 0 0 12px rgba(106,90,249,0.3);
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0,231,255,0.4), 0 0 40px rgba(106,90,249,0.4);
  border-color: rgba(0,231,255,0.5);
}
.btn:active{ transform: translateY(0); }
.btn.primary{
  background: linear-gradient(135deg, rgba(106,90,249,0.6), rgba(0,231,255,0.6));
}
.btn.danger{
  background: rgba(255,107,107,0.2);
  border-color: rgba(255,107,107,0.5);
  box-shadow: 0 0 18px rgba(255,107,107,0.35);
}
.btn.file{ position:relative; overflow:hidden; }
.btn.ghost{
  background: rgba(255,255,255,0.06);
}

.task-list{
  display:grid;
  gap:10px;
  list-style:none;
  margin:0;
  padding:0;
}
.task{
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap:12px;
  align-items:center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 12px rgba(0,231,255,0.15);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.task:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(0,231,255,0.35);
  background: rgba(255,255,255,0.1);
}
.checkbox{ display:flex; align-items:center; justify-content:center; }
.checkbox input{ display:none; }
.checkmark{
  width:22px; height:22px; border-radius:8px;
  border: 2px solid rgba(255,255,255,0.5);
  display:inline-block; position:relative;
  box-shadow: 0 0 12px rgba(0,231,255,0.3);
}
.task.done .checkmark{
  background: var(--good);
  border-color: var(--good);
  box-shadow: 0 0 16px rgba(87,242,135,0.5);
}
.task.done .title{ text-decoration: line-through; opacity:0.7; }

.content{ display:flex; flex-direction:column; gap:6px; }
.title{
  width:100%;
  background: transparent;
  border:none;
  color:var(--fg);
  font-size: 16px;
  font-weight: 600;
  outline:none;
}
.meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size: 13px;
}
.badge{
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  text-transform: capitalize;
}
.badge.priority.low{ color:#57f287; border-color: rgba(87,242,135,0.6); box-shadow: 0 0 12px rgba(87,242,135,0.4); }
.badge.priority.medium{ color:#ffd166; border-color: rgba(255,209,102,0.6); box-shadow: 0 0 12px rgba(255,209,102,0.4); }
.badge.priority.high{ color:#ff6b6b; border-color: rgba(255,107,107,0.6); box-shadow: 0 0 12px rgba(255,107,107,0.4); }

.meta input{
  background: rgba(16,27,58,0.4);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--fg);
  border-radius: 8px;
  padding: 6px 8px;
  outline:none;
}
.meta input:focus{
  border-color: rgba(0,231,255,0.6);
  box-shadow: 0 0 0 2px rgba(0,231,255,0.25);
}

.item-actions{ display:flex; gap:8px; }

.footer{
  text-align:center;
  color:var(--muted);
  padding: 40px 0 60px;
}

.visually-hidden{
  position:absolute !important;
  height:1px; width:1px;
  overflow:hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space:nowrap;
}

/* Responsive */
@media (max-width: 860px){
  #taskForm{ grid-template-columns: 1fr 1fr 1fr; }
  #taskForm .select{ order: 3; }
  #taskForm #tagsInput{ grid-column: 1 span 3; }
  #taskForm #titleInput{ grid-column: 1 span 3; }
  #taskForm #dateInput{ order: 2; }
  #taskForm #priorityInput{ order: 4; }
  #taskForm #addBtn{ order: 5; }
}


/* Progress styles added */
.progress{
  width:min(1100px, 92%);
  margin: 16px auto 0;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch;
}
.progress-track{
  height:12px;
  border-radius:999px;
  background: rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.18);
  overflow:hidden;
  box-shadow: 0 0 12px rgba(0,231,255,0.15);
}
.progress-bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent1), var(--accent3));
  box-shadow: 0 0 18px rgba(0,231,255,0.45);
  transition: width .35s ease;
}
.progress-text{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
  color:var(--muted);
}
.progress-percent{
  font-weight:700;
  color: var(--fg);
}

/* Filter pills */
.filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.pill{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color:var(--fg);
  cursor:pointer;
  font-size: 13px;
  box-shadow: 0 0 10px rgba(106,90,249,0.2);
}
.pill:hover{
  box-shadow: 0 0 18px rgba(0,231,255,0.4);
  transform: translateY(-1px);
}
.pill.active{
  background: linear-gradient(135deg, rgba(106,90,249,0.5), rgba(0,231,255,0.5));
  border-color: rgba(0,231,255,0.5);
}

/* Overdue and due today hints */
.task.overdue .title{
  color: #ff6b6b;
}
.task.duetoday .title{
  color: #ffd166;
}
