/* ============== Base & Reset ============== */
:root {
  --primary: #FF3B5C;
  --secondary: #7C3AED;
  --dark: #0F0F1E;
  --dark-secondary: #1A1A2E;
  --dark-tertiary: #252540;
  --gray-100: #F3F4F6;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 200ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--dark);
  color: #fff;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
input, textarea, select { font: inherit; }

/* ============== Scrollbar ============== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-700); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }

/* ============== Layout ============== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ============== Header ============== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  height: 64px;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: #FF3B5C;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-400);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-link.active { color: #fff; background: rgba(255, 59, 92, 0.15); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--dark-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 200px;
  display: none;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.user-dropdown.show { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-300);
  transition: all var(--transition);
  width: 100%;
  text-align: left;
}

.dropdown-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.dropdown-divider { height: 1px; background: rgba(255, 255, 255, 0.06); margin: 4px 0; }

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(255, 59, 92, 0.35); transform: translateY(-1px); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }

.btn-ghost { color: var(--gray-400); padding: 8px 12px; }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  transition: all var(--transition);
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.15); }
.btn-icon.active { background: var(--primary); color: #fff; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* ============== Cards ============== */
.drama-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark-secondary);
  transition: all 300ms ease;
  cursor: pointer;
}
.drama-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }

.drama-card-img {
  aspect-ratio: 2/3;
  width: 100%;
  object-fit: cover;
  background: var(--dark-tertiary);
}
.drama-card-yt .drama-card-img {
  aspect-ratio: 16/9;
}

.drama-card-body { padding: 12px; }

.drama-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.drama-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-400);
}

.drama-card-ranks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.genre-rank-label {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  text-decoration: none;
  transition: background 0.2s;
}

.genre-rank-label:hover {
  background: rgba(245, 158, 11, 0.25);
}

/* ---- Genre Ranking Page ---- */
.rank-genre-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  justify-content: center;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.rank-genre-tabs::-webkit-scrollbar { display: none; }

.rank-genre-chip {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--gray-600);
  background: transparent;
  color: var(--gray-300);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.rank-genre-chip:hover { border-color: var(--gray-400); color: var(--gray-200); }
.rank-genre-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

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

.rank-item {
  display: flex;
  gap: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--dark-secondary);
  cursor: pointer;
  transition: background 0.2s;
}
.rank-item:hover { background: var(--dark-tertiary); }

.rank-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 130px;
}
.rank-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.rank-number {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  z-index: 1;
}

.rank-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.rank-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-meta {
  font-size: 12px;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-desc {
  font-size: 12px;
  color: var(--gray-500);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.rank-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.rank-tag-hot { background: var(--primary); color: #fff; }
.rank-tag-new { background: #10B981; color: #fff; }
.rank-tag-default { background: var(--gray-600); color: var(--gray-200); }
.rank-tag-stat { background: transparent; color: #10B981; font-weight: 500; }

.drama-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-hot { background: var(--primary); color: #fff; }
.badge-new { background: #10B981; color: #fff; }
.badge-top { background: #F59E0B; color: #000; }
.badge-streaming { background: var(--secondary); color: #fff; }
.badge-youtube { background: #FF0000; color: #fff; }

.drama-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #F59E0B;
  font-weight: 600;
}

.drama-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 300ms ease;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.drama-card:hover .drama-card-overlay { opacity: 1; }

/* ============== Drama Grid ============== */
.drama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

@media (max-width: 640px) {
  .drama-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

/* ============== Carousel ============== */
.carousel-section { margin-bottom: 40px; }

.carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.carousel-title { font-size: 25px; font-weight: 700; }

.carousel-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.carousel-scroll::-webkit-scrollbar { display: none; }

.carousel-scroll .drama-card {
  flex-shrink: 0;
  width: 160px;
  height: 295px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

.carousel-scroll .drama-card .drama-card-img {
  height: 220px;
  aspect-ratio: unset;
  width: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel-scroll .drama-card .drama-card-body {
  flex: 1;
  overflow: hidden;
}

@media (max-width: 640px) {
  .carousel-scroll .drama-card { width: 130px; height: 255px; }
  .carousel-scroll .drama-card .drama-card-img { height: 185px; }
}

/* ============== Section ============== */
.section { padding: 40px 0; }
.section-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }

/* ============== Tabs ============== */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-400);
  white-space: nowrap;
  transition: all var(--transition);
}
.tab:hover { color: #fff; }
.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* ============== Search ============== */
.search-bar {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--dark-secondary);
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: all var(--transition);
}
.search-input::placeholder { color: var(--gray-500); }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.15); }

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}

.search-tag {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray-300);
  transition: all var(--transition);
  cursor: pointer;
}
.search-tag:hover { background: rgba(255, 59, 92, 0.2); color: var(--primary); }

/* ============== Drama Detail ============== */
.drama-hero {
  display: flex;
  gap: 32px;
  padding: 24px 0 40px;
}

.drama-poster {
  flex-shrink: 0;
  width: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.drama-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }

.drama-info { flex: 1; padding-top: 16px; }

.drama-detail-title { font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }

.drama-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.drama-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--gray-400);
}

.drama-description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-300);
  margin-bottom: 24px;
}

.drama-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.drama-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.drama-tag {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray-300);
}

@media (max-width: 768px) {
  .drama-hero { flex-direction: column; align-items: center; text-align: center; padding-top: 16px; }
  .drama-poster { width: 200px; }
  .drama-meta-row { justify-content: center; }
  .drama-actions { justify-content: center; }
  .drama-tags { justify-content: center; }
}

/* ============== Episodes ============== */
.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.episode-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all var(--transition);
}
.episode-item:hover { background: rgba(255, 255, 255, 0.08); }
.episode-item.active { background: rgba(255, 59, 92, 0.15); border: 1px solid rgba(255, 59, 92, 0.3); }

.episode-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--dark-tertiary);
  flex-shrink: 0;
}

.episode-number {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: var(--dark-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-400);
  flex-shrink: 0;
}

.episode-title { font-size: 14px; font-weight: 500; }

/* ============== Video Player ============== */
.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 24px;
}

.video-container iframe, .video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============== Comments ============== */
.comment-form { margin-bottom: 24px; }

.comment-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--dark-secondary);
  color: #fff;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: all var(--transition);
}
.comment-input:focus { border-color: var(--primary); }

.comment-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dark-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

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

.comment-body { flex: 1; min-width: 0; }
.comment-author { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.comment-text { font-size: 14px; line-height: 1.5; color: var(--gray-300); margin-bottom: 8px; }

.comment-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--gray-500);
}

.comment-action {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color var(--transition);
}
.comment-action:hover { color: var(--primary); }
.comment-action.liked { color: var(--primary); }

.comment-replies { margin-left: 48px; margin-top: 8px; }

/* ============== Actor Card ============== */
.actor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 300ms ease;
}
.actor-card:hover { transform: translateY(-2px); }

.actor-avatar {
  width: 80px;
  height: 80px;
  aspect-ratio: 1 / 1;
  flex: 0 0 80px;
  min-width: 80px;
  min-height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--dark-tertiary);
  border: 2px solid transparent;
  transition: border-color 300ms ease;
  display: block;
}
.actor-card:hover .actor-avatar { border-color: var(--primary); }

.actor-name { font-size: 13px; font-weight: 500; text-align: center; color: var(--gray-300); }

.actor-strip {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.actor-strip::-webkit-scrollbar { display: none; }

.actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 24px 12px;
  align-items: start;
}
.actor-grid .actor-card { min-width: 0; width: 100%; }
.actor-grid .actor-name {
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.3;
}

/* ============== Profile ============== */
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 0;
}

.profile-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

.profile-name { font-size: 24px; font-weight: 700; }
.profile-email { font-size: 14px; color: var(--gray-400); }

.stats-bar {
  display: flex;
  gap: 32px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-item { text-align: center; }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

@media (max-width: 640px) {
  .profile-header { flex-direction: column; text-align: center; }
  .stats-bar { justify-content: center; }
}

/* ============== Settings ============== */
.settings-section {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-section-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-400); margin-bottom: 6px; }

.form-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--dark-secondary);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
}
.form-input:focus { border-color: var(--primary); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  max-width: 400px;
}

.toggle-label { font-size: 14px; }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--gray-700);
  cursor: pointer;
  transition: background var(--transition);
}
.toggle.active { background: var(--primary); }

.toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform var(--transition);
}
.toggle.active::after { transform: translateX(20px); }

/* ============== Loading & Empty ============== */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--dark-tertiary) 25%, rgba(255, 255, 255, 0.06) 50%, var(--dark-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-text { font-size: 16px; }

/* ============== Toast ============== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 300ms ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-width: 360px;
}

.toast-success { background: #059669; color: #fff; }
.toast-error { background: #DC2626; color: #fff; }
.toast-info { background: var(--dark-secondary); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-exit { animation: slideOut 300ms ease forwards; }

@keyframes slideOut {
  to { transform: translateX(100%); opacity: 0; }
}

/* ============== Modal ============== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--dark-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 300ms ease;
}
.modal-overlay.show .modal-box { transform: scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  font-size: 28px;
  color: var(--gray-400);
  line-height: 1;
  padding: 4px;
}
.modal-close:hover { color: #fff; }

.modal-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--gray-500);
  font-size: 13px;
}
.modal-divider::before, .modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* ============== Footer ============== */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-heading { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 14px; color: var(--gray-400); transition: color var(--transition); }
.footer-link:hover { color: var(--primary); }

.footer-bottom { text-align: center; font-size: 13px; color: var(--gray-500); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.04); }

/* ============== Misc ============== */
.page-content { padding-top: 64px; min-height: 100vh; }

.fade-in { animation: fadeIn 400ms ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted { color: var(--gray-400); }
.text-sm { font-size: 13px; }

.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ============== Unified Search + Chat ============== */

/* Unified input bar */
.unified-input-bar {
  display: flex;
  gap: 8px;
  max-width: 680px;
  margin: 0 auto;
}

.unified-input {
  flex: 1;
  padding: 14px 20px;
  background: var(--dark-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}

.unified-input:focus {
  border-color: var(--primary);
}

.unified-input::placeholder {
  color: var(--gray-500);
}

.unified-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.unified-btn:hover { transform: scale(1.08); }
.unified-btn:active { transform: scale(0.94); }

.unified-btn-search {
  background: linear-gradient(135deg, var(--primary), #e6335a);
}

.unified-btn-ai {
  background: linear-gradient(135deg, var(--secondary), #9b59b6);
}

/* Suggestions area */
.suggestions-area {
  max-width: 680px;
  margin: 16px auto 0;
}

.suggestions-area.hidden { display: none; }

.suggestion-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 10px;
}

.suggestion-row-ai {
  margin-top: 4px;
}

/* Unified suggestion tag */
.stag {
  padding: 7px 14px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.stag-keyword {
  background: rgba(255, 255, 255, 0.07);
  color: var(--gray-300);
}

.stag-keyword:hover {
  background: rgba(255, 59, 92, 0.15);
  color: #fff;
  border-color: rgba(255, 59, 92, 0.3);
}

.stag-ai {
  background: rgba(124, 58, 237, 0.12);
  color: #c4b5fd;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stag-ai:hover {
  background: rgba(124, 58, 237, 0.25);
  color: #fff;
  border-color: rgba(124, 58, 237, 0.4);
}

.stag-ai-icon {
  opacity: 0.7;
}

/* AI lock state (logged-out) */
.ai-locked .unified-btn-ai,
.ai-locked .stag-ai {
  position: relative;
  opacity: 0.5;
  filter: grayscale(0.4);
}
.ai-locked .unified-btn-ai:hover,
.ai-locked .stag-ai:hover {
  opacity: 0.65;
  background: rgba(124, 58, 237, 0.15);
  border-color: transparent;
  color: #c4b5fd;
  transform: none;
}
.ai-locked .unified-btn-ai::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dark-secondary, #1a1a1a) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='2.5'><path d='M19 11H5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7a2 2 0 0 0-2-2z'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>") center/9px no-repeat;
  border: 1px solid rgba(124, 58, 237, 0.4);
  pointer-events: none;
}
.ai-locked .suggestion-row-ai::before {
  content: "Sign in to ask AI";
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
  width: 100%;
}

/* Mode bar */
.mode-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.mode-bar.hidden { display: none; }

.mode-label {
  font-size: 13px;
  color: var(--gray-400);
}

.mode-back-btn {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-300);
  cursor: pointer;
  transition: all var(--transition);
}

.mode-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Sort bar */
.sort-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.sort-bar.hidden { display: none; }

/* Chat area */
.chat-area {
  max-width: 720px;
  margin: 16px auto 0;
  background: var(--dark-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.chat-area.hidden { display: none; }

.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  max-width: 85%;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.chat-msg-user {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg-assistant {
  background: var(--dark-tertiary);
  color: var(--gray-100);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-dramas {
  padding: 0 20px 16px;
}

.chat-dramas:empty { display: none; }

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--dark-tertiary);
  color: var(--gray-100);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.chat-input:focus {
  border-color: var(--primary);
}

.chat-dramas-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.chat-dramas-scroll .drama-card {
  flex: 0 0 150px;
  scroll-snap-align: start;
}

/* ============== News Cards ============== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--dark-secondary);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition), border-color var(--transition);
}

.news-card:hover {
  background: var(--dark-tertiary);
  border-color: rgba(255,255,255,0.12);
}

.news-card-body {
  flex: 1;
  min-width: 0;
}

.news-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-summary {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-500);
}

.news-card-source {
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 4px;
}

.news-card-time {
  white-space: nowrap;
}

.news-card-image {
  flex: 0 0 120px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

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

.news-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  margin-bottom: 6px;
}

@media (max-width: 480px) {
  .news-card-image {
    flex: 0 0 80px;
    height: 70px;
  }
  .news-card-title { font-size: 14px; }
  .news-card-summary { -webkit-line-clamp: 2; }
}

/* ============== Scoopz Tabs ============== */
.scoopz-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}

.scoopz-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--gray-400);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  text-align: center;
}

.scoopz-tab:hover {
  color: var(--gray-200);
  background: rgba(255,255,255,0.03);
}

.scoopz-tab.active {
  color: #fff;
  border-bottom-color: #1d9bf0;
}

/* ============== Tweet Cards (Twitter/X style) ============== */
.tweet-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tweet-card {
  display: block;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.tweet-card:hover {
  background: rgba(255,255,255,0.03);
}

.tweet-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.tweet-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d9bf0, #1a8cd8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.tweet-author {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}

.tweet-name {
  font-weight: 700;
  font-size: 15px;
  color: #e7e9ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tweet-username {
  font-size: 14px;
  color: #71767b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tweet-time {
  font-size: 13px;
  color: #71767b;
  white-space: nowrap;
  flex-shrink: 0;
}

.tweet-body {
  font-size: 15px;
  line-height: 1.5;
  color: #e7e9ea;
  margin-left: 50px;
  margin-bottom: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tweet-body .tweet-link {
  color: #1d9bf0;
  text-decoration: none;
}
.tweet-body .tweet-link:hover {
  text-decoration: underline;
}

.tweet-body .tweet-mention {
  color: #1d9bf0;
  text-decoration: none;
}
.tweet-body .tweet-mention:hover {
  text-decoration: underline;
}

.tweet-body .tweet-hashtag {
  color: #1d9bf0;
  text-decoration: none;
}
.tweet-body .tweet-hashtag:hover {
  text-decoration: underline;
}

/* Tweet media */
.tweet-media {
  margin-left: 50px;
  margin-bottom: 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.tweet-media img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.tweet-media-single img {
  max-height: 300px;
}

.tweet-media-double {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.tweet-media-double img {
  height: 200px;
}

.tweet-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}

.tweet-media-grid img {
  height: 150px;
}

/* Tweet action bar */
.tweet-actions {
  display: flex;
  gap: 0;
  margin-left: 50px;
  max-width: 400px;
  justify-content: space-between;
}

.tweet-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #71767b;
  padding: 4px 8px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
}

.tweet-action:hover {
  color: #1d9bf0;
  background: rgba(29, 155, 240, 0.1);
}

.tweet-action svg {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .tweet-body { margin-left: 0; margin-top: 8px; font-size: 14px; }
  .tweet-media { margin-left: 0; }
  .tweet-actions { margin-left: 0; }
  .tweet-avatar { width: 32px; height: 32px; font-size: 14px; }
  .tweet-name { font-size: 14px; }
  .tweet-username { font-size: 13px; }
  .tweet-media-single img { max-height: 200px; }
  .tweet-media-double img { height: 140px; }
  .tweet-media-grid img { height: 100px; }
}

/* ============== Buzz Feed (Scoopz) ============== */
.buzz-page {
  padding-top: 0;
}

.buzz-page-header {
  padding: 40px 0 12px;
  text-align: center;
}

.buzz-page-title {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 4px;
}

.buzz-page-subtitle {
  font-size: 14px;
  color: var(--gray-400);
  margin: 0;
}

.buzz-category-bar {
  margin-bottom: 24px;
}

.buzz-category-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
}

.buzz-category-scroll::-webkit-scrollbar { display: none; }

/* Instagram Stories-style story chips */
.buzz-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  color: var(--gray-400);
  transition: opacity 0.15s;
}

.buzz-story:hover { opacity: 0.85; }

.buzz-story-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s;
}

.buzz-story.active .buzz-story-ring {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.buzz-story-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--dark-bg, #0f0f0f);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-secondary, #1c1c1c);
}

.buzz-story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.buzz-story-placeholder {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.buzz-story-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  max-width: 76px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.buzz-story.active .buzz-story-label {
  color: #fff;
  font-weight: 600;
}

.buzz-feed {
  max-width: 680px;
  margin: 0 auto;
  padding: 4px 0 40px;
}

.buzz-post {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}

.buzz-post:hover { opacity: 0.85; }

.buzz-post-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.buzz-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.buzz-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.buzz-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.buzz-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.buzz-author {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.buzz-author-name {
  font-size: 15px;
  font-weight: 700;
  color: #e7e9ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buzz-author-meta {
  font-size: 13px;
  color: var(--gray-500);
}

.buzz-title {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f3f4f6;
  margin: 0 0 12px;
  word-break: break-word;
}

.buzz-tags {
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.buzz-tag {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

.buzz-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 10px;
  background: var(--dark-secondary);
}

.buzz-image-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.buzz-image-wrap .buzz-image {
  margin-bottom: 0;
  height: 210px;
}

.buzz-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.buzz-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.buzz-footer {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.buzz-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--gray-500);
}

/* Bundle cards (Scoopz → Bundles tab) */
.bundle-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--dark-tertiary);
}
.bundle-card:last-child {
  border-bottom: none;
}
.bundle-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.bundle-cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--dark-tertiary);
}
.bundle-cover-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--dark-tertiary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}
.bundle-meta {
  flex: 1;
  min-width: 0;
}
.bundle-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bundle-info {
  font-size: 12px;
  color: var(--gray-500);
}
.bundle-dramas {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.bundle-dramas::-webkit-scrollbar { display: none; }
.bundle-drama {
  flex-shrink: 0;
  width: 100px;
  cursor: pointer;
  scroll-snap-align: start;
}
.bundle-drama:hover .bundle-drama-img {
  opacity: 0.85;
}
.bundle-drama-img {
  width: 100px;
  height: 150px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin-bottom: 5px;
  background: var(--dark-tertiary);
  transition: opacity 0.2s;
}
.bundle-drama-title {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ============== Hero Slider ============== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 680px;
  overflow: hidden;
  margin-bottom: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  cursor: default;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.35);
  transform: scale(1.08);
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: auto 100%;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(0.85);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  /* Left: strong dark for text readability; bottom: dark fade; edges: vignette for narrow images */
  background:
    linear-gradient(to right,  rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.10) 65%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to top,    rgba(0,0,0,0.70) 0%, transparent 45%),
    linear-gradient(to bottom, rgba(0,0,0,0.40) 0%, transparent 25%);
}

.hero-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 40px 64px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-slide-info {
  max-width: 580px;
}

.hero-slide-badge {
  display: none; /* badge removed from full-bleed layout */
}

.hero-slide-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.hero-slide-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-slide-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.1);
  color: var(--gray-200);
  border: 1px solid rgba(255,255,255,0.15);
}

.hero-slide-desc {
  font-size: 15px;
  color: var(--gray-300);
  line-height: 1.6;
  margin-bottom: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-slide-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Editorial promo section under hero (Ask Thada + Scoopz) ---- */
.hero-promo-section {
  position: relative;
  z-index: 5;
  padding: 16px 0 12px;
  margin-bottom: 16px;
}

.hero-promo-section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-left: 44px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 20px;
}
.hero-promo-section-label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gray-500);
}

.hero-promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.hero-promo-item {
  display: flex;
  padding: 4px 48px 4px 0;
  color: #fff;
}
.hero-promo-item + .hero-promo-item {
  padding: 4px 0 4px 48px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-promo-body {
  flex: 1;
  min-width: 0;
  padding-left: 44px;
}

.hero-promo-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.hero-promo-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin: 0;
  letter-spacing: -0.4px;
}

.hero-promo-accent {
  display: block;
  flex: 0 0 56px;
  height: 2px;
  border-radius: 1px;
}
.hero-promo-item-chat .hero-promo-accent {
  background: linear-gradient(90deg, var(--primary) 0%, rgba(255, 59, 92, 0.15) 100%);
}
.hero-promo-item-scoopz .hero-promo-accent {
  background: linear-gradient(90deg, #14B8A6 0%, rgba(20, 184, 166, 0.15) 100%);
}

.hero-promo-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-400);
  margin: 0 0 12px;
  max-width: 520px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: gap 200ms ease;
}
.hero-promo-cta svg {
  transition: transform 200ms ease;
}
.hero-promo-cta:hover svg {
  transform: translateX(4px);
}
.hero-promo-item:has(.hero-promo-cta:hover) .hero-promo-accent {
  flex-basis: 72px;
  transition: flex-basis 200ms ease;
}

@media (max-width: 900px) {
  .hero-promo-section { padding: 16px 0 4px; margin-bottom: 12px; }
  .hero-promo-section-label { margin-bottom: 14px; }
  .hero-promo-grid { grid-template-columns: 1fr; }
  .hero-promo-item,
  .hero-promo-item + .hero-promo-item {
    padding: 14px 0;
    border-left: none;
  }
  .hero-promo-item + .hero-promo-item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .hero-promo-title { font-size: 22px; }
  .hero-promo-desc { font-size: 13px; }
}

/* Navigation arrows */
.hero-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15,15,30,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform 200ms ease;
  cursor: pointer;
}

.hero-slider-btn:hover {
  background: rgba(255,59,92,0.7);
  transform: translateY(-50%) scale(1.08);
}

.hero-slider-prev { left: 20px; }
.hero-slider-next { right: 20px; }

/* Dot indicators */
.hero-slider-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.hero-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-slider { height: 560px; }
  .hero-slide-content { padding: 0 28px 52px; }
  .hero-slide-title { font-size: 36px; }
}

@media (max-width: 640px) {
  .hero-slider { height: 440px; }
  .hero-slide-content { padding: 0 20px 48px; }
  .hero-slide-title { font-size: 26px; }
  .hero-slide-desc { -webkit-line-clamp: 2; font-size: 13px; }
  .hero-slide-info { max-width: 100%; }
  .hero-slider-btn { display: none; }
}

/* ============== Continue Watching Cards ============== */
.continue-card {
  flex-shrink: 0;
  width: 140px;
  scroll-snap-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.continue-card:hover .continue-card-thumb img { opacity: 0.85; }
.continue-card:hover .continue-resume-btn { opacity: 1; }

.continue-card-thumb {
  position: relative;
  width: 100%;
  height: 210px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark-secondary);
  margin-bottom: 8px;
}

.continue-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.continue-resume-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.continue-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
}

.continue-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

.continue-card-info { padding: 0 2px; }

.continue-card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}

.continue-card-ep {
  font-size: 11px;
  color: var(--gray-400);
}

@media (max-width: 640px) {
  .continue-card { width: 120px; }
  .continue-card-thumb { height: 180px; }
}

/* ============== Topic Tag ============== */
.topic-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

/* ============== chat ============== */


/* 角色图片 */
.chat-img {
  width: 100%;
  height: 240px;
  background-size: cover;
  background-position: center top;
  position: relative;
}
/* --- 1. 网格容器：解决“横着显示”的问题 --- */
.chat-grid {
    display: grid;
    /* 这里的 minmax(200px, 1fr) 确保一行放多个，放不下自动换行 */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    padding: 20px 0;
    width: 100%;
}

/* --- 2. 卡片主容器 --- */
.chat-card {
    position: relative;
    height: 320px; /* 必须给固定高度，否则背景图撑不起来 */
    border-radius: 28px;
    overflow: hidden;
    background: #1a1a22;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

/* --- 3. 背景图片层：解决“图片没了”的问题 --- */
.chat-card-bg {
    position: absolute; /* 必须绝对定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    z-index: 0; /* 置于底层 */
}

/* --- 4. 遮罩层：从透明到黑色的渐变 --- */
.chat-card-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom, 
        transparent 60%, 
        rgba(0, 0, 0, 0.5) 70%, 
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: 1;
}

/* --- 5. 文字区 --- */
.chat-card-info {
    position: absolute;
    /* 核心改动：将 bottom 从 0 改为较大的值，把文字往上推 */
    bottom: 45px; 
    height: 60px;  /* 给文字区一个固定的高度（足以容纳标题+3行描述） */
    left: 0;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 2;
    /* 既然文字上移了，右侧就不再需要给按钮留那么大的空位 */
    padding-right: 30px; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 确保标题永远在 100px 区域的最顶端 */
}
.chat-card-name {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px 0; /* 这里的 margin-bottom 决定了标题和描述的间距 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
}

.chat-card-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 6. 按钮容器：锚定右下角 --- */
.chat-card-action {
    position: absolute;
    /* 核心改动：增加 right 使其向左移，减少 bottom 使其更贴近底边 */
    right: 10px;   /* 往左移：从原来的 12px 增加到 25px */
    bottom: 10px;  /* 往下移：从原来的 16px 减少到 10px */
    padding: 0;    /* 清除之前的 padding 干扰 */
    z-index: 3;
}

.chat-pill-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

.chat-btn.is-loading,
.chat-pill-btn.is-loading {
    opacity: 0.6;
    filter: brightness(0.85);
    cursor: not-allowed;
    transform: none;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.chat-btn.is-loading:hover,
.chat-pill-btn.is-loading:hover {
    opacity: 0.6;
    filter: brightness(0.85);
    transform: none;
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.3);
}

.pill-text {
    font-size: 12px;
    font-weight: 700;
}

/* --- 7. 左上角标签 --- */
.chat-card-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 8px;
    z-index: 3;
}
