/* =========================================
   TASKWARRIOR PREMIUM THEME
   ========================================= */

:root {
  /* Core Dark Theme Colors */
  --bg-body: #020617; /* Almost Black */
  --bg-card: #0f172a; /* Dark Slate */
  --bg-card-hover: #1e293b;
  --border-color: #334155;

  /* Neon Accents */
  --primary: #2dd4bf; /* Teal */
  --primary-glow: rgba(45, 212, 191, 0.5);
  --secondary: #06b6d4; /* Cyan */

  /* Status Colors */
  --orange: #f97316;
  --yellow: #eab308;
  --red: #ef4444;
  --green: #22c55e;

  /* Text */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  /* Fonts */
  --font-main: "Outfit", sans-serif;
  --font-display: "Rajdhani", sans-serif;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 3rem;

  /* Subtle background grid effect */
  background-image: radial-gradient(
    circle at 50% 0%,
    rgba(45, 212, 191, 0.1),
    transparent 50%
  );
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hidden {
  display: none !important;
}

/* =========================================
   HEADER
   ========================================= */
.app-header {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.logo-icon {
  font-size: 2.5rem;
  color: var(--primary);
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.glow-text {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 20px var(--primary-glow);
  margin: 0;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

/* =========================================
   QUOTE CONTAINER
   ========================================= */
.quote-container {
  background: linear-gradient(
    135deg,
    rgba(45, 212, 191, 0.08) 0%,
    rgba(6, 182, 212, 0.08) 100%
  );
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 0 auto 2rem;
  max-width: 850px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(45, 212, 191, 0.1);
}

.quote-icon {
  font-size: 1.5rem;
  color: var(--primary);
  opacity: 0.6;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

#motivational-quote {
  font-size: 1rem;
  color: var(--text-main);
  font-style: italic;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: opacity 0.3s ease;
}

/* =========================================
   HERO CARD
   ========================================= */
.hero-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-bg-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(45, 212, 191, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

/* Hero User Info */
.hero-user-section {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.level-box {
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  width: 90px;
  height: 90px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.3);
  flex-shrink: 0;
}

.level-box i {
  font-size: 1.5rem;
  margin-bottom: 4px;
  opacity: 0.8;
}
.level-box span {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
}

.user-text-group {
  display: flex;
  flex-direction: column;
}

.user-role-row {
  font-family: var(--font-display);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#edit-name-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s;
}
#edit-name-btn:hover {
  color: var(--primary);
}

.user-name-display {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0.2rem 0;
}

.xp-subtext {
  font-size: 0.95rem;
  color: var(--text-muted);
}
.xp-subtext span {
  color: var(--primary);
  font-weight: 600;
}

/* Hero Badges */
.hero-badges {
  display: flex;
  gap: 1rem;
}

.stat-pill {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.orange-pill {
  border-color: rgba(249, 115, 22, 0.4);
  color: var(--orange);
  background: rgba(249, 115, 22, 0.1);
}
.teal-pill {
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--primary);
  background: rgba(45, 212, 191, 0.1);
}

/* XP Section */
.xp-section {
  width: 100%;
}

.xp-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.xp-label i {
  color: var(--primary);
  margin-right: 8px;
}

.progress-track {
  width: 100%;
  height: 14px;
  background-color: #1e293b;
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  box-shadow: 0 0 15px var(--primary-glow);
  transition: width 0.5s ease-out;
}

/* =========================================
   STATS GRID
   ========================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.grid-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.grid-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
}

.cyan-icon {
  color: var(--secondary);
  border-color: rgba(6, 182, 212, 0.3);
}
.teal-icon {
  color: var(--primary);
  border-color: rgba(45, 212, 191, 0.3);
}
.orange-icon {
  color: var(--orange);
  border-color: rgba(249, 115, 22, 0.3);
}
.yellow-icon {
  color: var(--yellow);
  border-color: rgba(234, 179, 8, 0.3);
}
.faded {
  opacity: 0.6;
}

.grid-card h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #fff;
}

.grid-card p {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* =========================================
   INPUT BAR
   ========================================= */
.input-bar-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#quick-add-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-main);
  font-size: 1.1rem;
  padding: 0 1rem;
  outline: none;
}

#quick-add-btn {
  background-color: var(--primary);
  color: #000;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

#quick-add-btn:hover {
  background-color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* =========================================
   TASK LIST
   ========================================= */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
}

.section-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
}

.task-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.task-card:hover {
  border-color: var(--primary);
  background-color: var(--bg-card-hover);
  transform: translateX(5px);
}

.task-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.check-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.2s;
}

.check-btn i {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}
.check-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}
.check-btn:hover i {
  opacity: 1;
  transform: scale(1);
}

.task-info h4 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
}

.task-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.diff-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.diff-easy {
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.diff-medium {
  color: var(--yellow);
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.2);
}
.diff-hard {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.del-btn {
  background: transparent;
  border: none;
  color: #475569;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s;
}
.del-btn:hover {
  color: var(--red);
}

/* Completed State */
.completed-anim {
  opacity: 0.5;
  transform: scale(0.98);
  background: rgba(45, 212, 191, 0.05);
  pointer-events: none;
  border-color: var(--primary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  border: 2px dashed var(--border-color);
  border-radius: 1rem;
  color: var(--text-muted);
}
.empty-icon-circle {
  font-size: 3rem;
  color: var(--border-color);
  margin-bottom: 1rem;
}

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 500px;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
}
#close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}
#close-modal:hover {
  color: #fff;
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="date"],
select {
  width: 100%;
  background: #020617;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-main);
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.2);
}

.goal-option {
  background: rgba(234, 179, 8, 0.05);
  border: 1px solid rgba(234, 179, 8, 0.2);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.goal-text label {
  color: var(--yellow);
  margin-bottom: 2px;
  cursor: pointer;
}
.goal-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}
#cancel-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}
#cancel-btn:hover {
  color: #fff;
}

.save-btn {
  background: var(--primary);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  cursor: pointer;
}
.save-btn:hover {
  background: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* =========================================
   FLOATING ELEMENTS
   ========================================= */
.float-xp {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 4rem;
  pointer-events: none;
  z-index: 2000;
  animation: floatUp 1.5s ease-out forwards;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
@keyframes floatUp {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, -80%) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -150%) scale(1);
    opacity: 0;
  }
}
.float-xp.float-plus {
  color: var(--primary);
}
.float-xp.float-minus {
  color: var(--red);
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 3000;
  animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.t-success i {
  color: var(--green);
}
.t-error i {
  color: var(--red);
}
.toast span {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-top-row {
    flex-direction: column;
  }
  .hero-badges {
    width: 100%;
    justify-content: space-between;
  }
  .stat-pill {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  /* Header adjustments */
  .app-header {
    padding: 1.5rem 0 1.5rem;
  }

  .logo-container {
    gap: 0.5rem;
    margin-bottom: 0.25rem;
  }

  .logo-icon {
    font-size: 1.75rem;
  }

  .glow-text {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  .subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }

  /* Quote container mobile */
  .quote-container {
    padding: 1rem;
    margin: 0 1.5rem 1.5rem;
    gap: 0.75rem;
  }

  .quote-icon {
    font-size: 1.25rem;
  }

  #motivational-quote {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Hero card adjustments */
  .hero-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .hero-top-row {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-user-section {
    gap: 1rem;
  }

  .level-box {
    width: 70px;
    height: 70px;
  }

  .level-box i {
    font-size: 1rem;
  }
  .level-box span {
    font-size: 2rem;
  }

  .user-name-display {
    font-size: 1.5rem;
  }

  .user-role-row {
    font-size: 0.85rem;
  }

  .xp-subtext {
    font-size: 0.8rem;
  }

  .hero-badges {
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-pill {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  /* Stats grid for mobile */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .grid-card {
    padding: 1rem;
  }

  .grid-card h3 {
    font-size: 1.5rem;
  }

  .grid-card p {
    font-size: 0.75rem;
  }

  /* Input bar adjustments */
  .input-bar-container {
    padding: 0.5rem;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  #quick-add-input {
    font-size: 1rem;
    padding: 0 0.75rem;
  }

  #quick-add-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  /* Section header */
  .section-header {
    gap: 8px;
    margin-bottom: 1rem;
  }

  .section-header h3 {
    font-size: 1rem;
  }

  /* Task card */
  .task-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  .task-left {
    gap: 0.75rem;
  }

  .task-info h4 {
    font-size: 0.95rem;
  }

  .task-meta {
    font-size: 0.75rem;
  }

  .diff-badge {
    font-size: 0.65rem;
    padding: 3px 6px;
  }
}
