/* ============================================
   RIDAM - Short Drama App
   CSS Stylesheet
============================================ */

:root {
  --bg-primary: #0b0317;
  --bg-secondary: #140728;
  --bg-card: #1b0d35;
  --bg-elevated: #211042;

  --accent: #a855f7;        /* purple */
  --accent-2: #f59e0b;      /* gold */
  --accent-glow: rgba(168, 85, 247, 0.35);

  --gold: #fbbf24;
  --gold-soft: #fde68a;

  --text-primary: #f5f3ff;
  --text-secondary: #b8a8e6;
  --text-muted: #6b5ca5;

  --border: rgba(168,85,247,0.18);

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ======================== SPLASH ======================== */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-primary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  animation: splashFadeOut 0.5s ease 2.2s forwards;
}
@keyframes splashFadeOut { to { opacity: 0; pointer-events: none; } }

.splash-logo {
  font-family: var(--font-display);
  font-size: 72px;
  letter-spacing: 4px;
  animation: logoIn 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
.splash-logo img{
width:120px;
filter: drop-shadow(0 0 20px #a855f7);
}
.logo-r { color: var(--accent); }
.logo-rest { color: var(--text-primary); }

@keyframes logoIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.splash-tagline {
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 2px;
  margin-top: 12px;
  font-weight: 600;
  animation: fadeInUp 0.5s ease 0.7s both;
}

.splash-loader {
  width: 140px; height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 48px;
  overflow: hidden;
  animation: fadeInUp 0.5s ease 0.8s both;
}
.loader-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  animation: loaderFill 2s ease 0.9s forwards;
  width: 0%;
}
@keyframes loaderFill { to { width: 100%; } }
@keyframes fadeInUp { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }

/* ======================== APP SHELL ======================== */
.app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg-primary);
}
.app-logo img{
height:32px;
object-fit:contain;
filter: drop-shadow(0 0 8px rgba(168,85,247,.6));
}
.hidden { display: none !important; }

/* ======================== HEADER ======================== */
.top-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-height);
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.app-logo {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--text-primary);
  letter-spacing: 2px;
}
.app-logo span { color: var(--accent); }

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

.icon-btn {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: none; border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background 0.2s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { background: var(--bg-elevated); transform: scale(0.94); }

.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 1.5px solid var(--bg-primary);
}

/* ======================== PAGES ======================== */
.pages-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.page {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: none;
  padding-bottom: calc(var(--nav-height) + 16px);
}
.page.active { display: block; }

/* ======================== CATEGORY TABS ======================== */
.category-tabs-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}
.category-tabs {
  display: flex; gap: 6px;
  overflow-x: auto; padding: 10px 0;
  -ms-overflow-style: none; scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  padding: 6px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-tab.active {
background: linear-gradient(135deg,#7c3aed,#a855f7);
border-color:#a855f7;
box-shadow:0 0 16px rgba(168,85,247,.4);
}
.cat-tab:active { transform: scale(0.95); }

/* ======================== FEATURED SLIDER ======================== */
.featured-slider {
  position: relative;
  overflow: hidden;
  margin: 0;
  height: 220px;
}
.featured-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.featured-slide {
  flex-shrink: 0;
  width: 100%;
  height: 220px;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.featured-slide::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
}
.featured-slide > * { position: relative; z-index: 1; }

.slide-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 11px; font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  width: fit-content;
  letter-spacing: 0.5px;
}
.slide-title {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  margin-bottom: 4px;
  color: white;
  letter-spacing: 1px;
}
.slide-meta { font-size: 12px; color: rgba(255,255,255,0.65); margin-bottom: 12px; font-weight: 600; }
.slide-actions { display: flex; gap: 10px; }

.btn-watch {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 22px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.15s;
}
.btn-watch:active { transform: scale(0.95); }
.btn-more {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 22px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  backdrop-filter: blur(4px);
}

.slider-dots {
  position: absolute; bottom: 12px; right: 16px;
  display: flex; gap: 5px; z-index: 10;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.35);
  transition: all 0.3s;
}
.dot.active { background: var(--accent); width: 18px; }

/* ======================== SECTIONS ======================== */
.home-sections { padding: 8px 0 8px; }

.drama-section { margin-bottom: 8px; padding: 16px 0 4px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; margin-bottom: 12px;
}
.section-title {
  font-size: 17px; font-weight: 800;
  display: flex; align-items: center; gap: 6px;
}
.title-icon { font-size: 18px; }
.see-all {
  background: none; border: none;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
}

/* ======================== DRAMA CARDS ======================== */
.drama-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; padding: 0 16px 8px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.drama-scroll::-webkit-scrollbar { display: none; }

.drama-card {
  flex-shrink: 0;
  width: 130px;
  cursor: pointer;
  transition: transform 0.2s;
}
.drama-card:active { transform: scale(0.95); }

.card-thumb {
  width: 130px; height: 185px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  background: linear-gradient(135deg,#140728,#2a0c4a);
}
.card-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.6) 100%);
}

.card-episodes {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 10px; font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.card-play {
  position: absolute; bottom: 10px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 36px;
  background: rgba(230,57,80,0.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}
.drama-card:hover .card-play { opacity: 1; }

.card-title {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-primary);
}
.card-genre { font-size: 11px; color: var(--text-secondary); font-weight: 600; margin-top: 2px; }

/* Wide cards */
.drama-grid { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }

.drama-card-wide {
  display: flex; gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}
.drama-card-wide:active { transform: scale(0.98); }

.card-thumb-wide {
  width: 110px; height: 75px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.card-thumb-wide .card-episodes {
  top: 6px; right: 6px;
}
.card-thumb-wide .card-play {
  bottom: 8px; left: 50%;
  opacity: 1;
  width: 28px; height: 28px;
  font-size: 10px;
}

.wide-info { padding: 12px 12px 12px 0; display: flex; flex-direction: column; justify-content: center; }

/* ======================== SEARCH PAGE ======================== */
.search-container { padding: 16px; }

.search-bar-wrap {
  display: flex; align-items: center;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1.5px solid var(--border);
  padding: 0 14px;
  gap: 10px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.search-bar-wrap:focus-within { border-color: var(--accent); }
.search-icon { width: 18px; height: 18px; color: var(--text-secondary); flex-shrink: 0; }

.search-input {
  flex: 1; border: none; background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px; font-weight: 600;
  padding: 14px 0;
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.clear-search { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 4px; }

.search-genres {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.genre-chip {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.genre-chip.active {
  background: rgba(230,57,80,0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.search-section-title {
  font-size: 13px; font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.search-results { display: flex; flex-direction: column; gap: 2px; }

.search-result-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.search-result-card:active { background: var(--bg-card); }

.sr-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
}
.sr-info { flex: 1; }
.sr-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.sr-meta { font-size: 12px; color: var(--text-secondary); font-weight: 600; margin-top: 3px; }
.sr-arrow { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }

/* ======================== PLAYER PAGE ======================== */
.player-page { background: #000; padding-bottom: 0 !important; }

.player-container { height: 100%; display: flex; flex-direction: column; position: relative; }

.player-video-area { flex-shrink: 0; }

.player-mock-video {
  width: 100%;
  height: 56.25vw;
  max-height: 65vh;
  background: #0a0010;
  position: relative;
  overflow: hidden;
}
.player-mock-video::before {
  content: '▶';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
  color: rgba(255,255,255,0.04);
}

.player-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.85) 100%);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.player-close {
  align-self: flex-start;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.5);
  border: none; border-radius: 50%;
  color: white; font-size: 16px;
  cursor: pointer; backdrop-filter: blur(4px);
}

.player-center-controls {
  display: flex; align-items: center; justify-content: center; gap: 24px;
}
.player-btn-sm {
  background: rgba(0,0,0,0.4);
  border: none; border-radius: 50%;
  width: 52px; height: 52px;
  color: white; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; backdrop-filter: blur(4px);
  font-size: 9px; font-weight: 700;
}
.player-play-btn {
  width: 68px; height: 68px;
  background: linear-gradient(135deg,#fbbf24,#f59e0b);
box-shadow: 0 0 30px rgba(251,191,36,.6);
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;

  transition: transform 0.15s;
}
.player-play-btn:active { transform: scale(0.92); }

.player-bottom { color: white; }

.player-episode-name {
  font-size: 13px; font-weight: 700; margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.player-progress-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.player-time { font-size: 11px; font-weight: 700; flex-shrink: 0; opacity: 0.8; }
.player-progress {
  flex: 1; height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  position: relative; cursor: pointer;
}
.player-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  position: relative;
  transition: width 0.5s linear;
}
.player-progress-fill::after {
  content: '';
  position: absolute; right: -4px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: white; border-radius: 50%;
}

.player-controls-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.player-ctrl-btn {
  flex: 1; min-width: fit-content;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
  white-space: nowrap;
}
.player-ctrl-btn.active { background: rgba(230,57,80,0.3); border-color: var(--accent); }
.player-ctrl-btn:active { transform: scale(0.95); }

/* Episodes Panel */
.episodes-panel {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  flex: 1; overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}
.episodes-panel.visible { transform: translateY(0); }

.ep-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ep-panel-header h3 { font-size: 16px; font-weight: 800; }
.ep-panel-header button { background: none; border: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; }

.ep-list {
  flex: 1; overflow-y: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

.ep-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 8px;
  margin: 0 8px;
}
.ep-item:active { background: var(--bg-card); }
.ep-item.playing { background: rgba(230,57,80,0.1); border: 1px solid rgba(230,57,80,0.2); }

.ep-num {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
  color: var(--text-secondary);
}
.ep-item.playing .ep-num { background: var(--accent); color: white; }

.ep-info { flex: 1; }
.ep-title { font-size: 13px; font-weight: 700; }
.ep-duration { font-size: 11px; color: var(--text-secondary); font-weight: 600; margin-top: 2px; }

.ep-lock { color: var(--text-muted); font-size: 14px; }

/* ======================== PROFILE PAGE ======================== */
.profile-container { padding-bottom: 24px; }

.profile-hero {
  padding: 28px 20px 24px;
  background: linear-gradient(180deg, #1a0520 0%, var(--bg-primary) 100%);
  display: flex; flex-direction: column; align-items: center;
  border-bottom: 1px solid var(--border);
}

.profile-avatar-wrap { position: relative; margin-bottom: 14px; }
.profile-avatar {
  width: 84px; height: 84px;
  background: linear-gradient(135deg, var(--accent), #c2185b);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 42px;
  color: white;
  box-shadow: 0 0 30px rgba(230,57,80,0.3);
}
.avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px;
  background: var(--bg-card);
  border: 2px solid var(--bg-primary);
  border-radius: 50%; cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

.profile-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.profile-email { color: var(--text-secondary); font-size: 13px; font-weight: 600; margin-bottom: 20px; }

.profile-stats {
  display: flex; gap: 32px;
}
.pstat { display: flex; flex-direction: column; align-items: center; }
.pstat-num { font-size: 24px; font-weight: 800; color: var(--accent); }
.pstat-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }

.profile-menu { padding: 16px; }

.profile-section-title {
  font-size: 11px; font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin: 20px 0 8px 4px;
}
.profile-section-title:first-child { margin-top: 4px; }

.profile-menu-item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 14px 16px;
  margin-bottom: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 600;
  text-align: left;
  transition: background 0.15s;
}
.profile-menu-item:active { background: var(--bg-elevated); transform: scale(0.99); }
.pmi-icon { font-size: 18px; }
.pmi-arrow { width: 18px; height: 18px; color: var(--text-muted); margin-left: auto; }
.pmi-badge {
  margin-left: auto;
  background: linear-gradient(90deg, #f5c518, #ff9800);
  color: #000;
  font-size: 10px; font-weight: 900;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.5px;
}
.profile-menu-item.logout { color: #ff5555; border-color: rgba(255,85,85,0.2); background: rgba(255,85,85,0.05); }

/* ======================== NOTIFICATIONS ======================== */
.notif-container { padding: 16px; }
.page-title-plain { font-size: 22px; font-weight: 800; margin-bottom: 20px; }

.notif-list { display: flex; flex-direction: column; gap: 2px; }

.notif-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s;
  position: relative;
}
.notif-item.unread { background: var(--bg-card); border-color: var(--border); }
.notif-item.unread::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.notif-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.notif-new { background: rgba(230,57,80,0.15); }
.notif-like { background: rgba(255,107,53,0.15); }
.notif-promo { background: rgba(245,197,24,0.15); }
.notif-ep { background: rgba(66,133,244,0.15); }

.notif-title { font-size: 14px; font-weight: 700; }
.notif-time { font-size: 13px; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }
.notif-ago { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ======================== WATCHLIST PAGE ======================== */
.watchlist-container { padding: 16px; }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-icon { font-size: 60px; margin-bottom: 16px; }
.empty-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.empty-sub { color: var(--text-secondary); font-size: 14px; font-weight: 600; margin-bottom: 24px; }
.empty-cta {
  background: var(--accent);
  color: white; border: none;
  padding: 12px 28px; border-radius: 22px;
  font-family: var(--font-body); font-size: 15px; font-weight: 800;
  cursor: pointer;
}

/* ======================== BOTTOM NAV ======================== */
.bottom-nav {
  height: var(--nav-height);
  background: rgba(12,12,20,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  flex-shrink: 0;
  position: relative; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  transition: color 0.2s;
  padding: 8px 0;
  position: relative;
}
.nav-btn.active { color: var(--accent); }
.nav-btn.active::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 2.5px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav-icon { width: 22px; height: 22px; }

/* ======================== MODAL ======================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.modal-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary);
  border-radius: 20px 20px 0 0;
  max-height: 85vh;
  overflow-y: auto;
  animation: sheetUp 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle {
  width: 36px; height: 4px;
  background: var(--text-muted);
  border-radius: 2px;
  margin: 12px auto 0;
}
.modal-content { padding: 16px 20px 32px; }

.modal-drama-hero {
  display: flex; gap: 16px;
  margin-bottom: 20px;
}
.modal-thumb {
  width: 100px; height: 142px;
  border-radius: var(--radius);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.modal-info { flex: 1; padding-top: 4px; }
.modal-title {
  font-family: var(--font-display);
  font-size: 26px; line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.modal-meta { font-size: 12px; color: var(--text-secondary); font-weight: 600; margin-bottom: 10px; }
.modal-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.modal-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 4px;
}

.modal-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; font-weight: 500; }

.modal-actions { display: flex; gap: 10px; margin-bottom: 20px; }
.modal-btn-primary {
  flex: 1;
  background: var(--accent);
  color: white; border: none;
  padding: 14px 20px; border-radius: 12px;
  font-family: var(--font-body); font-size: 15px; font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s;
}
.modal-btn-primary:active { transform: scale(0.97); }
.modal-btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary); border: 1px solid var(--border);
  padding: 14px 16px; border-radius: 12px;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  cursor: pointer;
}

.modal-section-title {
  font-size: 14px; font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px;
}

.ep-preview-list { display: flex; flex-direction: column; gap: 8px; }
.ep-preview {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border-radius: 10px; padding: 12px;
  cursor: pointer;
}
.ep-preview-num {
  width: 32px; height: 32px;
  background: var(--accent);
  color: white; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.ep-preview-title { font-size: 13px; font-weight: 700; }
.ep-preview-dur { font-size: 11px; color: var(--text-secondary); }

/* ======================== TOAST ======================== */
.toast {
  position: fixed; bottom: calc(var(--nav-height) + 16px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 10px 20px; border-radius: 20px;
  font-size: 14px; font-weight: 700;
  border: 1px solid var(--border);
  z-index: 1000;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ======================== PWA PROMPT ======================== */
.pwa-prompt {
  position: fixed; bottom: calc(var(--nav-height) + 12px); left: 12px; right: 12px;
  z-index: 400;
  animation: slideUp 0.4s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.pwa-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.pwa-logo {
  width: 44px; height: 44px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #c2185b);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 26px;
  color: white;
}
.pwa-text { flex: 1; }
.pwa-title { font-size: 14px; font-weight: 800; }
.pwa-sub { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.pwa-install {
  background: var(--accent); color: white;
  border: none; padding: 8px 16px; border-radius: 8px;
  font-family: var(--font-body); font-size: 13px; font-weight: 800;
  cursor: pointer;
}
.pwa-close {
  background: none; border: none;
  color: var(--text-muted); font-size: 16px; cursor: pointer;
  padding: 4px;
}

/* ======================== SCROLLBAR ======================== */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ======================== RESPONSIVE ======================== */
@media (min-width: 480px) {
  .featured-slide { height: 260px; }
  .featured-slider { height: 260px; }
  .slide-title { font-size: 40px; }
}

@media (min-width: 768px) {
  .app { max-width: 480px; margin: 0 auto; }
  body { background: #050508; }
}
