
:root {
  --bg: #080b1b;
  --card: rgba(19, 25, 55, 0.72);
  --border: rgba(132, 145, 255, 0.2);
  --text: #f5f6ff;
  --muted: #a3abc9;
  --blue: #16c9f6;
  --purple: #9b5cff;
}

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

body {
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at 15% 15%, #20205b 0%, transparent 45%),
    radial-gradient(ellipse at 85% 85%, #35165e 0%, transparent 45%),
    linear-gradient(135deg, #080b1b, #101638 55%, #100c27);
  padding: 55px 20px;
  overflow-x: hidden;
  position: relative;
}

/* Background decoration */

.background-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.glow-one {
  background: #174fff;
  top: 5%;
  left: -150px;
}

.glow-two {
  background: #b32aff;
  bottom: 0;
  right: -150px;
}

/* Main dashboard */

.dashboard {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1050px;
  min-height: calc(100vh - 110px);
  margin: auto;
  padding: 35px;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: rgba(10, 15, 39, 0.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
}

/* Header */

.header {
  text-align: center;
  margin-bottom: 35px;
}

.logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 3px solid var(--blue);
  border-radius: 16px;
  color: var(--blue);
  font-size: 35px;
  font-weight: 800;
  box-shadow: 0 0 25px rgba(22, 201, 246, 0.4);
}

.header h1 {
  font-size: clamp(30px, 5vw, 43px);
  font-weight: 800;
  letter-spacing: -1.5px;
}

.header h1 span {
  background: linear-gradient(90deg, #b35cff, #22c9ff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.header p {
  color: var(--muted);
  margin-top: 9px;
  font-size: 14px;
}

/* Form */

.task-form {
  display: grid;
  grid-template-columns: 1.5fr 1.1fr 0.7fr auto;
  gap: 10px;
  margin-bottom: 15px;
}

input,
select,
button {
  font: inherit;
  outline: none;
}

input,
select {
  width: 100%;
  min-width: 0;
  padding: 14px;
  color: var(--text);
  background: rgba(28, 35, 70, 0.8);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: 0.25s;
}

input::placeholder {
  color: #8791b2;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 12px rgba(22, 201, 246, 0.15);
}

input[type="date"] {
  color-scheme: dark;
}

select option {
  background: #151b3b;
  color: white;
}

.add-btn {
  padding: 13px 20px;
  border: none;
  border-radius: 11px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(110deg, #11c7ee, #9254ff);
  box-shadow: 0 5px 20px rgba(116, 75, 255, 0.25);
  transition: 0.3s;
  white-space: nowrap;
}

.add-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(116, 75, 255, 0.45);
}

.add-btn span {
  font-size: 20px;
  vertical-align: middle;
}

/* Search */

.search-row {
  display: grid;
  grid-template-columns: 1fr 115px;
  gap: 10px;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
}

.search-box span {
  position: absolute;
  left: 15px;
  top: 7px;
  color: var(--muted);
  font-size: 27px;
}

.search-box input {
  padding-left: 43px;
}

/* Statistics */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(34, 42, 83, 0.5);
  padding: 20px 10px;
  margin-bottom: 30px;
}

.stat-item {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 13px;
  border-right: 1px solid var(--border);
}

.stat-item:last-child {
  border: none;
}

.stat-icon {
  font-size: 29px;
  font-weight: 800;
}

.stat-item h2 {
  font-size: 23px;
}

.stat-item p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.completed-icon { color: #3ce4bd; }
.pending-icon { color: #6495ff; }
.priority-icon { color: #ffb547; }
.total-icon { color: #bd69ff; }

/* Task list */

.task-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.task-heading h2 {
  font-size: 20px;
}

.task-heading span {
  font-size: 13px;
  color: var(--muted);
}

ul {
  list-style: none;
}

li.card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  margin-bottom: 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(29, 36, 75, 0.65);
  transition: 0.25s;
  animation: appear 0.3s ease;
}

li.card:hover {
  transform: translateY(-2px);
  border-color: rgba(95, 166, 255, 0.55);
  background: rgba(40, 48, 93, 0.8);
}

li.card span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

li.card input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #35d9b2;
  cursor: pointer;
}

li.card small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.done span {
  text-decoration: line-through;
  opacity: 0.5;
}

.pr {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 30px;
  color: white;
  white-space: nowrap;
}

.High { background: #dc3545; }
.Medium { background: #d18a22; }
.Low { background: #169b73; }

button.ghost {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: 0.2s;
}

button.ghost:hover {
  background: rgba(140, 110, 255, 0.2);
  border-color: var(--purple);
}

.empty-state {
  text-align: center;
  padding: 55px 15px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: rgba(29, 36, 75, 0.25);
}

.empty-icon {
  font-size: 55px;
  color: #a477ff;
  margin-bottom: 12px;
  text-shadow: 0 0 25px #9254ff;
}

.empty-state h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  color: var(--muted);
}

/* Footer */

footer {
  text-align: center;
  margin-top: 35px;
  color: var(--muted);
  font-size: 12px;
}

/* Animation */

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsiveness */

@media (max-width: 750px) {
  body {
    padding: 20px 12px;
  }

  .dashboard {
    min-height: calc(100vh - 40px);
    padding: 22px 15px;
  }

  .task-form {
    grid-template-columns: 1fr 1fr;
  }

  .task-form input:first-child {
    grid-column: 1 / -1;
  }

  .add-btn {
    width: 100%;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    row-gap: 22px;
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .stat-item:nth-child(3) {
    border-right: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .task-form {
    grid-template-columns: 1fr;
  }

  .task-form input:first-child {
    grid-column: auto;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  li.card {
    flex-wrap: wrap;
  }

  li.card span {
    min-width: calc(100% - 45px);
  }

  .pr {
    margin-left: 30px;
  }

  .stat-item {
    gap: 8px;
  }

  .stat-icon {
    font-size: 23px;
  }

  .stat-item h2 {
    font-size: 19px;
  }
}
