/* 
   Modern Design System for Toán Cô Hiền
   Theme: Glassmorphism, Modern School Typography, Vivid HSL Colors
*/

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Bảng màu sắc HSL */
  --primary-hue: 18; /* Màu cam thương hiệu gốc */
  --primary: hsl(var(--primary-hue), 89%, 54%);
  --primary-hover: hsl(var(--primary-hue), 95%, 45%);
  --primary-light: hsl(var(--primary-hue), 100%, 95%);
  
  --secondary: hsl(239, 84%, 67%); /* Xanh dương đậm cho các cấu trúc Toán học */
  --secondary-hover: hsl(239, 84%, 58%);
  
  --success: hsl(162, 76%, 41%); /* Xanh lá cho câu trả lời đúng, điểm cao */
  --error: hsl(350, 89%, 60%); /* Đỏ cho câu trả lời sai */
  --warning: hsl(45, 95%, 50%);
  
  /* Màu nền & Chữ */
  --bg-app: hsl(210, 20%, 98%);
  --bg-card: rgba(255, 255, 255, 0.75);
  --border-card: rgba(255, 255, 255, 0.3);
  --text-main: hsl(215, 28%, 17%);
  --text-muted: hsl(215, 16%, 47%);
  --text-white: hsl(0, 0%, 100%);
  
  /* Fonts */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
  
  /* Shadow & Blur */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --blur: blur(16px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Speed */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(at 0% 0%, hsla(18, 100%, 93%, 0.5) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(239, 100%, 94%, 0.4) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Sticky Premium Navigation */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  padding: 12px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.logo-link span {
  color: var(--primary);
}

.logo-img {
  height: 45px;
  object-fit: contain;
}

.menu-links {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
}

.menu-item a {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.menu-item a:hover, .menu-item.active a {
  color: var(--primary);
  background: var(--primary-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(242, 98, 34, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 98, 34, 0.4);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  padding: 60px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 0;
  }
}

.hero-title {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-des {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

@media (max-width: 768px) {
  .hero-buttons {
    justify-content: center;
  }
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16/9;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grade Selection Grid */
.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.grade-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grade-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.grade-name {
  font-size: 20px;
  margin-bottom: 8px;
}

.grade-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Quiz Interface Layout */
.quiz-container {
  max-width: 1000px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .quiz-container {
    grid-template-columns: 1fr;
  }
}

.question-card {
  padding: 32px;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.question-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
}

.option-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  list-style: none;
}

.option-item {
  background: var(--text-white);
  border: 2px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.option-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.option-item.correct {
  border-color: var(--success);
  background: hsl(162, 76%, 95%);
  color: var(--success);
}

.option-item.wrong {
  border-color: var(--error);
  background: hsl(350, 89%, 96%);
  color: var(--error);
}

.option-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.quiz-meta-card {
  height: fit-content;
}

.quiz-timer {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  color: var(--secondary);
  margin-bottom: 20px;
}

.question-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.nav-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: var(--text-white);
  transition: var(--transition);
}

.nav-dot.active {
  background: var(--secondary);
  color: var(--text-white);
  border-color: var(--secondary);
}

.nav-dot.answered {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* Dashboard CSS Progress Bars */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Bảng Vàng Vinh Danh Mẫu - Hệ thống định vị tuyệt đối theo tỉ lệ ảnh nền */
.podium-bg-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  container-type: inline-size; /* Bật Container Queries để responsive cỡ chữ và avatar */
}

.podium-bg-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Định dạng Avatar tròn lồng khít vào trong vòng nguyệt quế của ảnh nền */
.overlay-avatar {
  position: absolute;
  transform: translate(-50%, -50%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  border: clamp(1px, 0.25cqw, 4px) solid;
  z-index: 12;
  font-size: clamp(12px, 2.5cqw, 24px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.overlay-avatar.silver {
  left: 18.5%;
  top: 53.8%;
  width: 13.8%; /* Tỉ lệ to khít lòng vòng nguyệt quế bạc */
  border-color: #cbd5e1;
  background: radial-gradient(circle, #e2e8f0 0%, #475569 100%);
  color: #1e293b;
  box-shadow: 0 0 1.5cqw rgba(203, 213, 225, 0.4);
}

.overlay-avatar.gold {
  left: 50.0%;
  top: 51.2%;
  width: 14.5%; /* Tỉ lệ to khít lòng vòng nguyệt quế vàng */
  border-color: #fde047;
  background: radial-gradient(circle, #fef08a 0%, #ca8a04 100%);
  color: #854d0e;
  box-shadow: 0 0 2cqw rgba(250, 204, 21, 0.5);
}

.overlay-avatar.bronze {
  left: 81.5%;
  top: 53.8%;
  width: 13.8%; /* Tỉ lệ to khít lòng vòng nguyệt quế đồng */
  border-color: #f97316;
  background: radial-gradient(circle, #fed7aa 0%, #78350f 100%);
  color: #ffedd5;
  box-shadow: 0 0 1.5cqw rgba(249, 115, 22, 0.4);
}

/* Định dạng Ô Thành tích chứa khung trong suốt Glassmorphism */
.overlay-achieve-box {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.75);
  border: clamp(1px, 0.15cqw, 2px) solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(5px);
  border-radius: clamp(3px, 0.8cqw, 6px);
  padding: clamp(2px, 0.4cqw, 6px) clamp(6px, 1.2cqw, 18px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  z-index: 11;
}

.silver-achieve-box {
  left: 18.5%;
  top: 94.0%;
  width: clamp(75px, 20%, 200px); /* Đảm bảo chiều rộng tối thiểu trên mobile để không gãy dòng */
}

.gold-achieve-box {
  left: 50.0%;
  top: 95.0%;
  width: clamp(85px, 22%, 220px);
}

.bronze-achieve-box {
  left: 81.5%;
  top: 94.0%;
  width: clamp(75px, 20%, 200px);
}

.overlay-achieve {
  text-align: center;
  font-weight: 800;
  font-size: clamp(8px, 1.3cqw, 14px); /* Giới hạn kích thước chữ tối thiểu là 8px trên mobile */
  line-height: 1.2;
}

.silver-achieve-box .overlay-achieve {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.gold-achieve-box .overlay-achieve {
  color: #fde047;
  text-shadow: 0 0 10px rgba(253, 224, 71, 0.4);
}

.bronze-achieve-box .overlay-achieve {
  color: #fb923c;
  text-shadow: 0 0 10px rgba(251, 146, 60, 0.4);
}

/* Định dạng Ô Tên học sinh chứa khung trong suốt Glassmorphism nổi bật */
.overlay-name-box {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.7);
  border: clamp(1px, 0.15cqw, 2px) solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(5px);
  border-radius: clamp(4px, 1cqw, 8px);
  padding: clamp(3px, 0.4cqw, 8px) clamp(8px, 1.5cqw, 22px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  z-index: 11;
}

.silver-name-box {
  left: 18.5%;
  top: 71.0%;
  width: clamp(85px, 21%, 210px);
}

.gold-name-box {
  left: 50.0%;
  top: 68.2%;
  width: clamp(95px, 24%, 240px);
}

.bronze-name-box {
  left: 81.5%;
  top: 71.0%;
  width: clamp(85px, 21%, 210px);
}

.overlay-name {
  text-align: center;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.85);
  line-height: 1.2;
}

.silver-name {
  font-size: clamp(9px, 1.7cqw, 18px); /* Giới hạn tối thiểu là 9px trên mobile */
}

.gold-name {
  font-size: clamp(10px, 1.9cqw, 20px); /* Giới hạn tối thiểu là 10px trên mobile */
}

.bronze-name {
  font-size: clamp(9px, 1.7cqw, 18px);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (max-width: 600px) {
  .podium-container {
    gap: 15px;
    padding: 20px 10px;
  }
  .spotlight {
    width: 150px;
  }
  .podium-avatar-wrapper {
    width: 80px;
    height: 80px;
  }
  .podium-avatar {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }
  .podium-name {
    font-size: 13px;
  }
  .step-1 .podium-name {
    font-size: 14px;
  }
  .podium-achieve {
    font-size: 10px;
    padding: 2px 6px;
  }
  .step-1 .podium-cylinder-body { height: 110px; }
  .step-2 .podium-cylinder-body { height: 80px; }
  .step-3 .podium-cylinder-body { height: 60px; }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-info h3 {
  font-size: 28px;
  line-height: 1.1;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 14px;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 6px;
  transition: width 1s ease-in-out;
}

/* Footer Section */
footer {
  background: var(--text-main);
  color: hsl(210, 16%, 80%);
  padding: 60px 0 30px;
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.footer-col h3 {
  color: var(--text-white);
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: hsl(210, 16%, 70%);
}

.footer-col ul li a:hover {
  color: var(--text-white);
}

.copyright {
  text-align: center;
  font-size: 14px;
  color: hsl(210, 16%, 60%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
}

/* Exam Library Grid & Cards - Premium Interactive Version */
.exams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.exam-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Hover effects with dynamic colored glows depending on grade colors */
.exam-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.08);
}

.exam-card:has(.tag-t1):hover { border-color: rgba(20, 184, 166, 0.4); box-shadow: 0 20px 35px rgba(20, 184, 166, 0.12); }
.exam-card:has(.tag-t2):hover { border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 20px 35px rgba(59, 130, 246, 0.12); }
.exam-card:has(.tag-t3):hover { border-color: rgba(239, 68, 68, 0.4); box-shadow: 0 20px 35px rgba(239, 68, 68, 0.12); }
.exam-card:has(.tag-t4):hover { border-color: rgba(249, 115, 22, 0.4); box-shadow: 0 20px 35px rgba(249, 115, 22, 0.12); }
.exam-card:has(.tag-t5):hover { border-color: rgba(234, 179, 8, 0.4); box-shadow: 0 20px 35px rgba(234, 179, 8, 0.12); }
.exam-card:has(.tag-t6):hover { border-color: rgba(34, 197, 94, 0.4); box-shadow: 0 20px 35px rgba(34, 197, 94, 0.12); }
.exam-card:has(.tag-t7):hover { border-color: rgba(99, 102, 241, 0.4); box-shadow: 0 20px 35px rgba(99, 102, 241, 0.12); }
.exam-card:has(.tag-t8):hover { border-color: rgba(236, 72, 153, 0.4); box-shadow: 0 20px 35px rgba(236, 72, 153, 0.12); }

.exam-img-wrapper {
  position: relative;
  height: 185px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  background: hsl(210, 20%, 96%);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.exam-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.exam-card:hover .exam-img-wrapper img {
  transform: scale(1.08);
}

/* Glass overlay details on hover */
.exam-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.exam-card:hover .exam-img-overlay {
  opacity: 1;
}

.exam-img-overlay span {
  background: var(--text-white);
  color: var(--text-main);
  padding: 8px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
  transform: translateY(12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 6px;
}

.exam-card:hover .exam-img-overlay span {
  transform: translateY(0);
}

.exam-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 30px;
  width: fit-content;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.exam-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 14px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 46px;
  transition: var(--transition);
}

.exam-card:hover .exam-title {
  color: var(--primary);
}

.exam-meta-info {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.exam-meta-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.exam-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 16px;
  margin-top: auto;
}

.exam-status {
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
}

.exam-action-btn {
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.exam-card:hover .exam-action-btn {
  background: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(242, 98, 34, 0.25);
}

/* Premium Scholarship Button Effect */
.btn-scholarship {
  background: linear-gradient(135deg, #f59e0b 0%, #ca8a04 100%);
  color: #ffffff !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  animation: gold-pulse 2s infinite;
}

.btn-scholarship:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

.btn-scholarship::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 30%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.3) 70%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shimmer 3.5s infinite ease-in-out;
}

@keyframes shimmer {
  0% {
    transform: translate(-100%, -100%) rotate(30deg);
  }
  30% {
    transform: translate(100%, 100%) rotate(30deg);
  }
  100% {
    transform: translate(100%, 100%) rotate(30deg);
  }
}

@keyframes gold-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Mobile Navigation Drawer styles */
.mobile-menu-toggle {
  display: none !important;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 22px;
  cursor: pointer;
  outline: none;
  padding: 8px;
  transition: var(--transition);
}

.mobile-menu-drawer {
  display: none !important; /* Ẩn mặc định trên PC */
}

/* Ngăn chữ xuống dòng trên menu PC */
.logo-link,
.menu-item a,
.nav-actions {
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: block !important;
  }
  
  .header-nav .nav-container > .menu-links,
  .header-nav .nav-container > .nav-actions {
    display: none !important; /* Ẩn menu desktop */
  }
  
  .header-nav .logo-link {
    display: flex !important; /* Luôn hiện logo */
  }
  
  .nav-container.mobile-active {
    flex-wrap: wrap;
  }
  
  .mobile-menu-drawer {
    display: none !important;
    width: 100%;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 12px;
    animation: drawer-fade-in 0.25s ease-out;
  }
  
  @keyframes drawer-fade-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .mobile-menu-drawer.active {
    display: flex !important;
  }
  
  .mobile-menu-drawer .menu-links {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
    padding: 0;
  }
  
  .mobile-menu-drawer .menu-links .menu-item a {
    display: block;
    padding: 12px 16px;
    background: var(--slate-100);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 700;
  }
  
  .mobile-menu-drawer .mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Tối ưu hóa layout khối chính */
  .container {
    padding: 0 16px;
  }
  
  /* Lưới lớp học trên mobile */
  .grade-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Grid thống kê */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Bố cục chia đôi trên dashboard học sinh */
  main.container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  /* Tối ưu hoá Banner Hero trên mobile */
  .hero-title {
    font-size: 34px !important;
    line-height: 1.25 !important;
  }
  
  .hero-des {
    font-size: 15px !important;
    margin-bottom: 20px;
  }
  
  /* Thu nhỏ phần đầu đề trên mobile */
  .section-title {
    font-size: 26px !important;
  }
  
  .section-subtitle {
    font-size: 14px !important;
    margin-bottom: 24px;
  }
}

@media (max-width: 480px) {
  /* Màn hình điện thoại cực nhỏ */
  .hero-title {
    font-size: 28px !important;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  /* Bo góc nhỏ hơn cho card vinh danh trên mobile */
  .podium-bg-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  }
  
  /* Chỉnh lại drawer menu di động đẹp mắt hơn */
  .mobile-menu-drawer .menu-links .menu-item a {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-main) !important;
  }
  
  .mobile-menu-drawer .menu-links .menu-item a:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
  }
}

/* ==========================================================================
   CSS CỔNG THI TRỰC TUYẾN (EXAM PORTAL)
   ========================================================================== */
.exam-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 30, 0.85); /* Nền tối mờ huyền ảo */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.exam-modal-content {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.95) !important; /* Nền tối */
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--text-white) !important;
  position: relative;
  border-radius: var(--radius-lg);
  padding: 35px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
}

/* Tinh chỉnh nút đóng Modal */
.exam-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 32px;
  cursor: pointer;
  transition: var(--transition);
}

.exam-modal-close:hover {
  color: var(--error);
  transform: rotate(90deg);
}

/* THIẾT KẾ TRẠNG THÁI 1: WELCOME & COUNTDOWN */
.exam-welcome-header {
  text-align: center;
  margin-bottom: 30px;
}

.trophy-welcome {
  font-size: 64px;
  color: var(--warning);
  text-shadow: 0 0 20px rgba(250, 204, 21, 0.5);
  margin-bottom: 15px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.exam-title-gradient {
  font-size: clamp(20px, 4cqi, 28px);
  background: linear-gradient(135deg, #fff 40%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.exam-subtitle-p {
  color: var(--text-muted);
  font-size: 15px;
}

.exam-info-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 30px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span {
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-row strong {
  color: #fff;
}

/* Form chọn lớp thi nhanh */
.quick-class-select {
  margin-bottom: 10px;
}

.glass-input-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.glass-input-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(242, 98, 34, 0.3);
}

/* Đồng hồ LED 3D */
.countdown-clock-led-wrapper {
  background: #090d16;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 4px 15px rgba(0,0,0,0.8), 0 0 15px rgba(0,0,0,0.5);
  border-radius: var(--radius-md);
  padding: 20px 30px;
  display: inline-block;
  margin: 15px auto;
}

#countdown-clock-led {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 6cqi, 48px);
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 15px rgba(242, 98, 34, 0.6);
  letter-spacing: 2px;
}

.status-waiting {
  font-size: 15px;
  color: var(--warning);
}

.status-critical {
  font-size: 16px;
  font-weight: 700;
  color: var(--error);
  animation: pulse 0.5s infinite alternate;
}

.status-ready {
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
}

/* THIẾT KẾ TRẠNG THÁI 2: LÀM BÀI THI */
.testing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(255,255,255,0.1);
  padding-bottom: 20px;
  margin-bottom: 25px;
}

.testing-title-area h3 {
  color: #fff;
  margin-bottom: 5px;
}

.exam-progress-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.testing-timer-area {
  text-align: right;
}

#exam-test-timer-led {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--secondary);
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.testing-body-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 25px;
}

@media (max-width: 768px) {
  .testing-body-grid {
    grid-template-columns: 1fr;
  }
}

.testing-question-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  padding: 25px !important;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.question-box-header {
  margin-bottom: 15px;
}

.question-index-label {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.question-detail-text {
  font-size: 16px;
  line-height: 1.7;
  color: #fff;
  margin-bottom: 30px;
  flex-grow: 1;
}

.testing-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.testing-option-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1.5px solid rgba(255,255,255,0.08) !important;
  padding: 16px 20px !important;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: none !important;
}

.testing-option-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255,255,255,0.2) !important;
  transform: translateX(4px);
}

.testing-option-item.selected {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.testing-option-item.selected .option-text-span {
  color: var(--primary) !important;
}

.option-letter-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.option-text-span {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

/* Sidebar Question Navigation */
.testing-sidebar-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  padding: 20px !important;
  height: fit-content;
}

.testing-sidebar-card h4 {
  color: #fff;
  margin-bottom: 5px;
}

.question-dots-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.nav-dot-btn {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.nav-dot-btn:hover {
  border-color: #fff;
  color: #fff;
}

.nav-dot-btn.current {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(242, 98, 34, 0.4);
}

.nav-dot-btn.answered {
  border-color: var(--secondary);
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* THIẾT KẾ TRẠNG THÁI 3: KẾT QUẢ THI */
.result-success-icon {
  font-size: 72px;
  margin-bottom: 15px;
}

.result-message {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
}

.result-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .result-summary-grid {
    grid-template-columns: 1fr;
  }
}

.summary-score-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  padding: 30px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.summary-score-card span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}

.summary-score-card h1 {
  font-size: 72px;
  font-family: 'Outfit', sans-serif;
  color: var(--primary);
  text-shadow: 0 0 25px rgba(242, 98, 34, 0.5);
  line-height: 1;
  margin: 10px 0;
}

.summary-score-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

.summary-details-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  padding: 25px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-stat {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.detail-stat:last-child {
  border-bottom: none;
}

.detail-stat span {
  color: rgba(255,255,255,0.7);
}

.detail-stat strong {
  color: #fff;
}

/* Học bổng Badges màu sắc lung linh */
.scholarship-gold {
  color: #fde047 !important;
  background: rgba(253, 224, 71, 0.15) !important;
  border-color: rgba(253, 224, 71, 0.3) !important;
}

.scholarship-silver {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}

.scholarship-bronze {
  color: #fb923c !important;
  background: rgba(251, 146, 60, 0.15) !important;
  border-color: rgba(251, 146, 60, 0.3) !important;
}

/* Đáp án giải thích */
.explain-card {
  background: rgba(255, 255, 255, 0.02) !important;
  margin-bottom: 20px;
  padding: 20px !important;
  box-shadow: none !important;
}

.explain-card.correct-border {
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.explain-card.wrong-border {
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.explain-card-header {
  margin-bottom: 10px;
}

.explain-index {
  font-weight: 800;
  font-size: 15px;
}

.explain-question-text {
  font-size: 15px;
  color: #fff;
  margin-bottom: 15px;
  line-height: 1.6;
}

.explain-options-check {
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  margin-bottom: 15px;
}

.explain-options-check p {
  margin-bottom: 5px;
  font-size: 14px;
}

.explain-options-check p:last-child {
  margin-bottom: 0;
}

.txt-success {
  color: var(--success);
  font-weight: 700;
}

.txt-error {
  color: var(--error);
  font-weight: 700;
}

.explain-text-box {
  border-left: 3px solid var(--primary);
  background: rgba(242, 98, 34, 0.05);
  padding: 10px 15px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Hiệu ứng pulse và nháy */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.shine-btn {
  position: relative;
  overflow: hidden;
}

.shine-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.13) 77%,
    rgba(255, 255, 255, 0.5) 92%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  transition: transform 0.5s ease;
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translate(-30%, -30%) rotate(30deg); }
  100% { transform: translate(30%, 30%) rotate(30deg); }
}
/* Style cho bảng xếp hạng kỳ thi học bổng */
.exam-leaderboard-table th {
  padding: 12px 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.exam-leaderboard-table td {
  padding: 12px 10px;
  vertical-align: middle;
}

.exam-leaderboard-table tbody tr {
  transition: var(--transition);
}

.exam-leaderboard-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* ==========================================================================
   Responsive Mobile Styles (Tối ưu hóa giao diện di động)
   ========================================================================== */

/* 1. Cho các trang Học thử (vao-hoc.html & các trang con lớp) */
@media (max-width: 768px) {
  .week-header {
    padding: 14px 18px !important;
  }
  .week-title {
    font-size: 15px !important;
    gap: 8px !important;
  }
  .week-badge {
    font-size: 10px !important;
    padding: 2px 8px !important;
  }
  .week-content {
    padding: 0 16px !important;
  }
  .week-card.active .week-content {
    padding: 16px 16px !important;
    max-height: 1200px !important; /* Đủ lớn để chứa nội dung dạng dọc */
  }
  .lesson-item {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px 14px !important;
  }
  .lesson-left {
    width: 100% !important;
    gap: 10px !important;
  }
  .lesson-name {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }
  .lesson-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
  }
  
  /* Hộp thoại thanh toán offline */
  .pkg-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  #payment-modal .modal-body-content {
    width: 95% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  #payment-modal .modal-body-content > div:last-child {
    grid-template-columns: 1fr !important; /* Chuyển QR và thông tin Bank thành 1 cột dọc */
    gap: 16px !important;
  }
  #payment-grade-container {
    grid-template-columns: repeat(3, 1fr) !important; /* 3 cột chọn lớp trên mobile */
  }
}

/* 2. Cho các trang Làm đề thi trắc nghiệm (quiz.html) */
.quiz-container {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  margin-top: 30px;
  margin-bottom: 60px;
}

@media (max-width: 768px) {
  .quiz-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    margin-top: 16px !important;
    margin-bottom: 40px !important;
  }
  .quiz-meta-card {
    margin-top: 0 !important;
  }
  .question-card {
    padding: 16px !important;
  }
  .option-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .option-list li {
    margin-bottom: 0 !important;
  }
  .option-list li.option-item {
    font-size: 13.5px !important;
    padding: 12px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  #quiz-result-modal #quiz-modal-card {
    width: 90% !important;
    padding: 24px 20px !important;
  }
}

/* 3. Cho phần Video bài giảng giới thiệu trên Trang chủ */
.video-intro-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  align-items: center;
}

.video-intro-card {
  padding: 40px;
}

@media (max-width: 768px) {
  .video-intro-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .video-intro-card {
    padding: 24px 16px !important;
  }
  .video-intro-grid .hero-image-wrapper {
    width: 100% !important;
    margin-top: 10px !important;
    box-shadow: var(--shadow-md) !important;
    aspect-ratio: 16/9 !important;
  }
}

/* 4. Tự động tối ưu hóa hero section của các trang học thử (Lớp 1 đến 12) */
.container > .glass-card[style*="display: flex"] {
  display: flex !important;
  gap: 32px;
  align-items: center;
}

@media (max-width: 768px) {
  .container > .glass-card[style*="display: flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
    text-align: center !important;
    padding: 20px 14px !important;
  }
  .container > .glass-card[style*="display: flex"] h1 {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }
  .container > .glass-card[style*="display: flex"] p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  /* Các nút Zalo, Bảng học tập */
  .container > .glass-card[style*="display: flex"] div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 16px !important;
  }
  .container > .glass-card[style*="display: flex"] div[style*="display: flex"] .btn {
    width: 100% !important;
    padding: 10px 16px !important;
  }
  /* Ẩn hình ảnh logo bên phải trên di động để tránh tràn màn hình */
  .container > .glass-card[style*="display: flex"] div[style*="width: 300px"],
  .container > .glass-card[style*="display: flex"] .pure-hidden-xs {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 12px !important;
  }
  
  /* Cải tiến các nút điều hướng làm bài tập */
  .quiz-nav-actions {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
    padding-top: 16px !important;
    margin-top: 24px !important;
  }
  .quiz-nav-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  .quiz-nav-right {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   BẢO VỆ BẢN QUYỀN & CHỐNG SAO CHÉP (COPYRIGHT PROTECTION)
   ========================================================================== */

/* Chặn bôi đen toàn trang học sinh để tránh copy đề bài, lời giải */
body.protected-copyright {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* Cho phép bôi đen trong các ô nhập liệu để học sinh vẫn làm bài được */
body.protected-copyright input,
body.protected-copyright textarea,
body.protected-copyright [contenteditable="true"] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Watermark lớp nền */
.copyright-watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Cho phép click xuyên qua lớp watermark */
  z-index: 99999; /* Nổi trên cùng */
  opacity: 0.15; /* Rất mờ để không cản trở việc học */
  overflow: hidden;
}

/* Overlay bảo vệ thẻ video */
.video-protector-overlay {
  cursor: default;
}



