/* ==========================================================================
   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: 1440px;
  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;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
}

.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: 0.96rem;
  font-weight: 700;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--menu-text);
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.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 / UNLOCK PRO BANNER & PRICING CARD
   ========================================================================== */
.upgrade-banner-section {
  margin-bottom: 40px;
}

.upgrade-banner-card {
  background: linear-gradient(135deg, #fff7f7 0%, #fff1f2 45%, #ffe4e6 100%);
  color: #881337;
  border-radius: 24px;
  padding: 38px 42px;
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 20px 45px -12px rgba(225, 29, 72, 0.15), 0 6px 18px -4px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: 1.28fr 0.92fr;
  gap: 36px;
  align-items: center;
}

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

/* Left Column: Content & Academic Proof */
.upgrade-content-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.upgrade-header-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-header-group h2 {
  font-family: var(--title-font);
  font-size: 1.85rem;
  font-weight: 900;
  color: #881337;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin: 0;
}

.student-counter-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 12px 4px 6px;
  border-radius: 30px;
  width: fit-content;
  border: 1px solid rgba(251, 113, 133, 0.25);
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.04);
}

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

.avatar-img-stack {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  margin-left: -8px;
  object-fit: cover;
}

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

.student-counter-text {
  font-size: 0.85rem;
  color: #9f1239;
  font-weight: 600;
}

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

.upgrade-value-desc-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upgrade-main-headline {
  font-family: var(--body-font);
  font-size: 1.2rem;
  font-weight: 800;
  color: #9f1239;
  line-height: 1.35;
  margin: 0;
}

.upgrade-main-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.55;
  margin: 0;
}

/* Subtle, Trust-building Guarantee Pill */
.upgrade-guarantee-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid #86efac;
  border-left: 5px solid #16a34a;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.08);
}

.guarantee-shield-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.guarantee-desc-text {
  font-size: 0.86rem;
  color: #14532d;
  line-height: 1.45;
}

.guarantee-desc-text strong {
  color: #15803d;
}

/* Secondary Action Row: Activation & Free Trials */
.upgrade-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-activate-code-secondary {
  background: #ffffff;
  color: #881337;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid #fda4af;
  font-size: 0.88rem;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-activate-code-secondary:hover {
  background: #fff1f2;
  border-color: #f43f5e;
  transform: translateY(-1px);
}

/* Legacy & Utility Compatibility Classes */
.price-tag {
  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-size: 1.2rem;
  font-weight: 700;
  color: #881337;
}
.price-tag .price-duration-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #9f1239;
}
.upgrade-subtitle {
  color: #881337;
  font-size: 1.05rem;
  font-weight: 600;
}
.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;
}
.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;
}

/* ==========================================================================
   RIGHT COLUMN: DEDICATED HIGH-CONVERSION PRICING CARD
   ========================================================================== */
.upgrade-pricing-col {
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-width: 0;
}

.upgrade-pricing-card {
  background: #ffffff;
  border-radius: 20px;
  border: 2px solid #fda4af;
  box-shadow: 0 16px 36px -8px rgba(225, 29, 72, 0.2), 0 4px 12px rgba(0, 0, 0, 0.03);
  padding: 24px 26px;
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.upgrade-pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px -10px rgba(225, 29, 72, 0.28), 0 6px 16px rgba(0, 0, 0, 0.04);
}

.pricing-card-badge {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
  box-shadow: 0 3px 8px rgba(225, 29, 72, 0.3);
}

.pricing-card-original-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2px;
}

.price-strikethrough {
  font-size: 1.15rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 600;
}

.price-savings-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #fecaca;
  display: inline-block;
}

.pricing-card-main-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  line-height: 1;
  margin: 6px 0 6px 0;
}

.pricing-card-main-price .price-amount {
  font-family: var(--title-font);
  font-size: 2.65rem;
  font-weight: 900;
  color: #e11d48;
  letter-spacing: -0.5px;
  line-height: 1;
}

.pricing-card-main-price .price-unit {
  font-size: 1.4rem;
  font-weight: 800;
  color: #9f1239;
  line-height: 1;
}

.pricing-card-main-price .price-period {
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
}

.pricing-card-monthly-rate {
  font-size: 0.86rem;
  color: #0369a1;
  font-weight: 600;
  background: #e0f2fe;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid #bae6fd;
}

.pricing-card-monthly-rate strong {
  color: #0284c7;
  font-weight: 800;
}

/* Main CTA Button */
.btn-cta-unlock-pro {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.btn-cta-unlock-pro:hover {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.5);
}

.btn-cta-unlock-pro:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.btn-cta-unlock-pro .cta-arrow {
  transition: transform 0.2s ease;
}

.btn-cta-unlock-pro:hover .cta-arrow {
  transform: translateX(4px);
}

/* Checklist of 3 Core Benefits */
.pricing-features-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-size: 0.84rem;
  color: #334155;
  border-top: 1px dashed #fecdd3;
  padding-top: 14px;
}

.pricing-features-list .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.pricing-features-list .feature-check {
  font-size: 0.9rem;
  line-height: 1.2;
  flex-shrink: 0;
}

/* ==========================================================================
   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: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-card-practice-choice:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
}

.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;
}

.btn-card-practice-combo {
  background: linear-gradient(135deg, #0e7490, #0369a1);
  color: #ffffff;
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: 0 4px 12px rgba(3, 105, 161, 0.25);
  font-weight: 700;
}

.btn-card-practice-combo:hover {
  background: linear-gradient(135deg, #155e75, #075985);
  box-shadow: 0 6px 18px rgba(3, 105, 161, 0.38);
  filter: brightness(1.08);
}

/* 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;
  z-index: 10;
  cursor: pointer;
  border: none;
  outline: none;
}

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

/* 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: 760px;
}

.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 (Desktop: 2 columns, Warning & Action button span full width) */
.payment-step-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  grid-template-areas:
    "channels bank"
    "warning warning"
    "action action";
  gap: 20px;
  margin-bottom: 20px;
}

.payment-channels-container {
  grid-area: channels;
}

.bank-param-list {
  grid-area: bank;
}

.payment-warning-card-zalo {
  grid-area: warning;
  margin-bottom: 0 !important;
}

.payment-action-buttons {
  grid-area: action;
}

.payment-grid {
  display: grid;
  grid-template-columns: 340px 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: 96vw;
  max-width: 1120px;
  max-height: 90vh;
  padding: 24px 26px 18px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

#practice-exam-title-name {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 0;
  color: var(--text-dark);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.practice-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.practice-header-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  vertical-align: middle;
}

.practice-header-logo:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  padding-right: 32px;
  min-width: 0;
}

.practice-meta-stats {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px 8px;
  flex-shrink: 0;
}

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

.score-live-block {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  background-color: #f0fff4;
  color: #276749;
  border: 1px solid #c6f6d5;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.progress-bar-container {
  width: 60px;
  height: 6px;
  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 {
    grid-template-columns: 1fr;
    padding: 26px 20px;
    gap: 24px;
  }
  .upgrade-pricing-card {
    max-width: 100%;
  }
  .cards-scroll-container {
    gap: 15px;
    padding-bottom: 10px;
  }
  .exam-card {
    min-width: 250px;
    max-width: 250px;
  }
  .payment-step-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 15px;
  }
  .bank-param-list {
    order: 1;
  }
  .payment-warning-card-zalo {
    order: 2;
    margin-bottom: 0 !important;
  }
  .payment-action-buttons {
    order: 3;
  }
  .payment-channels-container {
    order: 4;
    margin-top: 6px;
  }
  .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-header-group h2 {
    font-size: 1.4rem;
  }
  .upgrade-main-headline {
    font-size: 1.08rem;
  }
  .pricing-card-main-price .price-amount {
    font-size: 2.2rem;
  }
  .btn-cta-unlock-pro {
    font-size: 0.98rem;
    padding: 12px 16px;
  }
  .footer-links-grid {
    grid-template-columns: 1fr;
  }
  .modal-box {
    padding: 25px 20px;
  }
}

/* Multi-channel Confirmation Panel styling */
.payment-channels-container {
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #f8fafc;
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

.channels-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.channels-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1d4ed8;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.channels-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.channels-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
  line-height: 1.3;
}

.channel-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.channel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.08);
}

.channel-card-kakao {
  border-left: 4px solid #FEE500;
}

.channel-card-zalo {
  border-left: 4px solid #0068FF;
}

.channel-card-messenger {
  border-left: 4px solid #0084FF;
}

.channel-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.channel-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.kakao-icon-bg {
  background-color: #FEE500;
}

.zalo-icon-bg {
  background-color: #0068FF;
}

.messenger-icon-bg {
  background: linear-gradient(135deg, #0084FF, #A824FB);
}

.channel-meta {
  flex: 1;
  min-width: 0;
}

.channel-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.channel-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}

.channel-tag {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.tag-kr {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.tag-vn {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.tag-intl {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.channel-account {
  font-size: 0.78rem;
  color: #475569;
  margin-top: 2px;
}

.channel-account strong {
  color: #0f172a;
}

.channel-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #f1f5f9;
}

.btn-channel {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-kakao {
  background: #FEE500;
  color: #191919;
  border: 1px solid #ebd300;
}

.btn-kakao:hover {
  background: #fedd00;
  box-shadow: 0 2px 6px rgba(254, 229, 0, 0.4);
}

.btn-zalo {
  background: #0068FF;
  color: #ffffff;
  border: 1px solid #005de6;
}

.btn-zalo:hover {
  background: #0056d6;
  box-shadow: 0 2px 6px rgba(0, 104, 255, 0.35);
}

.btn-messenger {
  background: linear-gradient(135deg, #0084FF, #8b5cf6);
  color: #ffffff;
  border: none;
}

.btn-messenger:hover {
  filter: brightness(1.08);
  box-shadow: 0 2px 6px rgba(0, 132, 255, 0.35);
}

.btn-channel-copy {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-channel-copy:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.channels-footer-tip {
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
  margin-top: 2px;
  line-height: 1.4;
  padding: 6px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.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: static;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  z-index: 1;
}

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

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

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

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

.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: 6px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  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;
}

.flag-icon-badge {
  width: 24px;
  height: 17px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

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

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

/* Image 3 Popup Card */
.lang-dropdown-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  width: 350px;
  max-width: min(360px, calc(100vw - 20px));
  box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.05);
  z-index: 10000;
  padding: 16px 16px 14px 16px;
  animation: langDropdownFade 0.2s ease-out;
  max-height: min(480px, calc(85vh - 70px));
  overflow-y: auto;
  box-sizing: border-box;
}

.lang-dropdown-list::-webkit-scrollbar {
  width: 5px;
}

.lang-dropdown-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

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

.lang-dropdown-header {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  padding-left: 4px;
  letter-spacing: -0.01em;
}

.lang-grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
}

.lang-grid-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lang-option {
  padding: 8px 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  transition: all 0.15s ease;
  user-select: none;
}

.lang-option:hover {
  background-color: #f8fafc;
  color: #0f172a;
}

.lang-option.active {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

.lang-option .lang-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .lang-dropdown-list {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: calc(100vw - 24px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  }
}

/* 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;
}

/* Noscript overlay: Hidden by default, only activated by <noscript> if JS is truly disabled */
#noscript-overlay {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #1e293b;
  color: #f8fafc;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Be Vietnam Pro', 'Inter', sans-serif;
  text-align: center;
  padding: 20px;
}

/* ==========================================================================
   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;
}

/* ==========================================================================
   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;
}

/* ==========================================================================
   HEADER RESPONSIVE OPTIMIZATION (1-ROW LAYOUT FOR LAPTOPS & TABLETS)
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1440px) {
  /* Expand the header width to use the full screen space */
  .header-container {
    max-width: 98% !important;
    padding: 0 10px !important;
  }
  
  /* Shrink the logo area slightly and reduce margin */
  .logo-area {
    margin-right: 12px !important;
    gap: 6px !important;
  }
  .logo-area img {
    height: 34px !important;
  }
  .logo-main {
    font-size: 0.72rem !important;
  }
  .logo-sub {
    font-size: 0.52rem !important;
  }

  /* Center the menu and adjust spacing */
  .desktop-nav {
    justify-content: center !important;
    gap: 6px !important;
  }

  /* Make nav links smaller to fit in a single line */
  .nav-link {
    font-size: 0.84rem !important;
    padding: 6px 6px !important;
  }

  /* Shrink language selector and login button */
  .lang-selected-btn {
    padding: 6px 10px !important;
    font-size: 0.82rem !important;
    gap: 4px !important;
  }
  .btn-login {
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
  }
}

/* Extra squeeze for smaller laptop viewports */
@media (min-width: 1025px) and (max-width: 1200px) {
  .header-container {
    max-width: 100% !important;
    padding: 0 8px !important;
  }
  .logo-area {
    margin-right: 8px !important;
  }
  .logo-area img {
    height: 30px !important;
  }
  .logo-text-wrapper {
    display: none !important; /* Hide logo text wrapper to save massive space on small tablets */
  }
  .desktop-nav {
    gap: 4px !important;
  }
  .nav-link {
    font-size: 0.78rem !important;
    padding: 5px 4px !important;
  }
  .lang-selected-btn {
    padding: 5px 8px !important;
    font-size: 0.78rem !important;
  }
  .btn-login {
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
  }
}

/* ==========================================================================
   PRACTICE MODAL RESPONSIVE OPTIMIZATION (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 768px) {
  .practice-workspace-box {
    width: 98vw;
    max-width: 98vw;
    max-height: 94vh;
    padding: 26px 12px 14px 12px;
    gap: 10px;
  }

  .practice-top-notice-bar {
    font-size: 0.72rem;
    top: 4px;
  }

  .practice-workspace-box .modal-close-btn {
    top: 6px;
    right: 8px;
    font-size: 1.6rem;
    padding: 4px 8px;
    line-height: 1;
    z-index: 20;
  }

  .practice-header {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding-right: 36px;
    padding-bottom: 6px;
    flex: 0 0 auto;
  }

  .practice-title-row {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto !important;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
  }

  .practice-header-logo {
    height: 22px;
    width: 22px;
    border-radius: 5px;
  }

  #practice-exam-title-name {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    margin: 0 !important;
    padding: 0 !important;
  }

  .practice-meta-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 8px;
    width: 100%;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
  }

  .time-countdown-block {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 6px;
  }

  .score-live-block {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 6px;
  }

  .progress-bar-container {
    width: 50px;
    height: 5px;
    flex-shrink: 0;
  }

  .question-display-card {
    padding: 14px 14px;
  }

  .question-content-text,
  .question-instruction {
    font-size: 1rem;
  }

  .options-group {
    gap: 10px;
  }

  .option-neo-btn {
    padding: 12px 14px;
    font-size: 0.92rem;
  }

  .question-navigation-row {
    gap: 6px;
  }

  .btn-nav-prev,
  .btn-nav-next {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .btn-submit-exam {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   SMART ANALYTICS & ADAPTIVE STUDY PLANNER STYLES
   ========================================================================== */
.btn-analytics-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(239, 68, 68, 0.18));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-family: var(--title-font), sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.btn-analytics-header:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(239, 68, 68, 0.3));
  border-color: #f59e0b;
  color: #fef08a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.analytics-workspace-box {
  width: 95vw;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b rgba(15, 23, 42, 0.5);
}

.analytics-pill-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.analytics-pill-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.25);
}

.analytics-pill-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  border-color: #f59e0b;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.analytics-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--title-font), sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.analytics-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.analytics-tab-btn.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Category Progress Bars */
.category-progress-item {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease;
}

.category-progress-item:hover {
  transform: translateX(3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.cat-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.cat-title-label {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-rate-badge {
  font-weight: 800;
  font-size: 0.82rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.cat-rate-good { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.cat-rate-medium { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.cat-rate-weak { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

.cat-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 6px;
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}

.cat-bar-fill.good { background: linear-gradient(90deg, #10b981, #34d399); }
.cat-bar-fill.medium { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cat-bar-fill.weak { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Weekly Day Plan Cards */
.day-plan-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.day-badge-col {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #818cf8;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.day-content-col {
  flex-grow: 1;
}

.day-task-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #f8fafc;
  margin-bottom: 4px;
}

.day-task-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 640px) {
  .btn-analytics-header {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .analytics-workspace-box {
    padding: 18px 14px;
  }
  .analytics-nav-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }
  .analytics-tab-btn {
    font-size: 0.82rem;
    padding: 6px 10px;
  }
  .analytics-action-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .analytics-action-footer button {
    width: 100%;
    justify-content: center;
  }
}











/* ==========================================================================
   LEVEL EMBEDDED PROGRESS DASHBOARD WIDGET (SOFT WARM ORANGE / PASTEL AMBER THEME)
   ========================================================================== */
.level-progress-dashboard-widget {
  background: linear-gradient(135deg, #fffaf5 0%, #fff2e6 50%, #ffe6cc 100%);
  border: 1.5px solid #fdba74;
  border-left: 6px solid #ea580c;
  border-radius: 16px;
  padding: 22px 24px;
  margin: 12px 0 22px 0;
  box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #431407;
  position: relative;
  overflow: hidden;
}

.level-progress-dashboard-widget::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.practice-workspace-box .modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  font-size: 1.35rem;
  color: #64748b;
  line-height: 1;
  z-index: 30;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
}

.practice-workspace-box .modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
#practice-exam-title-name {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 0;
  color: var(--text-dark);
  font-weight: 800;
  white-space: normal;
  word-break: break-word;
}

@media (min-width: 769px) {
  .practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    padding-right: 48px;
    min-width: 0;
  }

  .practice-title-row {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .practice-meta-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    flex-shrink: 0;
  }
}

.level-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(251, 146, 60, 0.25);
}

.level-widget-title-col {
  display: flex;
  align-items: center;
  gap: 14px;
}

.level-widget-badge-icon {
  font-size: 1.6rem;
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  border: 1.5px solid #f97316;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.2);
}

.level-growth-tag {
  font-weight: 800;
  font-size: 0.84rem;
  padding: 5px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.level-growth-tag.up { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.level-growth-tag.down { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.level-growth-tag.neutral { background: rgba(255, 255, 255, 0.8); color: #7c2d12; border: 1px solid #fed7aa; }

.level-widget-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.level-metric-box {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  border: 1.5px solid #fed7aa;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.05);
  transition: all 0.2s ease;
}
.level-metric-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.12);
  border-color: #f97316;
  background: #ffffff;
}

.level-metric-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #7c2d12;
  margin-bottom: 4px;
}

.level-metric-val {
  font-size: 1.25rem;
  font-weight: 800;
}

.level-metric-sub {
  font-size: 0.76rem;
  color: #9a3412;
  margin-top: 4px;
  font-weight: 600;
}

.level-widget-weakness-row {
  background: rgba(254, 226, 226, 0.75);
  backdrop-filter: blur(4px);
  border: 1.5px solid #fca5a5;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.level-weak-chip {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}
.level-weak-chip.danger { background: #fee2e2; color: #9f1239; border: 1px solid #fda4af; }
.level-weak-chip.warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

.level-widget-actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.btn-level-open-analytics {
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-level-open-analytics:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
}

.btn-level-weakpoint-drill {
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-level-weakpoint-drill:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

@media (max-width: 640px) {
  .level-progress-dashboard-widget {
    padding: 16px 14px;
  }
  .level-widget-actions-row button {
    width: 100%;
    justify-content: center;
  }
}


/* Real Chat Proof Card Styles */
.real-chat-proof-card {
  border: 2px solid #fdba74 !important;
  background: linear-gradient(145deg, #ffffff 0%, #fffbf5 100%) !important;
  box-shadow: 0 8px 25px -5px rgba(234, 88, 12, 0.15) !important;
}

.real-proof-screenshots-box {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #fed7aa;
  background: #f8fafc;
  cursor: pointer;
  margin: 12px 0 10px 0;
  transition: all 0.2s ease;
}

.real-proof-screenshots-box:hover {
  transform: translateY(-2px);
  border-color: #f97316;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.18);
}

.real-proof-img-scroll {
  max-height: 180px;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.real-proof-img-scroll img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.real-proof-zoom-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.65) 60%, transparent);
  color: #fef08a;
  font-weight: 700;
  font-size: 0.78rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s ease;
}

.real-proof-screenshots-box:hover .real-proof-zoom-overlay {
  background: linear-gradient(to top, rgba(234, 88, 12, 0.95), rgba(234, 88, 12, 0.75) 60%, transparent);
  color: #ffffff;
}


/* Enhanced Header & Navbar Fluid Responsiveness across all screen sizes */
@media (min-width: 1441px) {
  .desktop-nav {
    gap: 8px;
  }
  .nav-link {
    font-size: 1rem;
    padding: 7px 12px;
  }
}

@media (max-width: 1366px) and (min-width: 1181px) {
  .desktop-nav {
    gap: 3px;
  }
  .nav-link {
    font-size: 0.88rem;
    padding: 5px 7px;
  }
  .lang-selected-btn {
    padding: 6px 10px;
    font-size: 0.84rem;
  }
  .btn-login {
    padding: 8px 14px;
    font-size: 0.88rem;
  }
}

@media (max-width: 1180px) and (min-width: 1041px) {
  .desktop-nav {
    gap: 2px;
  }
  .nav-link {
    font-size: 0.82rem;
    padding: 4px 6px;
  }
  .lang-selected-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
  }
  .btn-login {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
  .logo-text h1 {
    font-size: 1rem !important;
  }
}

@media (max-width: 1040px) {
  .desktop-nav {
    display: none !important;
  }
  .hamburger-btn {
    display: flex !important;
  }
}


/* ==========================================================================
   MOBILE & TABLET RESPONSIVE STYLES FOR ONBOARDING, LEARNING LOOP & CARDS
   ========================================================================== */
@media (max-width: 768px) {
  .onboarding-card,
  .learning-loop-card {
    padding: 16px 14px !important;
    border-radius: 12px !important;
  }

  .onboarding-card h2,
  .learning-loop-card h3 {
    font-size: 1.2rem !important;
  }

  .onboarding-level-chips {
    gap: 6px !important;
    margin-bottom: 16px !important;
  }

  .onboarding-chip {
    padding: 7px 12px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
  }

  .onboarding-stage-box {
    padding: 14px 10px !important;
  }

  .onboarding-stage-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .loop-steps-bar {
    gap: 6px !important;
  }

  .loop-steps-bar span {
    font-size: 0.8rem !important;
    padding: 6px 10px !important;
  }

  .author-bio-card {
    padding: 18px 16px !important;
  }

  .author-bio-card h1 {
    font-size: 1.3rem !important;
  }

  .author-text {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
  }

  .upgrade-banner-card {
    padding: 20px 16px !important;
  }

  .price-tag .price-num-large {
    font-size: 1.8rem !important;
  }

  .real-proof-img-scroll {
    max-height: 150px !important;
  }
}

@media (max-width: 480px) {
  .onboarding-chip {
    flex: 1 1 calc(50% - 6px) !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   COURSE LOCKED MODAL STYLING
   ========================================================================== */
.course-locked-box {
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 480px !important;
  width: 92% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  border-radius: 20px !important;
  padding: 26px 20px !important;
}

.course-locked-box .modal-close-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

#btn-locked-upgrade:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

#btn-locked-upgrade:active {
  transform: translateY(0);
}

/* Multi-Channel Support Section inside Locked Modal */
.locked-modal-support-section {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.locked-support-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.locked-support-pill-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.locked-support-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.locked-support-pill:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.locked-support-pill.pill-zalo {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.locked-support-pill.pill-zalo:hover {
  background: #0068ff;
  color: #ffffff;
  border-color: #0068ff;
  box-shadow: 0 4px 12px rgba(0, 104, 255, 0.3);
}

.locked-support-pill.pill-kakao {
  background: #fefce8;
  color: #3c1e1e;
  border: 1px solid #fef08a;
}
.locked-support-pill.pill-kakao:hover {
  background: #fee500;
  color: #3c1e1e;
  border-color: #facc15;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.4);
}

.locked-support-pill.pill-fb {
  background: #f0f7ff;
  color: #1877f2;
  border: 1px solid #c7d2fe;
}
.locked-support-pill.pill-fb:hover {
  background: #1877f2;
  color: #ffffff;
  border-color: #1877f2;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

@media (max-width: 480px) {
  .locked-support-pill-group {
    flex-direction: column;
    gap: 6px;
  }
  .locked-support-pill {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.84rem;
    justify-content: center;
  }
}

/* ==========================================================================
   PWA (PROGRESSIVE WEB APP) INSTALLATION COMPONENTS
   ========================================================================== */

/* Header Install Button */
.pwa-header-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #5ca36b 0%, #468754 100%);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(92, 163, 107, 0.35);
  margin-right: 8px;
}
.pwa-header-install-btn:hover {
  background: linear-gradient(135deg, #468754 0%, #356b40 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(92, 163, 107, 0.45);
}

/* Mobile Menu Install Button */
.pwa-mobile-menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border: 1.5px solid #81c784;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.pwa-mobile-menu-btn:hover {
  background: #c8e6c9;
}

/* PWA Bottom Toast Banner */
.pwa-install-banner {
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 480px);
  z-index: 99998;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(92, 163, 107, 0.15);
  border: 1.5px solid rgba(92, 163, 107, 0.3);
  padding: 12px 14px;
  animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pwaSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.pwa-banner-text {
  flex: 1;
  min-width: 0;
}

.pwa-banner-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.25;
}

.pwa-banner-desc {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pwa-btn-install {
  background: linear-gradient(135deg, #5ca36b 0%, #3e7b4c 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(92, 163, 107, 0.3);
}

.pwa-btn-install:hover {
  background: linear-gradient(135deg, #468754 0%, #2f613a 100%);
  transform: scale(1.02);
}

.pwa-btn-dismiss {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s;
}

.pwa-btn-dismiss:hover {
  color: #475569;
  background: #f1f5f9;
}

/* PWA iOS Instruction Modal */
.pwa-ios-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.pwa-ios-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  animation: pwaFadeIn 0.25s ease forwards;
}

@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pwa-ios-sheet {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
  animation: pwaSheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pwaSheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.pwa-ios-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.pwa-ios-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-ios-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.pwa-ios-app-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.pwa-ios-app-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 1px;
}

.pwa-ios-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s;
}

.pwa-ios-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.pwa-ios-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.pwa-ios-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.pwa-ios-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #5ca36b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.pwa-ios-step-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #334155;
}

.pwa-ios-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #1e293b;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: bold;
}

.pwa-ios-footer {
  width: 100%;
}

.pwa-ios-confirm-btn {
  width: 100%;
  padding: 12px;
  background: #5ca36b;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.pwa-ios-confirm-btn:hover {
  background: #468754;
}

/* Standalone Mode: When running installed from Home Screen, hide install prompts */
@media all and (display-mode: standalone) {
  .pwa-install-banner,
  .pwa-ios-modal,
  .pwa-header-install-btn,
  .mobile-pwa-install-wrap {
    display: none !important;
  }
}

/* Smooth highlight pulse for target level section when clicking continue learning */
.highlight-level-pulse {
  animation: levelSectionPulse 2s ease-out;
  border-radius: 16px;
}

@keyframes levelSectionPulse {
  0% {
    outline: 4px solid #16a34a;
    box-shadow: 0 0 25px rgba(22, 163, 74, 0.45);
  }
  50% {
    outline: 2px solid rgba(22, 163, 74, 0.5);
    box-shadow: 0 0 15px rgba(22, 163, 74, 0.2);
  }
  100% {
    outline: 0px solid transparent;
    box-shadow: none;
  }
}

/* Daily Action Item Interactive Cards */
.daily-action-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  user-select: none;
}

.daily-action-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  background-color: #ffffff !important;
}

.daily-action-item:active {
  transform: translateY(0);
}
