/* ===================================================================
   CSS RESET AND BASE STYLES
   =================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Poppins", sans-serif;
  color: #c9d1d9;
  background-color: rgb(10, 10, 12);
  overflow-y: auto;
  overflow-x: hidden;
}

/* BACKGROUND EFFECTS */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(10, 10, 12, 0.7) 0%,
    rgb(10, 10, 12) 100%
  );
  pointer-events: none;
  z-index: -1;
}

/* MAIN CONTAINER */
.task-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 20px 60px;
  width: 100%;
}

/* HEADER SECTION */
.tasks-header {
  text-align: center;
  margin-bottom: 60px;
}

.tasks-header h1 {
  font-family: "Signord", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.tasks-subtitle {
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  font-weight: 300;
}

/* PROGRESS OVERVIEW */
.progress-overview {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.progress-stat {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  text-align: center;
  min-width: 150px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.progress-stat .number {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.progress-stat .label {
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.progress-stat.active .number {
  color: green;
}

.progress-stat.locked .number {
  color: rgba(255, 255, 255, 0.6);
}

.progress-stat.expired .number {
  color: #ff4444;
}

.task-status-badge.expired {
  background: rgba(255, 68, 68, 0.1);
  color: #ff4444;
  border: 1px solid rgba(255, 68, 68, 0.2);
}

/* TASKS GRID */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* TASK CARD */
.task-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

/* Add styles for locked cards */
.task-card.locked > * {
  filter: blur(3px);
}

.task-card.locked {
  position: relative;
  pointer-events: none;
}

.task-card.locked::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 15px;
  z-index: 1;
}

.lock-overlay {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  width: 100%;
  color: white;
  pointer-events: auto;
  filter: blur(0) !important;
  background: rgba(0, 0, 0, 0.4);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.task-card.locked .lock-overlay {
  display: block;
  filter: blur(0) !important;
}

.lock-overlay i {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.unlock-counter {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 8px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Update other locked card styles */
.task-card.locked {
  border-color: rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.01);
  opacity: 0.8;
}

.task-card.locked:hover {
  opacity: 0.8;
  transform: none;
}

/* TASK CARD VARIANTS */
.task-card.active {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.task-card.active:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.task-card.locked {
  border-color: rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.01);
  opacity: 0.6;
}

.task-card.locked:hover {
  opacity: 0.7;
  transform: translateY(-4px);
}

/* TASK HEADER */
.task-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.task-day-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.task-day-badge .day-number {
  background: rgba(255, 255, 255, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
}

.task-status-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-family: "Poppins", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.task-status-badge.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.task-status-badge.locked {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.task-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.task-card.locked .task-title {
  color: rgba(255, 255, 255, 0.7);
}

.task-category {
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.task-card.locked .task-category {
  color: rgba(255, 255, 255, 0.4);
}

/* TASK CONTENT */
.task-content {
  padding: 1.5rem;
}

.task-description {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.task-card.locked .task-description {
  color: rgba(255, 255, 255, 0.5);
}

.task-placeholder {
  font-family: "Poppins", sans-serif;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 1.5rem;
}

.task-card.locked .task-placeholder {
  color: rgba(255, 255, 255, 0.3);
  border-left-color: rgba(255, 255, 255, 0.1);
}

.task-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
}

.meta-item i {
  width: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.task-card.locked .meta-item i {
  color: rgba(255, 255, 255, 0.3);
}

.meta-item .value {
  color: #ffffff;
  font-weight: 500;
}

.task-card.locked .meta-item .value {
  color: rgba(255, 255, 255, 0.5);
}

.difficulty-stars {
  display: flex;
  gap: 2px;
}

.star {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

.star.filled {
  background: #ffffff;
}

.task-card.locked .star {
  background: rgba(255, 255, 255, 0.1);
}

.task-card.locked .star.filled {
  background: rgba(255, 255, 255, 0.3);
}

.points-value {
  color: #ffffff;
  font-weight: 600;
}

.task-card.locked .points-value {
  color: rgba(255, 255, 255, 0.5);
}

/* TASK ACTIONS */
.task-actions {
  padding: 0 1.5rem 1.5rem;
}

.submit-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: 0.5s;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn.locked {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: not-allowed;
  pointer-events: none;
}

.submit-btn.active {
  background: linear-gradient(135deg, #ffffff, #a0a0a0);
  color: #000000;
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.submit-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* FLOATING ACTION BUTTON */
.floating-help {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ffffff, #a0a0a0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.floating-help:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .tasks-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .task-container {
    padding: 100px 15px 40px;
  }

  .tasks-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .progress-overview {
    gap: 1rem;
  }

  .progress-stat {
    padding: 1rem 1.5rem;
    min-width: 120px;
  }

  .task-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .task-header {
    padding: 1rem;
  }

  .task-content {
    padding: 1rem;
  }

  .task-actions {
    padding: 0 1rem 1rem;
  }

  .floating-help {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 576px) {
  .tasks-header h1 {
    font-size: 2rem;
  }

  .tasks-subtitle {
    font-size: 1rem;
  }

  .progress-overview {
    flex-direction: column;
    align-items: center;
  }

  .progress-stat {
    width: 100%;
    max-width: 200px;
  }

  .tasks-grid {
    grid-template-columns: 1fr;
  }

  .task-day-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .task-status-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .tasks-header h1 {
    font-size: 1.8rem;
  }

  .tasks-subtitle {
    font-size: 0.9rem;
  }

  .task-title {
    font-size: 1.2rem;
  }

  .task-placeholder {
    font-size: 0.9rem;
  }

  .meta-item {
    font-size: 0.8rem;
  }

  .submit-btn {
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
  }
}

/* ANIMATION KEYFRAMES */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-card {
  animation: fadeInUp 0.6s ease forwards;
}

.task-card:nth-child(1) {
  animation-delay: 0.1s;
}
.task-card:nth-child(2) {
  animation-delay: 0.2s;
}
.task-card:nth-child(3) {
  animation-delay: 0.3s;
}
.task-card:nth-child(4) {
  animation-delay: 0.4s;
}
.task-card:nth-child(5) {
  animation-delay: 0.5s;
}
.task-card:nth-child(6) {
  animation-delay: 0.6s;
}
.task-card:nth-child(7) {
  animation-delay: 0.7s;
}
.task-card:nth-child(8) {
  animation-delay: 0.8s;
}
.task-card:nth-child(9) {
  animation-delay: 0.9s;
}
.task-card:nth-child(10) {
  animation-delay: 1s;
}
