/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PROPERTIES VARIABLES
   ========================================================================== */
:root {
  /* Default settings loaded dynamically via server settings */
  --bg-main: #f5f1e8;
  --menu-bg: rgba(255, 255, 255, 0.85);
  --menu-text: #2d3748;
  --menu-hover: #5ca36b;
  --footer-bg: #1a202c;
  --footer-text: #a0aec0;
  --btn-unlock: #e07a5f;
  --btn-practice: #5ca36b;
  --card-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --copyright-text: #e2e8f0;
  --scroll-top-bg: #5ca36b;

  /* Font variables for beautiful Vietnamese and Korean display */
  --body-font: ''Be Vietnam Pro', 'Inter', 'Noto Sans KR'', Arial, sans-serif;
  --menu-font: ''Be Vietnam Pro', 'Inter', 'Noto Sans KR'', Arial, sans-serif;
  --title-font: ''Be Vietnam Pro', 'Inter', 'Noto Sans KR'', Arial, sans-serif;
  --text-font: ''Be Vietnam Pro', 'Inter', 'Noto Sans KR'', Arial, sans-serif;

  /* Theme Constants */
  --accent-orange-hover: #d06549;
  --accent-green-hover: #4a8c57;
  --text-dark: #2d3748;
  --text-light: #718096;
  --border-color: #e2e8f0;
  --border-radius: 16px;
  --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --box-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   BASE & RESET STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--body-font);
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 80px; /* Offset for sticky header */
  
  /* Disable text selection to protect content */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Enable selection in input, textarea, and editable elements */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   CONTENT SECURITY: SHIELDS & WATERMARKS
   ========================================================================== */
.watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Make click-through */
  z-index: 99999; /* Always on top */
  opacity: 0.04; /* Very subtle, non-intrusive */
  user-select: none;
  -webkit-user-select: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' viewBox='0 0 250 250'%3E%3Ctext x='50%25' y='50%25' font-size='12' font-family='sans-serif' font-weight='bold' fill='%23000000' text-anchor='middle' transform='rotate(-35 125 125)'%3Ehanquockacha / testkiip.com%3C/text%3E%3C/svg%3E");
}

/* Disable selection classes for secure study pages */
.secure-content-view,
.pdf-page-viewer,
.mock-video-player,
.practice-left-column {
  user-select: none !important;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Disable Print Stylesheet */
@media print {
  body {
    display: none !important;
  }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--menu-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 40px;
}

.logo-icon {
  font-size: 1.8rem;
  animation: pulse 2s infinite;
}

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-main {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.2px;
  color: var(--menu-text);
  line-height: 1.1;
  white-space: nowrap;
}

.logo-sub {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--menu-hover);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.desktop-nav {
  display: flex;
  gap: 10px;
  flex-shrink: 1;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

.desktop-nav::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

.lang-selector-container,
.user-auth-status {
  flex-shrink: 0;
}

.nav-link {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--menu-text);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ff4d4d; /* Red on hover */
}

.btn-login {
  background-color: var(--menu-hover);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 6px -1px rgba(92, 163, 107, 0.2);
}

.btn-login:hover {
  background-color: var(--accent-green-hover);
  transform: translateY(-1px);
}

/* User avatar widget */
.user-profile-widget {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--menu-hover);
  transition: transform 0.2s ease;
}

.user-avatar:hover {
  transform: scale(1.05);
}

.user-info-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 240px;
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  padding: 15px;
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 1001;
  animation: slideDown 0.2s ease;
}

.user-info-dropdown::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background: transparent;
}

.user-profile-widget:hover .user-info-dropdown {
  display: flex;
}

.dropdown-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.dropdown-email {
  font-size: 0.8rem;
  color: var(--text-light);
}

.dropdown-item {
  text-align: left;
  background: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-dark);
}

.dropdown-item:hover {
  background-color: #f7fafc;
  color: var(--menu-hover);
}

.dropdown-item.btn-danger {
  color: #e53e3e;
}

.dropdown-item.btn-danger:hover {
  background-color: #fff5f5;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  z-index: 1010;
}

.hamburger-btn span {
  width: 24px;
  height: 2px;
  background-color: var(--menu-text);
  border-radius: 10px;
  transition: all 0.3s linear;
}

/* Hamburger active transformations */
.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Mobile Menu dropdown */
.mobile-nav {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: var(--box-shadow);
  animation: slideDown 0.3s ease;
}

.mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-link {
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 8px;
}

.mobile-nav-link:hover {
  background-color: #f7fafc;
  color: var(--menu-hover);
}

/* ==========================================================================
   HERO / BIOGRAPHY & SLIDER
   ========================================================================== */
.hero-author-section {
  padding: 40px 0;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: stretch;
}

.author-bio-card {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  padding: 25px 30px;
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge {
  display: inline-block;
  align-self: flex-start;
  background-color: rgba(92, 163, 107, 0.1);
  color: var(--menu-hover);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.author-bio-card h1 {
  font-family: var(--title-font);
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.25;
}

.author-text {
  color: var(--text-light);
  font-size: 0.93rem;
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-line;
}

.author-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-btn {
  color: #ffffff;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, filter 0.2s;
}

.contact-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.zalo-bg { background-color: #0068ff; }
.kakao-bg { background-color: #f7e600; color: #3c1e1e; }
.fb-bg { background-color: #1877f2; }
.email-bg { background-color: #4a5568; }

/* Slideshow Container */
.slider-container {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  background-color: #afd485;
  height: 100%;
  min-height: 380px;
}

.slides-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide-item {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 40px 30px 30px 30px;
  color: #ffffff;
}

.slide-caption-overlay h3 {
  font-family: var(--title-font);
  font-size: 1.4rem;
  font-weight: 700;
}

.slider-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background-color: var(--menu-hover);
  width: 0%;
  transition: width 0.1s linear;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  color: var(--text-dark);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.slider-nav:hover {
  background-color: #ffffff;
}

.prev-slide { left: 15px; }
.next-slide { right: 15px; }

.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dot.active {
  background-color: #ffffff;
  width: 24px;
  border-radius: 10px;
}

/* ==========================================================================
   UPGRADE / UNLOCK INSTRUCTION SECTION
   ========================================================================== */
.upgrade-banner-section {
  margin-bottom: 40px;
}

.upgrade-banner-card {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe4e6 50%, #fecdd3 100%);
  color: #881337;
  border-radius: var(--border-radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(244, 63, 94, 0.3);
  box-shadow: 0 15px 35px -10px rgba(225, 29, 72, 0.15), 0 5px 15px -3px rgba(0, 0, 0, 0.03);
}

.upgrade-banner-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.15) 0%, rgba(251, 113, 133, 0.05) 50%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.upgrade-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.upgrade-info-header h2 {
  font-family: var(--title-font);
  font-size: 1.8rem;
  font-weight: 800;
  color: #881337;
}

.price-tag {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.price-tag .price-num-large {
  font-family: var(--title-font);
  font-size: 2.3rem;
  font-weight: 800;
  color: #e11d48;
  line-height: 1;
}

.price-tag .price-won-symbol {
  font-family: var(--body-font);
  font-size: 1.2rem;
  font-weight: 700;
  color: #881337;
  line-height: 1;
}

.price-tag .price-duration-label {
  font-family: var(--body-font);
  font-size: 1.2rem;
  font-weight: 700;
  color: #9f1239;
  line-height: 1;
}

.upgrade-subtitle {
  color: #881337;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.text-highlight-btn {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff !important;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  margin: 0 4px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
  vertical-align: middle;
  font-size: 0.9em;
  line-height: 1.4;
}

.upgrade-promo {
  color: #9f1239;
  font-size: 1.05rem;
  max-width: 800px;
  margin-bottom: 25px;
}

.upgrade-action-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-primary-upgrade {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.35);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary-upgrade:hover {
  background: linear-gradient(135deg, #be123c 0%, #9f1239 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(225, 29, 72, 0.45);
}

/* ==========================================================================
   MAIN CONTENT & SIDEBAR LAYOUT
   ========================================================================== */
.main-layoutcontainer {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
  padding-bottom: 80px;
}

.exam-levels-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0; /* Prevents flex items blowout */
}

.level-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-left: 5px solid var(--menu-hover);
  padding-left: 15px;
}

.level-title-area {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.level-section-header h2 {
  font-family: var(--title-font);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

.level-lock-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
}

.level-lock-badge .lock-star {
  font-size: 1.1rem;
}

.level-lock-badge .lock-text {
  color: var(--text-dark);
}

.btn-unlock-level {
  background-color: var(--btn-unlock);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 5px;
}

.btn-unlock-level:hover {
  background-color: var(--accent-orange-hover);
}

.btn-view-all {
  background: transparent;
  color: var(--menu-hover);
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-view-all:hover {
  color: var(--accent-green-hover);
}

/* HORIZONTAL SCROLL CARDS */
.cards-scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 10px 5px 20px 5px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.cards-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.cards-scroll-container::-webkit-scrollbar-track {
  background: #edf2f7;
  border-radius: 10px;
}

.cards-scroll-container::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 10px;
}

/* CARD LAYOUTS */
.exam-card {
  min-width: 280px;
  max-width: 280px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  scroll-snap-align: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.exam-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.card-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 150px;
  background-color: #e2e8f0;
}

.card-thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--menu-hover);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.exam-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.exam-card-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
  line-height: 1.3;
}

.exam-card-body p {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-card-action {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-card-unlock {
  background-color: var(--btn-unlock);
  color: #ffffff;
}

.btn-card-unlock:hover {
  background-color: var(--accent-orange-hover);
}

.btn-card-study {
  background-color: #f16427;
  color: #ffffff;
  grid-column: span 2;
}

.btn-card-study:hover {
  background-color: #d54e17;
}

.btn-card-practice-choice {
  background-color: var(--btn-practice);
  color: #ffffff;
}

.btn-card-practice-choice:hover {
  background-color: var(--accent-green-hover);
}

.btn-card-practice-interview {
  background-color: #3182ce;
  color: #ffffff;
}

.btn-card-practice-interview:hover {
  background-color: #2b6cb0;
}

.btn-card-practice-anthem {
  background-color: #d97706;
  color: #ffffff;
}

.btn-card-practice-anthem:hover {
  background-color: #b45309;
}

/* National Anthem Karaoke Sync Line Styles */
.anthem-line-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.anthem-line-card:hover {
  transform: translateX(4px);
  filter: brightness(0.97);
}

.anthem-line-card.active-singing-line {
  border-left-color: #2563eb !important;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25) !important;
  transform: scale(1.02) translateX(6px) !important;
}

.singing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #2563eb;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  animation: singingPulse 1.5s infinite;
}

@keyframes singingPulse {
  0% { opacity: 0.85; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 0.85; transform: scale(0.98); }
}



/* Glassmorphic Locked card state overlays */
.card-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(245, 241, 232, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.exam-card.locked-card .card-lock-overlay {
  opacity: 1;
  pointer-events: auto;
}

.lock-icon-big {
  font-size: 2.2rem;
  color: var(--btn-unlock);
  margin-bottom: 12px;
  animation: bounce 2s infinite;
}

.lock-msg {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.btn-unlock-overlay {
  background-color: var(--btn-unlock);
  color: #ffffff;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(224, 122, 95, 0.3);
}

.btn-unlock-overlay:hover {
  background-color: var(--accent-orange-hover);
  transform: scale(1.03);
}

/* SIDEBAR STYLES */
.right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-card {
  background-color: var(--sidebar-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 20px;
  box-shadow: var(--box-shadow);
}

.notice-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #e53e3e;
}

.notice-text {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.notice-date {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 600;
}

.ad-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  height: 250px;
  transition: transform 0.2s ease;
}

.ad-card:hover {
  transform: scale(1.02);
}

.ad-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-label {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   FLOATING CHATBOT WIDGET
   ========================================================================== */
.chat-bubble-widget {
  position: fixed;
  bottom: 95px;
  right: 25px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-main-btn {
  background-color: var(--menu-hover);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(92, 163, 107, 0.3);
}

.chat-main-btn:hover {
  background-color: #4b8857;
  transform: translateY(-2px);
}

.chat-icon {
  font-size: 1.2rem;
}

.chat-options-popup {
  position: absolute;
  bottom: 65px;
  right: 0;
  width: 250px;
  background-color: #ffffff;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow-hover);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideUp 0.3s ease;
}

.chat-popup-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 5px;
}

.chat-channel {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}

.chat-channel:hover {
  filter: brightness(1.08);
}

.zalo-color { background-color: #0068ff; }
.kakao-color { background-color: #f7e600; color: #3c1e1e; }
.fb-color { background-color: #0084ff; }

/* ==========================================================================
   FOOTER STYLE
   ========================================================================== */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 30px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.site-footer .footer-top-row {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
}

.footer-top-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-brand-box {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.logo-icon-footer {
  font-size: 2.2rem;
}

.footer-brand-box h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.footer-col-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.footer-menu-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-menu-items a {
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-menu-items a:hover {
  color: var(--menu-hover);
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 30px;
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
}

@media (min-width: 769px) {
  .site-footer .footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .footer-logos-verification {
    display: none !important;
  }
  .copyright-area {
    justify-content: flex-start !important;
    text-align: left !important;
  }
  .site-footer .footer-action-buttons {
    justify-content: flex-end;
    flex-shrink: 0;
  }
}

.footer-logos-verification {
  display: flex;
  gap: 15px;
}

.verify-logo {
  height: 40px;
  object-fit: contain;
  background-color: rgba(255,255,255,0.05);
  border-radius: 4px;
  padding: 4px;
}

.copyright-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  flex-grow: 1;
  text-align: center;
}

#footer-copyright-text {
  font-size: 0.85rem;
  color: var(--copyright-text);
  font-weight: 500;
}

.thanks-note {
  font-size: 0.8rem;
  color: var(--menu-hover);
  font-weight: 700;
  display: block;
  margin-top: 5px;
}

.footer-action-buttons {
  display: flex;
  gap: 10px;
}

.btn-footer-link {
  background-color: rgba(255,255,255,0.05);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.btn-footer-link:hover {
  background-color: var(--menu-hover);
}

/* ==========================================================================
   MODAL WINDOW & FORM OVERLAYS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.modal-box {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  width: 100%;
  max-width: 550px;
  padding: 40px;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  font-size: 1.8rem;
  color: var(--text-light);
  line-height: 1;
}

.modal-close-btn:hover {
  color: #000000;
}

/* Login Modal Elements */
.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-icon-login {
  font-size: 3rem;
  margin-bottom: 10px;
}

.login-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
}

.login-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.login-box {
  max-width: 420px;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
  pointer-events: none;
}

.input-wrapper .form-input {
  padding-left: 42px;
}

.custom-login-input-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--menu-hover);
}

.btn-submit-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
  cursor: pointer;
}

.btn-submit-google-auth:hover {
  background-color: #f8f9fa;
  box-shadow: 0 2px 4px 0 rgba(60,64,67,0.3), 0 5px 10px 4px rgba(60,64,67,0.15);
  transform: translateY(-1px);
}

.btn-submit-google-auth:active {
  background-color: #eeeeee;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3);
  transform: translateY(0);
}

.google-logo-svg {
  flex-shrink: 0;
}

.login-footer-note {
  font-size: 0.72rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 15px;
  line-height: 1.5;
}

/* Checkout step styling */
.checkout-box {
  max-width: 650px;
}

.subtitle {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.btn-submit-checkout {
  background-color: var(--btn-unlock);
  color: #ffffff;
  font-weight: 700;
  padding: 14px 0;
  border-radius: 10px;
  font-size: 1rem;
  margin-top: 10px;
}

.btn-submit-checkout:hover {
  background-color: var(--accent-orange-hover);
}

/* Payment step components */
.payment-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 25px;
  margin-bottom: 20px;
}

.qr-code-box {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
}

.vietqr-img {
  width: 100%;
  max-width: 160px;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.qr-notice {
  font-size: 0.65rem;
  color: var(--text-light);
  text-align: center;
  font-weight: 500;
}

.bank-param-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.param-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.param-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.font-mono {
  font-family: 'Courier New', Courier, monospace;
}

.text-highlight { color: #2b6cb0; }
.text-alert { color: #e53e3e; }

.btn-copy {
  background-color: rgba(92, 163, 107, 0.1);
  color: var(--menu-hover);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 6px;
}

.btn-copy:hover {
  background-color: var(--menu-hover);
  color: #ffffff;
}

.payment-warning-card {
  background-color: #fffaf0;
  border-left: 4px solid #dd6b20;
  color: #7b341e;
  padding: 15px;
  font-size: 0.85rem;
  border-radius: 4px 12px 12px 4px;
  margin-bottom: 25px;
}

.btn-confirm-payment {
  background-color: var(--btn-practice);
  color: #ffffff;
  font-weight: 700;
  width: 100%;
  padding: 14px 0;
  border-radius: 10px;
  font-size: 1rem;
}

.btn-confirm-payment:hover {
  background-color: var(--accent-green-hover);
}

/* Activation Code Screen */
.activation-form-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.text-center { text-align: center; }

.btn-submit-activation {
  background-color: var(--btn-unlock);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 0;
  border-radius: 10px;
}

/* ==========================================================================
   STUDY WORKSPACE PANEL
   ========================================================================== */
.study-workspace-box {
  max-width: 800px;
}

.workspace-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
}

.tab-btn {
  background: transparent;
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 15px;
  border-bottom: 3px solid transparent;
}

.tab-btn.active {
  color: var(--menu-hover);
  border-bottom-color: var(--menu-hover);
}

.video-container-wrapper {
  background-color: #000000;
  border-radius: 12px;
  overflow: hidden;
}

.mock-video-player {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a202c;
  color: #ffffff;
}

.play-btn-big {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(92, 163, 107, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.play-btn-big:hover {
  transform: scale(1.1);
}

.mock-video-player video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background-color: #000000;
}

.video-watermark {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 0.75rem;
  opacity: 0.4;
  letter-spacing: 0.5px;
  z-index: 10;
  pointer-events: none;
}

.video-duration {
  position: absolute;
  bottom: 60px;
  right: 15px;
  font-size: 0.8rem;
  background-color: rgba(0,0,0,0.6);
  padding: 2px 6px;
  border-radius: 4px;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0,0,0,0.8);
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.video-progress {
  flex-grow: 1;
  height: 6px;
  background-color: rgba(255,255,255,0.3);
  border-radius: 3px;
  cursor: pointer;
}

.progress-bar-fill {
  background-color: var(--menu-hover);
  height: 100%;
  border-radius: 3px;
}

/* PDF layout simulator */
.pdf-container-wrapper {
  background-color: #edf2f7;
  border-radius: 12px;
  padding: 20px;
  height: 420px;
  overflow-y: auto;
  position: relative;
}

.pdf-page-viewer {
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  padding: 40px;
  min-height: 500px;
  border-radius: 8px;
  position: relative;
}

.pdf-page-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  width: 100%;
  text-align: center;
}

.pdf-page-viewer h3 {
  margin-bottom: 25px;
  text-align: center;
}

.korean-text {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 15px;
  line-height: 1.8;
}

.quiz-choices-vertical {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pdf-page-border-notice {
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
}

.pdf-actions-disabled-bar {
  background-color: #1a202c;
  color: #94a3b8;
  text-align: center;
  padding: 8px;
  font-size: 0.8rem;
  margin-top: 10px;
  border-radius: 4px;
}

/* MP3 Player frame styling */
.mp3-player-card {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  border-radius: 12px;
  padding: 30px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.audio-waves-simulation {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 40px;
}

.audio-waves-simulation span {
  width: 5px;
  height: 100%;
  background-color: var(--menu-hover);
  border-radius: 10px;
}

/* wave animations */
.audio-waves-simulation span:nth-child(1) { animation: wave 1.2s infinite ease-in-out; }
.audio-waves-simulation span:nth-child(2) { animation: wave 0.8s infinite ease-in-out 0.2s; }
.audio-waves-simulation span:nth-child(3) { animation: wave 1.5s infinite ease-in-out 0.4s; }
.audio-waves-simulation span:nth-child(4) { animation: wave 1s infinite ease-in-out 0.1s; }
.audio-waves-simulation span:nth-child(5) { animation: wave 1.3s infinite ease-in-out 0.3s; }

.audio-track-info {
  text-align: center;
}

.audio-track-info strong {
  display: block;
  font-size: 1.1rem;
}

.audio-track-info .author-name {
  font-size: 0.8rem;
  color: #cbd5e0;
}

.audio-controls-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.audio-ctrl-btn {
  background-color: rgba(255,255,255,0.1);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-ctrl-btn.play-audio-btn {
  background-color: var(--menu-hover);
  width: 50px;
  height: 50px;
}

.audio-time-slider {
  flex-grow: 1;
  height: 4px;
  background-color: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.audio-time-fill {
  background-color: var(--menu-hover);
  height: 100%;
}

.audio-time-label {
  font-size: 0.75rem;
  color: #cbd5e0;
}

.secure-download-badge {
  font-size: 0.75rem;
  color: #cbd5e0;
  text-align: center;
}

/* ==========================================================================
   ACTIVE PRACTICE TEST AREA
   ========================================================================== */
.practice-workspace-box {
  width: 95vw;
  max-width: 1050px;
  max-height: 90vh;
  padding: 28px 30px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow: hidden;
}

#practice-exam-title-name {
  font-size: 1.4rem;
  line-height: 1.35;
  margin-bottom: 0;
  color: var(--text-dark);
}

.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.practice-meta-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.time-countdown-block {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  background-color: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.progress-bar-container {
  width: 150px;
  height: 8px;
  background-color: #edf2f7;
  border-radius: 10px;
  overflow: hidden;
}

.practice-grid-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 25px;
  overflow: hidden;
  min-height: 0;
  flex-grow: 1;
}

.practice-grid-layout.full-width {
  grid-template-columns: 1fr;
}

.practice-left-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow: hidden;
  min-height: 0;
}

.question-display-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 24px;
  min-height: 150px;
  overflow-y: auto;
  flex-grow: 1;
}

.question-number-header {
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--menu-hover);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.question-content-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 12px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.question-instruction {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark, #2d3748);
  margin-bottom: 12px;
}

.question-passage-box {
  background-color: #f0fff4;
  border: 1.5px solid #2d3748;
  border-radius: 4px;
  padding: 12px 18px;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-dark, #2d3748);
  font-family: 'Noto Sans KR', sans-serif;
}

.options-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 0px;
}

/* Tối ưu khoảng cách cực kỳ gọn cho các câu hỏi CÓ hộp đoạn văn (như câu 11-20) */
.question-display-card:has(.question-passage-box) {
  padding: 12px 24px;
}

@media (max-width: 600px) {
  .options-group {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.option-neo-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid #111827;
  padding: 16px 20px;
  border-radius: 8px;
  background-color: #ffffff;
  color: #111827;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 4px 4px 0px #111827;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
}

.option-neo-btn:hover:not(.disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #111827;
  background-color: #f8f9fa;
}

.option-neo-btn:active:not(.disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #111827;
}

.option-neo-btn.disabled {
  pointer-events: none;
  cursor: default;
}

/* Correct feedback state */
.option-neo-btn.correct-choice {
  border-color: #10b981; /* emerald-500 */
  background-color: #ecfdf5; /* emerald-50 */
  box-shadow: 4px 4px 0px #10b981;
  color: #065f46; /* emerald-800 */
}

/* Wrong feedback state */
.option-neo-btn.wrong-choice {
  border-color: #ef4444; /* red-500 */
  background-color: #fef2f2; /* red-50 */
  box-shadow: 4px 4px 0px #ef4444;
  color: #991b1b; /* red-800 */
}

/* Custom style for KIIP 3 options to avoid bolding the entire sentence */
.option-neo-btn.kiip3-option {
  font-weight: 500;
}

.option-neo-btn.kiip3-option u,
.option-neo-btn.kiip3-option b,
.option-neo-btn.kiip3-option strong {
  font-weight: 800; /* Extra bold for underlined grammar focus parts */
}

/* Check / cross icons inside buttons */
.feedback-icon {
  font-size: 1.2rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feedback-icon.correct {
  color: #10b981;
}

.feedback-icon.wrong {
  color: #ef4444;
}

/* Custom Writing UI */
.form-textarea {
  width: 100%;
  height: 150px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  padding: 15px;
  font-size: 1rem;
  outline: none;
  resize: vertical;
}

.form-textarea:focus {
  border-color: var(--menu-hover);
}

.text-char-counter {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 5px;
}

/* Custom interview controls */
.interview-mic-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px;
  gap: 15px;
}

.btn-mic-simulate {
  background-color: #e53e3e;
  color: #ffffff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(229, 62, 62, 0.25);
}

.btn-mic-simulate.recording {
  animation: pulse 1s infinite alternate;
  background-color: #c53030;
}

.mic-status {
  font-size: 0.85rem;
  color: var(--text-light);
}

.question-navigation-row {
  display: flex;
  justify-content: space-between;
}

.btn-nav-prev,
.btn-nav-next {
  background-color: #3182ce;
  border: 1px solid #2b6cb0;
  color: #ffffff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-nav-prev:hover,
.btn-nav-next:hover {
  background-color: #2b6cb0;
  border-color: #2b6cb0;
}

.btn-submit-exam {
  background-color: var(--btn-practice);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 30px;
  border-radius: 10px;
}

.btn-submit-exam:hover {
  background-color: var(--accent-green-hover);
}



/* ==========================================================================
   DIAGNOSTIC GRADING RESULTS SCREEN
   ========================================================================== */
.results-workspace-box {
  max-width: 750px;
}

.results-score-panel {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background-color: #f7fafc;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 25px;
  gap: 20px;
  flex-wrap: wrap;
}

.circular-score-tracker {
  position: relative;
  width: 120px;
  height: 120px;
}

.score-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 8;
}

.score-bar {
  fill: none;
  stroke: var(--menu-hover);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.score-percent-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--text-dark);
}

.score-details-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-grow: 1;
  max-width: 350px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

.stat-val {
  font-weight: 700;
  font-size: 1.1rem;
}

.text-success { color: #38a169; }

.results-breakdown-details h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.answers-review-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 10px;
}

.graded-item-card {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  padding: 20px;
}

.graded-header-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.correct-badge { background-color: #c6f6d5; color: #22543d; }
.wrong-badge { background-color: #fed7d7; color: #742a2a; }
.manual-badge { background-color: #ebf8ff; color: #2b6cb0; }

.graded-question {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.graded-user-ans,
.graded-correct-ans {
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.graded-user-ans span,
.graded-correct-ans span {
  font-weight: 700;
}

.graded-explanation-box {
  background-color: #f7fafc;
  padding: 10px 15px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-light);
  border-left: 3px solid #cbd5e0;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 4px 6px -1px rgba(92, 163, 107, 0.2); }
  50% { transform: scale(1.03); box-shadow: 0 4px 12px 2px rgba(92, 163, 107, 0.35); }
  100% { transform: scale(1); box-shadow: 0 4px 6px -1px rgba(92, 163, 107, 0.2); }
}

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

@keyframes wave {
  0%, 100% { height: 10%; }
  50% { height: 100%; }
}

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

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

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   RESPONSIVE MEDIA BREAKPOINTS
   ========================================================================== */
@media (max-width: 1280px) {
  .logo-area {
    margin-right: 15px;
  }
  .logo-main {
    font-size: 0.75rem;
  }
  .logo-sub {
    font-size: 0.55rem;
  }
  .desktop-nav {
    gap: 6px;
  }
  .nav-link {
    font-size: 0.9rem;
    padding: 6px 8px;
  }
  .lang-selected-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
  .btn-login {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 1120px) {
  .nav-link {
    font-size: 0.82rem;
    padding: 4px 6px;
  }
  .desktop-nav {
    gap: 4px;
  }
  .logo-area img {
    height: 36px !important;
  }
  .logo-main {
    font-size: 0.7rem;
  }
  .logo-sub {
    font-size: 0.55rem;
  }
}

@media (max-width: 1024px) {
  .main-layoutcontainer {
    grid-template-columns: 1fr;
  }
  .grid-layout {
    grid-template-columns: 1fr;
  }
  .footer-top-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  body {
    padding-top: 70px;
  }
  .site-header {
    height: 70px;
  }
  .desktop-nav {
    display: none;
  }
  .user-auth-status {
    display: none; /* Relocate logic in mobile navigation dropdown */
  }
  .hamburger-btn {
    display: flex;
  }
  .hero-author-section {
    padding: 20px 0;
  }
  .author-bio-card {
    padding: 25px;
  }
  .slider-container {
    min-height: 280px;
  }
  .upgrade-banner-card {
    padding: 25px;
  }
  .upgrade-info-header {
    flex-direction: column;
    align-items: start;
    gap: 5px;
  }
  .cards-scroll-container {
    gap: 15px;
    padding-bottom: 10px;
  }
  .exam-card {
    min-width: 250px;
    max-width: 250px;
  }
  .payment-grid {
    grid-template-columns: 1fr;
  }
  .qr-code-box {
    max-width: 180px;
    margin: 0 auto;
  }
  .practice-grid-layout {
    grid-template-columns: 1fr;
  }
  .bubble-grid {
    justify-content: center;
  }
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-bottom-row {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .author-bio-card h1 {
    font-size: 1.6rem;
  }
  .upgrade-banner-card h2 {
    font-size: 1.3rem;
  }
  .price-tag {
    font-size: 0.95rem;
    padding: 6px 12px;
  }
  .footer-links-grid {
    grid-template-columns: 1fr;
  }
  .modal-box {
    padding: 25px 20px;
  }
}

/* Zalo QR Code Box styling to match user mockup */
.zalo-qr-container {
  border: 2px dashed #0068ff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f0f8ff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.zalo-qr-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0068ff;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-align: center;
}

.zalo-qr-img {
  width: 100%;
  max-width: 150px;
  height: auto;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background-color: #ffffff;
  padding: 8px;
}

.zalo-contact-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #0068ff;
  font-size: 0.95rem;
}

.zalo-icon-svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.payment-warning-card-zalo {
  background-color: #fffaf0;
  border: 1px solid #feebc8;
  border-left: 4px solid #dd6b20;
  color: #7b341e;
  padding: 15px;
  font-size: 0.85rem;
  border-radius: 8px;
  margin-bottom: 25px;
  line-height: 1.5;
}

/* Group Practice Actions Section */
.group-practice-actions {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.btn-group-practice {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
  font-family: var(--title-font), sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  border: none;
  cursor: pointer;
}

.btn-group-practice:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  filter: brightness(1.05);
}

.btn-group-practice:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Interview list view styles */
#practice-interview-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: 70vh;
  padding-right: 5px;
}

.interview-question-card {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interview-question-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.interview-question-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.interview-question-number {
  background-color: var(--menu-hover, #5ca36b);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 6px;
}

.interview-question-points {
  background-color: #fee2e2;
  color: #ef4444;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
}

.interview-question-title {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark, #2d3748);
  margin-bottom: 12px;
  line-height: 1.5;
}

.interview-question-content {
  font-size: 1.05rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #4a5568;
  background-color: #f7fafc;
  border-left: 4px solid var(--menu-hover, #5ca36b);
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
}

/* Interview reference images styling */
.interview-images-container {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.interview-images-container-inline {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.interview-images-header {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--menu-bg, #1b4332);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.interview-images-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.interview-image-box {
  flex: 1 1 200px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interview-image-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.image-label {
  font-weight: 700;
  color: var(--text-dark, #2d3748);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.interview-image-wrapper {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.interview-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
  cursor: zoom-in;
}

/* Force square 1:1 layout inside multi-column boxes */
.interview-image-box .interview-image-wrapper {
  position: relative;
  height: 0;
  padding-top: 100%;
}

.interview-image-box .interview-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  cursor: zoom-in;
}

.interview-image-wrapper:hover img {
  transform: scale(1.05);
}

/* Interview question line stylings */
.interview-passage-box-custom {
  background-color: transparent;
  padding: 8px 0;
  margin-top: 10px;
}

.interview-kr-line {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark, #2d3748);
  margin-top: 16px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.interview-vi-line {
  background-color: #fff8e7; /* Warm cream/beige background color */
  border-left: 3px solid var(--btn-unlock, #e07a5f); /* Warm accent left bar */
  color: #5c5545; /* Dark brown readable text */
  padding: 10px 16px;
  margin: 6px 0 14px 0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-style: italic; /* Italicized text */
  line-height: 1.5;
  display: block;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.interview-vi-line-label {
  font-weight: 700;
  color: var(--btn-unlock, #e07a5f);
  font-size: 0.95rem;
  margin-top: 14px;
  margin-bottom: 4px;
}

.question-instruction-translation {
  font-size: 1.05rem;
  color: #4a5568;
  margin-top: 4px;
  margin-bottom: 12px;
  font-weight: 500;
  line-height: 1.4;
}

/* Compact layout overrides specifically for speaking/interview mode */
.question-display-card.interview-mode {
  padding: 16px 20px !important;
}

.interview-mode .question-number-header {
  margin-bottom: 4px !important;
}

.interview-mode .question-content-text {
  margin-bottom: 2px !important;
  white-space: normal !important;
}

.interview-mode .question-instruction {
  margin-bottom: 4px !important;
  font-size: 1.05rem !important;
}

.interview-mode .question-instruction-translation {
  background-color: #fff8e7 !important;
  border-left: 3px solid var(--btn-unlock, #e07a5f) !important;
  color: #5c5545 !important;
  padding: 6px 12px !important;
  margin: 4px 0 8px 0 !important;
  border-radius: 6px !important;
  font-size: 1.05rem !important;
  font-style: italic !important;
  line-height: 1.4 !important;
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.interview-mode .interview-images-container-inline {
  margin: 6px 0 !important;
  padding: 8px 12px !important;
}

.interview-mode .interview-images-row {
  gap: 40px !important;
}

.interview-mode .interview-image-box {
  padding: 6px !important;
  flex: 1 1 180px;
}



.interview-mode .interview-kr-line {
  margin-top: 6px !important;
  margin-bottom: 4px !important;
  font-size: 1.05rem !important;
  line-height: 1.3 !important;
}

.interview-mode .interview-vi-line {
  margin: 4px 0 8px 0 !important;
  padding: 6px 12px !important;
  font-size: 1.05rem !important;
  line-height: 1.4 !important;
  width: fit-content !important;
  max-width: 100% !important;
  display: block !important;
}

.interview-mode .interview-vi-line-label {
  margin-top: 8px !important;
  margin-bottom: 4px !important;
  font-size: 1.05rem !important;
}

/* ==========================================
   TEXT-TO-SPEECH (TTS) CONTROLS & HIGHLIGHT
   ========================================== */
.tts-wrapper-right {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #ef4444; /* Clean premium red border */
  border-radius: 28px;
  padding: 4px 6px 4px 16px; /* Soft padding enclosing label and buttons */
  background-color: #fef2f2; /* Light pinkish-red background for premium styling */
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.06);
}

.tts-label {
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 700;
  color: #dc2626; /* Crimson red text */
  white-space: nowrap;
}

.tts-controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid #fee2e2;
  user-select: none;
}

.tts-ctrl-btn {
  background: none;
  border: none;
  color: #475569;
  font-size: 1.0rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tts-ctrl-btn:hover {
  background-color: #e2e8f0;
  color: var(--menu-hover, #5ca36b);
  transform: scale(1.05);
}

.tts-ctrl-btn:active {
  transform: scale(0.95);
}

.tts-ctrl-btn.tts-btn-play {
  background-color: var(--menu-hover, #5ca36b);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(92, 163, 107, 0.2);
}

.tts-ctrl-btn.tts-btn-play:hover {
  background-color: var(--accent-green-hover, #4a8c57);
  color: #ffffff;
}

/* Highlight style when reading a sentence */
.tts-highlight {
  background-color: rgba(92, 163, 107, 0.20) !important; /* Darker green highlight background */
  border-left: 3px solid var(--menu-hover, #5ca36b) !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  border-radius: 4px;
  transition: all 0.3s ease;
  width: fit-content !important; /* Limit width of background to text content */
  max-width: 100%;
}

/* Footer Business License Styles */
#footer-business-license-box {
  color: var(--footer-text);
  font-size: 0.75rem;
  line-height: 1.6;
  max-width: 700px;
  text-align: left;
}
.footer-lic-row {
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.footer-lic-row span {
  display: inline-block;
}
.lic-divider {
  color: rgba(255, 255, 255, 0.15);
  font-weight: 300;
}
.footer-lic-disclaimer {
  margin-top: 10px;
  opacity: 0.7;
  font-size: 0.7rem;
}

/* Custom speaking box border style matching original exams */
.speaking-box {
  border: 1.5px solid #2d3748;
  border-radius: 6px;
  padding: 18px 24px;
  margin: 15px 0;
  background-color: #f8fafc;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.speaking-box .interview-kr-line {
  margin-top: 8px !important;
  margin-bottom: 4px !important;
}

.speaking-box .interview-vi-line {
  margin-top: 4px !important;
  margin-bottom: 12px !important;
}

/* Avoid double borders when speaking-box is nested inside question-passage-box */
.question-passage-box .speaking-box {
  border: none !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Exam switch buttons in practice modal */
.exam-switch-container {
  position: absolute;
  top: 22px;
  right: 60px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.btn-switch-exam {
  font-family: var(--body-font);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #ef4444;
  background-color: #ffffff;
  color: #ef4444;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.btn-switch-exam:hover:not(:disabled) {
  background-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-switch-exam:active:not(:disabled) {
  transform: translateY(0);
}

.btn-switch-exam:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #cbd5e0;
  color: #a0aec0;
}

@media (max-width: 600px) {
  .exam-switch-container {
    position: static;
    margin-top: 10px;
    margin-bottom: 5px;
    justify-content: flex-start;
  }
}

.btn-card-practice-writing {
  background-color: #f16427;
  color: #ffffff;
}

.btn-card-practice-writing:hover {
  background-color: #d54e17;
}

.btn-show-writing-answer {
  background-color: #48bb78;
  color: white;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-show-writing-answer:hover {
  background-color: #38a169;
}

/* Style italicized note texts in blue */
.question-display-card i,
.question-passage-box i,
.question-content-text i {
  color: #1d4ed8;
}

/* Practice Top Notice Bar */
.practice-top-notice-bar {
  position: absolute;
  top: 3px; /* Spacing from top border of modal */
  left: 50%;
  transform: translateX(-50%);
  color: #e53e3e; /* Red color */
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   FREE TRIAL STYLES
   ========================================================================== */
.trial-buttons-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.trial-or-label {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.trial-buttons-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-trial-action {
  font-family: var(--body-font);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 10px;
  color: #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-trial-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  filter: brightness(1.1);
}

.btn-trial-choice {
  background-color: #276749; /* Deep Green matching KIIP 2 style */
}

.btn-trial-speaking {
  background-color: #2b6cb0; /* Vibrant Blue */
}

.btn-trial-writing {
  background-color: #dd6b20; /* Vibrant Orange */
}

/* Trial Promo Modal specific styles */
.trial-promo-box {
  animation: slideUp 0.3s ease;
}

.promo-features-list li {
  font-size: 0.98rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.promo-features-list li strong {
  color: #38bdf8;
}

.btn-promo-unlock {
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-promo-unlock:hover {
  transform: scale(1.02);
  background-color: #fca503;
}

.btn-promo-close {
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-promo-close:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

@media (max-width: 1024px) {
  .upgrade-action-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .btn-primary-upgrade {
    width: 100%;
    text-align: center;
  }
  .trial-buttons-wrapper {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .trial-or-label {
    text-align: center;
    margin: 5px 0;
  }
  .trial-buttons-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-trial-action {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   SOCIAL PROOF STUDENT COUNTER & SIDEBAR STATS
   ========================================================================== */
.student-counter-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-img-stack {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ffffff; /* Match bright card background */
  margin-left: -10px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.avatar-img-stack:first-child {
  margin-left: 0;
}

.avatar-img-stack:hover {
  transform: translateY(-4px) scale(1.1);
  z-index: 10;
  border-color: #ea580c;
}

/* Custom filters to make default avatars look distinct */
.avatar-img-stack:nth-child(2) { filter: hue-rotate(90deg) brightness(0.9); }
.avatar-img-stack:nth-child(3) { filter: hue-rotate(180deg) saturate(1.2); }
.avatar-img-stack:nth-child(4) { filter: hue-rotate(270deg) contrast(1.1); }
.avatar-img-stack:nth-child(5) { filter: grayscale(50%) sepia(30%); }

.student-counter-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #881337;
}

.student-counter-text strong {
  color: #e11d48;
  font-weight: 800;
  font-size: 1.1rem;
}

/* Sidebar Stats Card */
.stats-card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
}

.stats-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid #334155;
  padding-bottom: 10px;
}

.stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: #cbd5e1;
}

.stat-icon {
  font-size: 1.1rem;
}

.stat-label {
  flex-grow: 1;
}

.stat-value {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #f8fafc;
}

.stat-value.text-success {
  color: #48bb78;
}

/* ==========================================================================
   MULTI-LANGUAGE CUSTOM SELECTOR & GOOGLE TRANSLATE OVERRIDES
   ========================================================================== */
body {
  top: 0 !important;
}
.goog-te-banner-frame,
.goog-te-banner,
.goog-te-menu-frame,
.skiptranslate,
#goog-gt-tt {
  display: none !important;
}
.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.lang-selector-container {
  position: relative;
  font-family: var(--body-font);
}

.lang-selected-btn {
  background-color: #fcfbf7; /* Off-white cream */
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  max-width: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.lang-selected-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.lang-selected-btn .arrow {
  font-size: 0.7rem;
  color: #64748b;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

.lang-selector-container.open .lang-selected-btn .arrow {
  transform: rotate(0deg);
}

.lang-dropdown-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 6px 0;
  animation: slideUp 0.2s ease;
}

.lang-option {
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.lang-option:hover {
  background-color: #f8fafc;
  color: #1e293b;
}

.lang-option.active {
  background-color: #fcfbf7;
  color: #9c6c30; /* Custom brand brown accent */
  font-weight: 700;
}

/* Print protection: Hide entire page when trying to print or save as PDF */
@media print {
  body {
    display: none !important;
  }
}

/* Hide key sections by default if JS is not active */
body:not(.js-enabled) .site-header,
body:not(.js-enabled) .hero-author-section,
body:not(.js-enabled) .upgrade-banner-section,
body:not(.js-enabled) .main-layoutcontainer,
body:not(.js-enabled) .watermark-overlay {
  display: none !important;
}

/* CSS Animation Watchdog: Triggers JavaScript disabled warning if JS heartbeat stops */
@keyframes jsDeadWarning {
  0% {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    z-index: -1;
  }
  99% {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    z-index: -1;
  }
  100% {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    z-index: 999999;
  }
}

#noscript-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #1e293b;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Be Vietnam Pro', 'Inter', sans-serif;
  text-align: center;
  padding: 20px;
  animation: jsDeadWarning 0.3s forwards;
}

/* ==========================================================================
   FENG SHUI STYLING - NAM BÍNH DẦN 1986 (MỆNH HỎA / CUNG KHÔN THỔ)
   Colors: Burgundy / Crimson Red (Hỏa), Amber Gold (Thổ), Emerald (Mộc sinh Hỏa)
   ========================================================================== */
.knowledge-hub-container-fengshui {
  background: linear-gradient(135deg, rgba(65, 18, 28, 0.92) 0%, rgba(35, 10, 20, 0.96) 50%, rgba(55, 25, 18, 0.92) 100%) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  border-radius: 16px;
  padding: 25px 30px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 35px rgba(185, 28, 28, 0.22), 0 0 20px rgba(245, 158, 11, 0.12), inset 0 1px 1px rgba(254, 202, 202, 0.15) !important;
  position: relative;
  overflow: hidden;
}

.knowledge-hub-container-fengshui::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.18) 0%, rgba(245, 158, 11, 0.08) 50%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.article-card-seo {
  background: rgba(45, 14, 22, 0.7) !important;
  border: 1px solid rgba(220, 38, 38, 0.35) !important;
  border-radius: 14px !important;
  padding: 22px !important;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  z-index: 1;
}

.article-card-seo:hover {
  transform: translateY(-5px) scale(1.01) !important;
  background: rgba(65, 20, 30, 0.88) !important;
  border-color: rgba(245, 158, 11, 0.65) !important;
  box-shadow: 0 14px 32px rgba(220, 38, 38, 0.32), 0 0 20px rgba(245, 158, 11, 0.2) !important;
}

.article-card-seo h3 {
  transition: color 0.3s ease;
}

.article-card-seo:hover h3 {
  color: #fff1f2 !important;
}

/* ==========================================================================
   FLASH SALE BANNER DESIGN SYSTEM
   ========================================================================== */
.flash-sale-section {
  margin: 25px 0;
  display: block;
}

.flash-sale-card {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 40%, #7f1d1d 100%);
  border: 1px solid rgba(254, 202, 202, 0.25);
  border-radius: 16px;
  padding: 24px 28px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(185, 28, 28, 0.35), 0 0 15px rgba(239, 68, 68, 0.2);
  position: relative;
  overflow: hidden;
}

.flash-sale-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.2) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.flash-sale-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.flash-sale-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flash-badge-pulse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #facc15;
  color: #854d0e;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
  animation: pulse 1.8s infinite;
}

.flash-ongoing-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffedd5;
  color: #c2410c;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: fit-content;
}

.flash-sale-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.flash-sale-timer-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timer-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fef08a;
  white-space: nowrap;
}

.timer-boxes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-box {
  background: #18181b;
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 48px;
  text-anchor: middle;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.timer-box span {
  font-family: 'Courier New', Courier, monospace, sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #facc15;
  line-height: 1;
}

.timer-box small {
  font-size: 0.62rem;
  color: #a1a1aa;
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 600;
}

.timer-colon {
  font-size: 1.2rem;
  font-weight: 900;
  color: #facc15;
  animation: blinkColon 1s infinite;
}

@keyframes blinkColon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.flash-sale-offers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 16px;
  align-items: center;
}

.fs-offer-item {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.fs-offer-item:hover {
  transform: translateY(-2px);
  border-color: rgba(250, 204, 21, 0.5);
}

.fs-offer-item.highlight-offer {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.15) 0%, rgba(220, 38, 38, 0.3) 100%);
  border: 1.5px solid #facc15;
}

.offer-badge-ribbon {
  position: absolute;
  top: -10px;
  right: 12px;
  background: #dc2626;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.offer-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.offer-details {
  display: flex;
  flex-direction: column;
}

.offer-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fef08a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.offer-price-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 2px 0;
}

.offer-price {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
}

.offer-unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fecdd3;
}

.offer-desc {
  font-size: 0.75rem;
  color: #f3f4f6;
  margin: 0;
  opacity: 0.9;
}

.fs-cta-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.fs-cta-btn {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fs-cta-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.5);
}

.fs-cta-btn:active {
  transform: translateY(0);
}

.fs-sub-note {
  font-size: 0.72rem;
  color: #fef08a;
  opacity: 0.95;
  line-height: 1.3;
}

@media (max-width: 992px) {
  .flash-sale-offers-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .flash-sale-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   STUDENT TESTIMONIALS SECTION (CẢM NHẬN HỌC VIÊN TẠI HÀN QUỐC - LIGHT THEME)
   ========================================================================== */
.student-testimonials-section {
  padding: 60px 0;
  background: #F8FAFC;
  position: relative;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
}

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

.testimonials-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.testimonials-title {
  font-size: 2rem;
  font-weight: 900;
  color: #0F172A;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.testimonials-subtitle {
  color: #64748B;
  font-size: 0.98rem;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
  font-weight: 500;
}

.testimonials-stats-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin: 28px auto 40px auto;
  padding: 18px 32px;
  background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 20px;
  max-width: 860px;
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.testimonials-stats-bar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-size: 1.55rem;
  font-weight: 900;
  color: #fde047;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-text {
  font-size: 0.88rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.testimonial-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: #CBD5E1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 4.5rem;
  font-family: Georgia, serif;
  color: rgba(15, 23, 42, 0.04);
  line-height: 1;
  pointer-events: none;
}

.student-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.student-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #10B981;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.student-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.student-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
}

.student-location {
  font-size: 0.78rem;
  color: #64748B;
  font-weight: 600;
}

.student-achievement-tag {
  display: inline-block;
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  width: fit-content;
}

.rating-stars {
  color: #F59E0B;
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  gap: 3px;
}

.student-quote {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.65;
  font-style: normal;
  font-weight: 500;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: #059669;
  font-weight: 700;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}







