/* ==========================================================================
   Tool Genzy KH - Components Stylesheet
   Masterpiece Production Standard: Pristine Light & Sleek Adaptive Dark
   ========================================================================== */

/* 2-Column Drama Poster Grid */
.drama-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Drama Poster Card (Senior Professional Level) */
.drama-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: var(--shadow-card);
}

.drama-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(245, 158, 11, 0.4);
}

.drama-card:active {
  transform: scale(0.975);
}

.card-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: #f1f5f9;
}

body.theme-dark .card-poster-wrap {
  background: #111722;
}

.card-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.drama-card:hover .card-poster-img {
  transform: scale(1.04);
}

/* Play Overlay Icon on Card */
.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drama-card:hover .card-play-overlay,
.drama-card:active .card-play-overlay {
  opacity: 1;
}

.card-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.drama-card:hover .card-play-btn {
  transform: scale(1);
}

.card-play-btn svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

/* Rank Badge (#1, #2, #3...) */
.rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  border-left: 3px solid var(--gold-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
  max-width: 48%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-badge.top-1 {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: none;
}
.rank-badge.top-2 {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  color: #000;
}
.rank-badge.top-3 {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
}

/* Score Badge */
.score-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gold-secondary);
  font-family: var(--font-khmer);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
  max-width: 48%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-star-svg {
  width: 11px;
  height: 11px;
  fill: var(--gold-secondary);
}

/* Card Body Content */
.card-content {
  padding: 10px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title-km {
  font-family: var(--font-khmer);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  margin-bottom: 4px;
  letter-spacing: normal;
  word-break: break-word;
}

.card-title-zh {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  line-height: 1.4;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
}

.card-ep-count {
  background: var(--bg-input);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
}

.card-platform-tag {
  color: var(--gold-primary);
  font-weight: 600;
  font-size: 11px;
}

/* Skeleton Loading Shimmer */
.skeleton-card {
  width: 100%;
  aspect-ratio: 3 / 4.8;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

body.theme-dark .skeleton-card {
  background: linear-gradient(90deg, #131924 25%, #1d2535 50%, #131924 75%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   Ultra-Luxury 3D Hero Carousel / Banner Slider (Coverflow & Perspective)
   ========================================================================== */
.hero-3d-slider-container {
  position: relative;
  width: 100%;
  margin: 6px 0 18px 0;
  perspective: 1200px;
  -webkit-perspective: 1200px;
  touch-action: pan-y;
  user-select: none;
  overflow: hidden;
  padding: 6px 0 24px 0;
}

.hero-3d-track {
  position: relative;
  width: 100%;
  height: 215px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-3d-slide {
  position: absolute;
  width: 94%;
  max-width: 440px;
  height: 210px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b1120;
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), 
              opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), 
              filter 0.45s ease,
              box-shadow 0.45s ease;
  will-change: transform, opacity;
  transform-origin: center center;
}

/* 3D Active Front Center Slide */
.hero-3d-slide.active {
  transform: translate3d(0, 0, 0) scale(1) rotateY(0deg);
  opacity: 1;
  z-index: 10;
  pointer-events: auto;
  filter: brightness(1) contrast(1.02);
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 16px 45px -4px rgba(217, 119, 6, 0.45), 0 0 25px rgba(245, 158, 11, 0.2);
}

/* 3D Previous Slide (Tilted left in background) */
.hero-3d-slide.prev-slide {
  transform: translate3d(-38%, 0, -80px) scale(0.86) rotateY(14deg);
  opacity: 0.55;
  z-index: 5;
  pointer-events: auto;
  filter: brightness(0.75);
}

/* 3D Next Slide (Tilted right in background) */
.hero-3d-slide.next-slide {
  transform: translate3d(38%, 0, -80px) scale(0.86) rotateY(-14deg);
  opacity: 0.55;
  z-index: 5;
  pointer-events: auto;
  filter: brightness(0.75);
}

/* Hidden Slides */
.hero-3d-slide.hidden-slide {
  transform: translate3d(0, 0, -220px) scale(0.7);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-drama-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 25%;
  filter: brightness(0.85) saturate(1.15);
  transition: transform 0.4s ease;
}

.hero-3d-slide.active:hover .hero-drama-backdrop {
  transform: scale(1.03);
}

.hero-drama-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.12) 0%,
    rgba(15, 23, 42, 0.65) 50%,
    rgba(15, 23, 42, 0.96) 100%
  );
  pointer-events: none;
}

.hero-drama-content {
  position: relative;
  z-index: 2;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hero-drama-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.24);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--gold-secondary);
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
  backdrop-filter: blur(6px);
}

.tag-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-secondary);
  box-shadow: 0 0 8px var(--gold-secondary);
  animation: pulseDot 1.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

.hero-drama-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  font-family: var(--font-khmer);
}

.hero-drama-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--gold-gradient);
  color: #000000;
  border: none;
  font-family: var(--font-khmer);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: fit-content;
}

.hero-play-btn:active {
  transform: scale(0.96);
}

/* 3D Navigation Chevron Buttons */
.hero-slider-nav {
  position: absolute;
  top: calc(50% - 10px);
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

body.theme-dark .hero-slider-nav {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.hero-slider-nav svg {
  width: 16px;
  height: 16px;
}

.hero-slider-nav.prev {
  left: 4px;
}

.hero-slider-nav.next {
  right: 4px;
}

.hero-slider-nav:hover {
  background: var(--gold-gradient);
  color: #000;
  border-color: var(--gold-primary);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.hero-slider-nav:active {
  transform: translateY(-50%) scale(0.92);
}

/* 3D Indicator Dots & Progress Capsule */
.hero-slider-pagination {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 20;
}

.hero-slider-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: rgba(148, 163, 184, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-dark .hero-slider-dot {
  background: rgba(255, 255, 255, 0.25);
}

.hero-slider-dot.active {
  width: 22px;
  background: var(--gold-gradient);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

/* ==========================================================================
   Genre Category Chips Horizontal Scroll
   ========================================================================== */
.genre-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px 0;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.genre-chips-scroll::-webkit-scrollbar {
  display: none;
}

.genre-chip-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-khmer);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}

.genre-chip-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.genre-chip-tab.active {
  background: var(--gold-gradient);
  color: #000;
  border-color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.3);
}

/* ==========================================================================
   Search Sticky Bar & Category Tags
   ========================================================================== */
.search-bar-sticky {
  position: sticky;
  top: var(--header-height);
  z-index: 30;
  background: var(--bg-primary);
  padding: 4px 0 10px 0;
}

.search-input-active {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 14px;
  gap: 8px;
  transition: all 0.2s;
}

.search-input-active:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.search-input-active input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 12px 4px;
  color: var(--text-primary);
  font-family: var(--font-khmer);
  font-size: 14px;
}

.search-input-active input::placeholder {
  color: var(--text-muted);
}

.btn-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.search-tags-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.tag-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.tag-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tag-scroll::-webkit-scrollbar {
  display: none;
}

.tag-btn {
  padding: 6px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tag-btn.active {
  background: var(--gold-gradient);
  color: #000;
  border-color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--accent-purple);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================================================
   VIP Subscription & Superpowers Matrix
   ========================================================================== */
.vip-status-card {
  position: relative;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

body.theme-dark .vip-status-card {
  background: linear-gradient(135deg, rgba(24, 32, 46, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
}

.vip-status-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.vip-status-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.vip-status-crown-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.vip-status-crown-badge svg {
  width: 24px;
  height: 24px;
}

.vip-status-info {
  flex: 1;
}

.vip-badge-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-bottom: 4px;
}

body.theme-dark .vip-badge-pill {
  color: var(--gold-secondary);
}

.vip-status-info h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 3px;
}

.vip-status-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.vip-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.vip-section-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-secondary);
}

.vip-section-heading h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.vip-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.vip-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-xs);
}

.vip-feature-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vip-feature-icon-wrap svg {
  width: 17px;
  height: 17px;
}

.vip-feature-icon-wrap.gold {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-primary);
}
.vip-feature-icon-wrap.blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
}
.vip-feature-icon-wrap.red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}
.vip-feature-icon-wrap.purple {
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-purple);
}
.vip-feature-icon-wrap.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
}

.vip-feature-content h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.vip-feature-content p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* VIP Comparison Table */
.vip-comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
}

.comparison-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 10px 14px;
  background: var(--bg-input);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

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

.comparison-row .gold {
  color: var(--gold-primary);
  font-weight: 700;
}
.comparison-row .green {
  color: var(--accent-green);
  font-weight: 700;
}

/* VIP Plan Cards */
.vip-plans-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.vip-plan-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}

.vip-plan-card:hover {
  border-color: var(--gold-secondary);
}

.vip-plan-card.active, .vip-plan-card.featured {
  border-color: var(--gold-primary);
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.2);
}

body.theme-dark .vip-plan-card.active, 
body.theme-dark .vip-plan-card.featured {
  background: linear-gradient(135deg, #1c2637, #261b0c);
}

.plan-top-badge {
  position: absolute;
  top: -10px;
  left: 18px;
  background: var(--gold-gradient);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.plan-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.plan-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.plan-price .currency {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-primary);
}

.plan-price .amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-primary);
  font-family: var(--font-en);
}

.plan-price .period {
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-pay-hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--gold-gradient);
  color: #000;
  font-family: var(--font-khmer);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.35);
  transition: transform 0.15s ease;
  margin-bottom: 16px;
}

.btn-pay-hero:active {
  transform: scale(0.98);
}

.vip-bank-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.bank-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
}

.vip-service-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   User Profile & Referral System
   ========================================================================== */
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-details h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.profile-handle {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.referral-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.ref-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.ref-gift-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ref-header h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ref-header p {
  font-size: 11.5px;
  color: var(--text-muted);
}

.ref-link-box {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.ref-link-box input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-primary);
  font-family: var(--font-en);
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  background: var(--gold-gradient);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.milestone-progress-wrap {
  margin-bottom: 14px;
}

.milestone-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.ref-hint-text {
  font-size: 11px;
  color: var(--text-muted);
}

.ref-stats {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Bottom Navigation Dock (Luxury Mobile Experience)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-nav);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: var(--shadow-nav);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  flex: 1;
  height: 100%;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--gold-gradient);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.nav-icon-wrap {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-icon {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  transition: all 0.2s ease;
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item.active {
  color: var(--gold-primary);
}

.nav-item.active .nav-icon-wrap {
  transform: translateY(-2px);
}

.nav-item.active .nav-icon {
  stroke: var(--gold-primary);
  filter: drop-shadow(0 2px 6px rgba(217, 119, 6, 0.25));
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-khmer);
  transition: color 0.2s ease;
}

.nav-item.active .nav-label {
  font-weight: 700;
  color: var(--gold-primary);
}

/* ==========================================================================
   Modals & Popups (KHQR, Tools, Toast)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.khqr-logo-tag {
  background: #dc2626;
  color: #fff;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.khqr-body {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.khqr-qr-wrap {
  width: 210px;
  height: 210px;
  background: #ffffff;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
  position: relative;
}

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

.khqr-amount-wrap {
  margin-bottom: 12px;
}

.amt-label {
  font-size: 12px;
  color: var(--text-muted);
}

.amt-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-primary);
  font-family: var(--font-en);
}

.khqr-bank-logos {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.bank-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.khqr-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.btn-verify-pay {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  background: var(--gold-gradient);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-confirm-manual {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-confirm-manual:hover,
.btn-confirm-manual:active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Toast Notification Popup */
.toast-popup {
  position: fixed;
  bottom: calc(var(--nav-height) + 24px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: toastPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

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

/* ==========================================================================
   Services & AI Voice Studio Section
   ========================================================================== */
.services-header-hero {
  padding: 10px 0 16px 0;
  text-align: center;
}

.services-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-primary);
  font-family: var(--font-en);
  margin-bottom: 6px;
}

.services-header-hero h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.services-header-hero p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Dedicated Services & AI Voice Studio (3D Luxury Global Design)
   ========================================================================== */
.services-header-hero {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

body.theme-dark .services-header-hero {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.services-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold-secondary);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.voice-studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

body.theme-dark .voice-studio-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.voice-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.voice-studio-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.voice-select-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.voice-select-row::-webkit-scrollbar {
  display: none;
}

.voice-opt-btn {
  padding: 7px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.voice-opt-btn.active {
  background: var(--gold-gradient);
  color: #000;
  border-color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.voice-input-area {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-khmer);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  resize: none;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.voice-input-area:focus {
  border-color: var(--gold-primary);
}

.voice-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-generate-voice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--gold-gradient);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-generate-voice:hover {
  filter: brightness(1.08);
}

.btn-generate-voice:active {
  transform: scale(0.96);
}

.services-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.services-chips-scroll::-webkit-scrollbar {
  display: none;
}

.service-chip-btn {
  padding: 7px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.service-chip-btn.active {
  background: var(--gold-gradient);
  color: #000;
  border-color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   Ultra-Luxury 3D Tool Cards Grid (Global AAA Standard)
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  perspective: 1000px;
}

@media (max-width: 360px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-dark .tool-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-secondary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15), 0 0 15px rgba(245, 158, 11, 0.2);
}

body.theme-dark .tool-card:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 158, 11, 0.25);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:active {
  transform: scale(0.97);
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tool-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-secondary);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-icon-wrap {
  transform: scale(1.08) rotate(3deg);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.4) 100%);
  color: #fbbf24;
}

.tool-icon-svg {
  width: 20px;
  height: 20px;
}

.tool-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tool-badge.popular, .tool-badge.hot {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.tool-badge.vip {
  background: var(--gold-gradient);
  color: #000;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.tool-badge.new {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.tool-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 6px;
  font-family: var(--font-khmer);
}

.tool-short-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.tool-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.tool-price-tag {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-secondary);
}

.tool-btn-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 10px;
  background: var(--gold-gradient);
  color: #000;
  font-family: var(--font-khmer);
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.tool-btn-action:hover {
  filter: brightness(1.08);
}

.tool-btn-action:active {
  transform: scale(0.96);
}

/* ==========================================================================
   Donghua Free Page & Card Styles
   ========================================================================== */
.donghua-hero-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

body.theme-dark .donghua-hero-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.2) 100%);
  border-color: rgba(245, 158, 11, 0.35);
}

.donghua-free-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.donghua-hero-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.donghua-hero-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.donghua-search-box {
  margin-bottom: 12px;
}

.donghua-card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: var(--gold-secondary);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
}

.free-donghua-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #10b981;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.nav-dot-badge.free-dot {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #10b981;
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 6px;
  line-height: 1.1;
}

.home-donghua-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.home-donghua-banner:active {
  transform: scale(0.98);
}

.hdb-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hdb-icon {
  font-size: 24px;
}

.hdb-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.hdb-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.hdb-btn {
  background: var(--gold-gradient);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   iQIYI Anime & Drama Styling
   ========================================================================== */
.iqiyi-hero-banner {
  background: linear-gradient(135deg, rgba(0, 220, 90, 0.1) 0%, rgba(16, 185, 129, 0.18) 100%);
  border: 1px solid rgba(0, 220, 90, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

body.theme-dark .iqiyi-hero-banner {
  background: linear-gradient(135deg, rgba(0, 220, 90, 0.15) 0%, rgba(15, 23, 42, 0.85) 100%);
  border-color: rgba(0, 220, 90, 0.4);
}

.iqiyi-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.iqiyi-tag-badge {
  background: #00dc5a;
  color: #000;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.iqiyi-hero-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.iqiyi-hero-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.card-action-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.card-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.card-action-btn.btn-watch {
  background: var(--gold-gradient);
  color: #000;
}

.card-action-btn.btn-dl-poster {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.card-action-btn.btn-dl-poster:hover {
  color: var(--gold-secondary);
  border-color: var(--gold-primary);
}

/* ==========================================================================
   iQIYI Episodes Sheet & VIP Episode Download Styling (Audio 1)
   ========================================================================== */
.iqiyi-episodes-modal-card {
  max-width: 480px;
  width: 94%;
  background: var(--bg-card);
  border: 1px solid rgba(0, 220, 90, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 220, 90, 0.15);
}

.iqiyi-ep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.iqiyi-ep-row:hover {
  border-color: rgba(0, 220, 90, 0.4);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.iqiyi-ep-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
}

.iqiyi-ep-title {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.iqiyi-ep-badge {
  font-size: 10px;
  background: rgba(0, 220, 90, 0.15);
  color: #00dc5a;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  flex-shrink: 0;
}

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

.btn-iq-ep-watch {
  background: rgba(0, 220, 90, 0.12);
  color: #00dc5a;
  border: 1px solid rgba(0, 220, 90, 0.3);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-iq-ep-watch:hover {
  background: rgba(0, 220, 90, 0.25);
}

.btn-iq-ep-dl {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.btn-iq-ep-dl:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.iqiyi-ep-row.locked-row {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.03);
}

.iqiyi-ep-badge.badge-free {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.iqiyi-ep-badge.badge-vip {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-iq-ep-watch.btn-locked {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-iq-ep-watch.btn-locked:hover {
  background: rgba(245, 158, 11, 0.22);
}

.btn-iq-ep-dl.btn-dl-locked {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  box-shadow: none;
  border: 1px solid var(--border-subtle);
}

.btn-iq-ep-dl.btn-dl-locked:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #f59e0b;
}

/* ==========================================================================
   Tool Details Modal & Fix Giant Checkmarks Bug
   ========================================================================== */
.tool-modal-body {
  padding: 16px;
  max-height: 80vh;
  overflow-y: auto;
}
.tool-modal-features {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-modal-features li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  font-size: 13px !important;
  color: var(--text-secondary) !important;
  line-height: 1.55 !important;
}
.tool-modal-features li svg,
.tool-modal-features svg,
.modal-card .tool-modal-features svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  color: #10b981 !important;
  stroke: #10b981 !important;
  flex-shrink: 0 !important;
  margin-top: 3px !important;
}
.tool-order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  margin-top: 14px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s, opacity 0.15s;
}
.tool-order-btn:active {
  transform: scale(0.98);
}
.tool-order-btn svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}
.tool-btn-buy {
  padding: 6px 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tool-btn-buy:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
}

/* ==========================================================================
   AI Khmer Dubbed Dramas Styles (រឿង AI និយាយខ្មែរ)
   ========================================================================== */
.ai-drama-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  max-width: 50%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-format-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  z-index: 2;
  max-width: 46%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



/* ==========================================================================
   Comprehensive Light Mode & Anti-Overlap Typography Fixes
   ========================================================================== */

/* Light Mode Card & Modal Overrides */
body.theme-light .modal-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12) !important;
}

body.theme-light .modal-header h3,
body.theme-light #modalToolTitle,
body.theme-light #modalIqiyiTitle {
  color: #0f172a !important;
}

body.theme-light .tool-modal-body {
  color: #0f172a !important;
}

body.theme-light .tool-modal-body h4 {
  color: #0f172a !important;
}

body.theme-light .tool-modal-features li {
  color: #334155 !important;
}

body.theme-light .tool-price-highlight {
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

body.theme-light .tool-price-highlight span {
  color: #0f172a !important;
}

body.theme-light #modalToolPrice {
  color: #b45309 !important;
}

body.theme-light .iqiyi-episodes-modal-card h4 {
  color: #0f172a !important;
}

body.theme-light .iqiyi-ep-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.theme-light .iqiyi-ep-row:hover {
  background: #f1f5f9 !important;
}

body.theme-light .iqiyi-ep-info {
  color: #0f172a !important;
}

body.theme-light .btn-iq-ep-dl.btn-dl-locked {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}

/* KHQR Light Mode */
body.theme-light .khqr-hint {
  color: #475569 !important;
}

body.theme-light .amt-label {
  color: #64748b !important;
}

body.theme-light #khqrAmountDisplay {
  color: #0284c7 !important;
}

body.theme-light .bank-tag {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #e2e8f0 !important;
}

body.theme-light .khqr-ref-box {
  background: #f8fafc !important;
  border: 1px dashed #cbd5e1 !important;
}

body.theme-light .khqr-ref-label {
  color: #0f172a !important;
}

body.theme-light .khqr-ref-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.theme-light .khqr-ref-sublabel {
  color: #64748b !important;
}

/* Tool Cards */
.tool-btn-tg-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff !important;
  font-family: var(--font-khmer);
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.tool-btn-tg-action:active {
  transform: scale(0.97);
}

.tool-btn-tg-action svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
