/* ==========================================================================
   SHOWBIZ 24H - ANDROID MOBILE OPTIMIZED STYLESHEET
   ========================================================================== */

:root {
  /* Color Palette - Light Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-chip: #f1f5f9;
  --bg-chip-active: #dc2626;
  --border-color: #e2e8f0;
  
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary-red: #dc2626;
  --primary-red-hover: #b91c1c;
  --accent-blue: #2563eb;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --bottom-nav-height: 58px;
  --top-bar-height: 52px;
  --reader-font-size: 16.5px;
}

/* Dark Theme Variables */
body.theme-dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-surface: #1e293b;
  --bg-card: #1e293b;
  --bg-chip: #334155;
  --bg-chip-active: #ef4444;
  --border-color: #334155;
  
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  background-color: #0b0f19;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  width: 0%;
  z-index: 100;
  transition: width 0.1s ease;
}

/* App Mobile Container */
.mobile-app-wrapper {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/* ==========================================================================
   1. TOP APP BAR (Material 3 style)
   ========================================================================== */
.top-app-bar {
  height: var(--top-bar-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.icon-btn:active {
  background-color: var(--bg-chip);
}

.brand-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.brand-red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 15px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-left: 3px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  margin-left: 5px;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   2. BREAKING NEWS TICKER
   ========================================================================== */
.breaking-news-ticker {
  background: rgba(220, 38, 38, 0.08);
  border-bottom: 1px solid rgba(220, 38, 38, 0.15);
  display: flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 12.5px;
}

.ticker-badge {
  background: #dc2626;
  color: white;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.ticker-content {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* ==========================================================================
   3. CATEGORY CHIPS BAR (Horizontal scroll)
   ========================================================================== */
.category-chips-bar {
  background-color: var(--bg-surface);
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: var(--top-bar-height);
  z-index: 30;
}

.category-chips-bar::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.chip {
  background-color: var(--bg-chip);
  color: var(--text-secondary);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.chip.active {
  background-color: var(--bg-chip-active);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

/* ==========================================================================
   MAIN CONTENT SCROLL AREA
   ========================================================================== */
.main-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
  -webkit-overflow-scrolling: touch;
}

.app-view {
  display: none;
}
.app-view.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* Section Headings */
.section-heading {
  padding: 16px 14px 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.text-red { color: #ef4444; }
.text-primary { color: #2563eb; }

.sub-link {
  font-size: 12.5px;
  color: var(--primary-red);
  font-weight: 600;
  cursor: pointer;
}

.articles-count-badge {
  font-size: 11px;
  background: var(--bg-chip);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* ==========================================================================
   FEED VIEW: HERO & CARDS
   ========================================================================== */
/* Hero Featured Card */
.hero-card {
  position: relative;
  margin: 12px 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  background: #000;
  height: 240px;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.3s;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.92) 80%);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-tag {
  align-self: flex-start;
  background: #dc2626;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-meta {
  font-size: 11px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Trending Carousel */
.trending-horizontal-scroll {
  display: flex;
  gap: 12px;
  padding: 4px 14px 14px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.trending-horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.trend-card {
  width: 190px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.trend-thumb {
  height: 105px;
  width: 100%;
  object-fit: cover;
}

.trend-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  justify-content: space-between;
}

.trend-category {
  font-size: 10.5px;
  color: var(--primary-red);
  font-weight: 700;
  text-transform: uppercase;
}

.trend-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trend-meta {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Articles List Stream */
.articles-feed-list {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.article-card:active {
  transform: scale(0.98);
}

.card-thumb-wrap {
  width: 110px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

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

.card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-red);
}

.btn-bookmark-card {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px;
}
.btn-bookmark-card.bookmarked {
  color: #2563eb;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Footer in Feed */
.feed-footer {
  padding: 30px 16px 20px 16px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 12px;
}
.feed-footer .footer-logo {
  margin-bottom: 8px;
}
.feed-footer .copyright {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.7;
}

/* ==========================================================================
   VIEW 2: ARTICLE READER MODE
   ========================================================================== */
.reader-top-controls {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 35;
}

.icon-back {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.font-resizer {
  display: flex;
  background: var(--bg-chip);
  border-radius: var(--radius-pill);
  padding: 2px;
}
.font-resizer button {
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: var(--radius-pill);
}

.icon-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-chip);
  color: var(--text-main);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-action-btn.active {
  color: #2563eb;
}

/* Article Detail Content */
.article-detail-body {
  padding: 16px 16px 20px 16px;
  font-size: var(--reader-font-size);
  line-height: 1.7;
  color: var(--text-main);
}

.article-badge-cat {
  display: inline-block;
  background: rgba(220, 38, 38, 0.1);
  color: var(--primary-red);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.detail-title {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.detail-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.author-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.article-lead {
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 10px;
  border-left: 3px solid var(--primary-red);
}

.article-detail-body p {
  margin-bottom: 16px;
}

.article-detail-body h3 {
  font-size: 1.15em;
  font-weight: 700;
  margin: 22px 0 10px 0;
  color: var(--text-main);
}

.article-quote {
  background: var(--bg-chip);
  border-left: 4px solid var(--accent-blue);
  padding: 14px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 18px 0;
}

.article-quote blockquote {
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 0.95em;
  line-height: 1.6;
  color: var(--text-main);
}

.article-quote cite {
  display: block;
  font-size: 0.8em;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: normal;
  font-weight: 600;
}

.article-img-block {
  margin: 18px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-img-block img {
  width: 100%;
  display: block;
}

.article-img-block .caption {
  display: block;
  padding: 6px 10px;
  background: var(--bg-chip);
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.tag-pill {
  background: var(--bg-chip);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

/* Audio Reader Box */
.audio-reader-box {
  margin: 0 16px 16px 16px;
  background: var(--bg-chip);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.audio-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-play-audio {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-red);
  color: white;
  border: none;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.audio-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.audio-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.audio-wave {
  display: flex;
  align-items: center;
  gap: 3px;
}
.audio-wave span {
  width: 3px;
  height: 14px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: audio-wave 1s infinite ease-in-out;
}
.audio-wave span:nth-child(2) { animation-delay: 0.2s; height: 18px; }
.audio-wave span:nth-child(3) { animation-delay: 0.4s; height: 10px; }
.audio-wave span:nth-child(4) { animation-delay: 0.1s; height: 16px; }
.audio-wave span:nth-child(5) { animation-delay: 0.3s; height: 12px; }

@keyframes audio-wave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1.2); }
}

/* Social Bar */
.article-social-bar {
  padding: 12px 16px;
  margin: 0 16px 20px 16px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
}

.social-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}
.social-btn:active, .social-btn.liked {
  color: #ef4444;
}

/* Comments Section */
.comments-section {
  padding: 0 16px 20px 16px;
}

.comments-heading {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-input-box {
  background: var(--bg-chip);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-input-box input,
.comment-input-box textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.input-action-row {
  display: flex;
  gap: 8px;
}

.btn-send-comment {
  background: var(--primary-red);
  color: white;
  border: none;
  width: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-bubble {
  background: var(--bg-chip);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  flex: 1;
}

.comment-user {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.comment-time {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-left: 6px;
}

.comment-text {
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.4;
  color: var(--text-main);
}

/* Related Articles */
.related-articles-section {
  padding: 10px 16px 20px 16px;
  border-top: 8px solid var(--bg-chip);
}

.related-articles-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   VIEW 3: SAVED BOOKMARKS VIEW
   ========================================================================== */
.bookmarks-header {
  padding: 20px 16px 10px 16px;
}
.bookmarks-header h2 {
  font-size: 18px;
  font-weight: 800;
}
.bookmarks-header .sub-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.bookmarks-list {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ==========================================================================
   4. ANDROID BOTTOM NAVIGATION BAR
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: var(--bottom-nav-height);
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: all 0.2s;
}

.nav-item i {
  font-size: 18px;
}

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

.bookmark-badge-dot {
  position: absolute;
  top: 4px;
  right: 18px;
  width: 6px;
  height: 6px;
  background: var(--primary-red);
  border-radius: 50%;
}

/* ==========================================================================
   SEARCH OVERLAY MODAL
   ========================================================================== */
.search-modal {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.search-box-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
}

.search-input-wrap {
  flex: 1;
  background: var(--bg-chip);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  padding: 8px 14px;
  gap: 8px;
}

.search-input-wrap input {
  border: none;
  background: transparent;
  color: var(--text-main);
  outline: none;
  font-size: 14px;
  flex: 1;
  font-family: inherit;
}

.btn-clear {
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-close-search {
  border: none;
  background: transparent;
  color: var(--primary-red);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.search-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.search-empty-state i {
  font-size: 32px;
  margin-bottom: 10px;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.tag-cloud span {
  background: var(--bg-chip);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   SIDE DRAWER MENU
   ========================================================================== */
.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 90;
  display: none;
}
.side-drawer.open {
  display: block;
}

.drawer-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}

.drawer-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideDrawer 0.25s ease;
}

@keyframes slideDrawer {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

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

.btn-close-drawer {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
}

.drawer-nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.drawer-link:active, .drawer-link.active {
  background: var(--bg-chip);
  color: var(--primary-red);
}

.drawer-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}
.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   IMAGE PEEK CARD (Chỉ hiển thị đoạn trên, click mở popup toàn bộ)
   ========================================================================== */
.image-peek-card {
  margin: 20px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-chip);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.image-peek-card:active {
  transform: scale(0.99);
}

.image-peek-wrapper {
  position: relative;
  max-height: 280px;
  overflow: hidden;
  cursor: pointer;
  background: #1e293b;
}

.image-peek-wrapper .peek-img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease;
}

.image-peek-wrapper:hover .peek-img {
  transform: scale(1.02);
}

.image-peek-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.92) 85%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
  pointer-events: none;
}

.peek-expand-badge {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.7); }
}

.image-peek-card .caption {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-chip);
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   FULLSCREEN IMAGE LIGHTBOX MODAL (Popup hiển thị toàn bộ nội dung ảnh)
   ========================================================================== */
.image-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(10px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  animation: fadeInLightbox 0.25s ease;
  user-select: none;
}

@keyframes fadeInLightbox {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-top-bar {
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  z-index: 10;
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-title-wrap i {
  color: #38bdf8;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-lightbox-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-lightbox-action:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-close-lightbox {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: white;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.btn-close-lightbox:active {
  transform: scale(0.92);
}

.lightbox-image-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 16px 12px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}

.lightbox-image-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.lightbox-image-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.lightbox-img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transition: transform 0.25s ease;
  margin: 0 auto;
}

.lightbox-img.zoomed {
  max-width: 150%;
  cursor: zoom-out;
}

.lightbox-bottom-hint {
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 11.5px;
  color: #94a3b8;
}

