/* Khai báo biến màu sắc để dễ quản lý */
:root {
  --brand-green: #4caf50;
  --brand-blue: #2196f3;
  --brand-light: #fffde7;
  --brand-dark: #0a0a0a;
  --brand-gray: #e8f5e8;
  --text-gray: #6b7280;
}

/* Reset mặc định */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--brand-light);
  color: #333;
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Nền lưới trang trí */
.bg-grid-pattern {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(#4caf50 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

/* --- SECTION TIÊU ĐỀ --- */
.divider-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 4rem 0 2rem 0;
}

.section-title {
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
  color: white;
  border-bottom: 4px solid var(--brand-yellow);
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.line {
  height: 1px;
  background: #374151;
  flex-grow: 1;
}

/* --- GRID LAYOUT --- */
.assignment-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 5rem;
}

@media (min-width: 640px) {
  .assignment-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .assignment-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- CARD STYLE (Sửa lỗi màu xanh và layout) --- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--brand-gray);
  border: 1px solid #2d3748;
  padding: 2rem;
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none; /* Quan trọng: Bỏ gạch chân thẻ a */
  color: white !important; /* Quan trọng: Ép màu chữ trắng */
}

/* Card dành cho Assignment lớn */
.card.is-project {
  border-color: var(--brand-yellow);
  background: #161616;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--brand-yellow);
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.1);
}

.card-number {
  position: absolute;
  top: -5px;
  right: 5px;
  font-size: 4rem;
  font-weight: 800;
  color: white;
  opacity: 0.05;
  z-index: 0;
  user-select: none;
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid #374151;
  z-index: 1;
  transition: 0.3s;
}

.card:hover .card-icon {
  border-color: var(--brand-yellow);
  transform: scale(1.1);
}

.card-icon i {
  font-size: 1.5rem;
  color: var(--text-gray);
}

.card:hover .card-icon i,
.card.is-project .card-icon i {
  color: var(--brand-yellow);
}

.card-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: white;
  z-index: 1;
}

.card:hover .card-title {
  color: var(--brand-yellow);
}

.card-desc {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  z-index: 1;
}

.card-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--brand-yellow);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.card:hover .card-link {
  opacity: 1;
  transform: translateX(0);
}
/* --- BIẾN MÀU SẮC --- */
:root {
  --brand-yellow: #ffd700;
  --brand-black: #111111;
  --brand-dark: #0a0a0a;
  --brand-gray: #222222;
  --text-gray: #9ca3af;
}

/* --- TIÊU ĐỀ DANH SÁCH --- */
.divider-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 4rem 0 2rem 0;
}

.section-title {
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
  color: white;
  border-bottom: 4px solid var(--brand-yellow);
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.line {
  height: 1px;
  background: #374151;
  flex-grow: 1;
}

/* --- GRID LAYOUT --- */
.assignment-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 5rem;
}

/* Responsive: 1 cột (mobile), 2 cột (tablet), 3 cột (desktop) */
@media (min-width: 640px) {
  .assignment-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .assignment-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- CARD STYLE (Fix lỗi màu xanh & gạch chân) --- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--brand-gray);
  border: 1px solid #2d3748;
  padding: 2rem;
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important; /* Bỏ gạch chân hoàn toàn */
  color: white !important; /* Ép màu chữ trắng cho tất cả text bên trong */
}

/* Card đặc biệt cho Assignment */
.card.is-project {
  border-color: var(--brand-yellow);
  background: #161616;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--brand-yellow);
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.15);
}

/* Số thứ tự ẩn dưới nền */
.card-number {
  position: absolute;
  top: -5px;
  right: 10px;
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05); /* Rất mờ */
  z-index: 0;
}

/* Icon tròn */
.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid #374151;
  z-index: 1;
}

.card-icon i {
  font-size: 1.5rem;
  color: var(--text-gray);
}

.card:hover .card-icon i,
.card.is-project .card-icon i {
  color: var(--brand-yellow);
}

/* Text bên trong card */
.card-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: white !important;
}

.card:hover .card-title {
  color: var(--brand-yellow) !important;
}

.card-desc {
  color: var(--text-gray) !important;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Nút "Xem bài làm" ẩn hiện */
.card-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--brand-yellow) !important;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.card:hover .card-link {
  opacity: 1;
  transform: translateX(0);
}
