/* =============================================
   MOLI — Mario Edition CSS
   Tema: Red × Blue × Yellow × Mushroom Kingdom
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Fredoka+One&family=Nunito:wght@400;600;700;900&display=swap');

:root {
  --mario-red: #e52222;
  --mario-red-dark: #b01010;
  --mario-blue: #2563eb;
  --mario-blue-dark: #1d4ed8;
  --mario-yellow: #f8c94e;
  --mario-yellow-dark: #d4a017;
  --mario-green: #16a34a;
  --mario-green-light: #22c55e;
  --mario-sky: #38bdf8;
  --mario-dark: #0f0f1a;
  --mario-dark2: #161625;
  --mario-card: #1e1e32;
  --mario-border: #2d2d48;
  --mario-text: #f0f0ff;
  --mario-muted: #8888aa;
  --mario-coin: #f8c94e;

  --font-pixel: 'Press Start 2P', monospace;
  --font-fredoka: 'Fredoka One', cursive;
  --font-nunito: 'Nunito', sans-serif;
  --nav-h: 58px;
  --bnav-h: 68px;
  --radius: 14px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--mario-dark);
  color: var(--mario-text);
  font-family: var(--font-nunito);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-nunito); color: var(--mario-text); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--mario-dark2); }
::-webkit-scrollbar-thumb { background: var(--mario-red); border-radius: 3px; }

/* ===== TOP NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--mario-dark2);
  border-bottom: 2px solid var(--mario-border);
  z-index: 1000;
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 600px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; padding: 0 16px; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-icon { font-size: 24px; }
.logo-text {
  font-family: var(--font-fredoka); font-size: 22px; font-weight: 400;
  color: var(--mario-text); letter-spacing: 0.5px;
}
.logo-accent { color: var(--mario-red); }

.nav-search {
  flex: 1;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid var(--mario-border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.nav-search:focus-within { border-color: var(--mario-red); }
.nav-search input {
  flex: 1; background: none; border: none;
  padding: 7px 14px; color: var(--mario-text);
  font-family: var(--font-nunito); font-size: 14px; outline: none;
}
.nav-search input::placeholder { color: var(--mario-muted); }
.search-btn { padding: 7px 12px; color: var(--mario-muted); font-size: 16px; }

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-coins {
  font-family: var(--font-fredoka); font-size: 16px;
  color: var(--mario-coin);
  background: rgba(248,201,78,0.12);
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid rgba(248,201,78,0.3);
}

/* ===== MAIN ===== */
.main-content {
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
  position: relative; z-index: 1;
}

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.25s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== HERO ===== */
.hero {
  position: relative; height: 320px;
  overflow: hidden;
  background: var(--mario-dark2);
}
.hero-slides {
  position: absolute; inset: 0;
}
.hero-slide-loading {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--mario-dark2);
}
.hero-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--mario-border);
  border-top-color: var(--mario-red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.hero-slide-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  opacity: 0; transition: opacity 0.7s ease;
}
.hero-slide-img.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.3) 40%,
    rgba(15,15,26,0.92) 100%
  );
}
.hero-content {
  position: relative; z-index: 2;
  padding: 140px 18px 20px;
  max-width: 600px; margin: 0 auto;
}
.hero-genre-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mario-red); color: white;
  padding: 4px 12px; border-radius: 20px;
  font-family: var(--font-fredoka); font-size: 13px;
  margin-bottom: 8px; letter-spacing: 0.5px;
  min-height: 24px;
}
.hero-title {
  font-family: var(--font-fredoka); font-size: clamp(22px, 6vw, 40px);
  font-weight: 400; line-height: 1.2; margin-bottom: 16px;
  text-shadow: 1px 3px 10px rgba(0,0,0,0.7);
  min-height: 32px;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hero-actions { display: flex; gap: 10px; }

.btn-watch {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mario-red); color: white;
  padding: 10px 22px; border-radius: 50px;
  font-family: var(--font-fredoka); font-size: 16px;
  box-shadow: 0 4px 15px rgba(229,34,34,0.4);
  transition: all 0.2s;
}
.btn-watch:hover { filter: brightness(1.15); transform: translateY(-1px); }

.btn-info {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); color: white;
  padding: 10px 22px; border-radius: 50px;
  font-family: var(--font-fredoka); font-size: 16px;
  border: 1.5px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.btn-info:hover { background: rgba(255,255,255,0.22); }

.slider-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.35); cursor: pointer;
  transition: all 0.2s;
}
.dot.active { background: var(--mario-red); width: 20px; border-radius: 4px; }

/* ===== CATEGORY SCROLL ===== */
.category-scroll {
  padding: 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.category-inner {
  display: flex; gap: 8px; padding: 0 16px;
  width: max-content;
}
.cat-chip {
  padding: 6px 16px; border-radius: 50px;
  background: var(--mario-card); border: 1.5px solid var(--mario-border);
  font-family: var(--font-nunito); font-size: 13px; font-weight: 600;
  color: var(--mario-muted); white-space: nowrap;
  transition: all 0.18s;
}
.cat-chip:hover { border-color: var(--mario-red); color: var(--mario-text); }
.cat-chip.active {
  background: var(--mario-red); border-color: var(--mario-red);
  color: white; box-shadow: 0 2px 10px rgba(229,34,34,0.35);
}

/* ===== TICKER ===== */
.ticker-wrap {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 16px 14px;
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.3);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
}
.ticker-icon { font-size: 16px; flex-shrink: 0; }
.ticker-text { font-size: 13px; color: var(--mario-sky); font-weight: 600; line-height: 1.3; }

/* ===== HOME SECTIONS ===== */
.home-section { margin-bottom: 8px; }
.section { max-width: 600px; margin: 0 auto; padding: 16px 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding: 0 16px;
}
.section-title {
  font-family: var(--font-fredoka); font-size: 18px; color: var(--mario-text);
  display: flex; align-items: center; gap: 8px;
}
.section-title-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.section-title-dot.red { background: var(--mario-red); box-shadow: 0 0 8px var(--mario-red); }
.section-title-dot.yellow { background: var(--mario-yellow); box-shadow: 0 0 8px var(--mario-yellow); }
.title-icon { font-size: 16px; }
.see-all {
  font-family: var(--font-nunito); font-size: 12px; font-weight: 700;
  color: var(--mario-muted); padding: 4px 10px;
  background: transparent; border: 1px solid var(--mario-border);
  border-radius: 50px; transition: all 0.2s;
}
.see-all:hover { color: var(--mario-red); border-color: var(--mario-red); }

/* ===== HORIZONTAL SCROLL ===== */
.hscroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hscroll-wrap::-webkit-scrollbar { display: none; }
.hscroll-inner {
  display: flex; gap: 10px; padding: 4px 16px 8px;
  width: max-content;
}
.hscroll-loading { width: 100%; min-width: 200px; padding: 20px 16px; }
.hscroll-card {
  width: 110px; flex-shrink: 0; cursor: pointer;
  transition: transform 0.18s;
}
.hscroll-card:hover { transform: translateY(-4px); }
.hscroll-img-wrap {
  position: relative; width: 110px; height: 155px;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--mario-card);
}
.hscroll-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hscroll-badge {
  position: absolute; bottom: 6px; left: 6px;
  background: var(--mario-red); color: white;
  font-family: var(--font-fredoka); font-size: 11px;
  padding: 2px 7px; border-radius: 4px;
}
.hscroll-title {
  margin-top: 6px; font-size: 12px; font-weight: 700;
  color: var(--mario-text); line-height: 1.3;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ===== HISTORY ON HOME ===== */
.continue-section { padding: 16px 0; }
.continue-scroll { overflow-x: auto; scrollbar-width: none; }
.continue-scroll::-webkit-scrollbar { display: none; }
.continue-inner { display: flex; gap: 10px; padding: 4px 16px; width: max-content; }
.continue-card {
  width: 140px; flex-shrink: 0; cursor: pointer;
  transition: transform 0.18s;
}
.continue-card:hover { transform: translateY(-3px); }
.continue-thumb {
  position: relative; width: 140px; height: 85px;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--mario-card);
}
.continue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.continue-ep-badge {
  position: absolute; bottom: 5px; left: 5px;
  background: rgba(0,0,0,0.75); color: white; font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.continue-progress { height: 3px; background: rgba(255,255,255,0.15); border-radius: 2px; margin-top: 6px; }
.continue-progress-fill { height: 100%; background: var(--mario-red); border-radius: 2px; }
.continue-title {
  margin-top: 5px; font-size: 11px; font-weight: 700;
  color: var(--mario-text); line-height: 1.3;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ===== ANIME GRID ===== */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 12px;
  max-width: 600px; margin: 0 auto;
}
@media (min-width: 400px) {
  .anime-grid { grid-template-columns: repeat(3, 1fr); }
}

.anime-card {
  background: var(--mario-card); border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 1px solid var(--mario-border);
}
.anime-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.card-img-wrap { position: relative; aspect-ratio: 2/3; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.anime-card:hover .card-img { transform: scale(1.05); }
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
}
.card-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(229,34,34,0.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.anime-card:hover .card-play { opacity: 1; }
.card-play svg { width: 14px; height: 14px; fill: white; }
.card-badge {
  position: absolute; top: 6px; left: 6px;
  background: var(--mario-blue); color: white;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
}
.card-ep-badge {
  position: absolute; bottom: 6px; left: 6px;
  background: var(--mario-red); color: white;
  font-family: var(--font-fredoka); font-size: 11px;
  padding: 2px 6px; border-radius: 4px;
}
.card-body { padding: 7px 8px 9px; }
.card-title {
  font-size: 11px; font-weight: 700; line-height: 1.35;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  color: var(--mario-text);
}
.card-meta { font-size: 11px; color: var(--mario-yellow); margin-top: 3px; }
.card-score { display: flex; align-items: center; gap: 2px; }

/* ===== GENRE GRID ===== */
.genre-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 0 12px;
  max-width: 600px; margin: 0 auto;
}
.genre-card {
  background: var(--mario-card);
  border: 1.5px solid var(--mario-border);
  border-radius: var(--radius-sm);
  padding: 16px; cursor: pointer;
  transition: all 0.18s; text-align: center;
}
.genre-card:hover {
  border-color: var(--mario-red); background: rgba(229,34,34,0.1);
  transform: translateY(-2px);
}
.genre-name { font-family: var(--font-fredoka); font-size: 16px; }

/* ===== PAGE HEADER ===== */
.page-header { padding: 20px 16px 14px; max-width: 600px; margin: 0 auto; }
.page-title {
  font-family: var(--font-fredoka); font-size: 22px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.page-desc { font-size: 13px; color: var(--mario-muted); }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  padding: 20px 16px 100px;
}
.page-btn {
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: var(--mario-card); border: 1.5px solid var(--mario-border);
  font-family: var(--font-fredoka); font-size: 15px; color: var(--mario-text);
  transition: all 0.18s;
}
.page-btn:hover { border-color: var(--mario-red); }
.page-btn.active { background: var(--mario-red); border-color: var(--mario-red); }

/* ===== DETAIL PAGE ===== */
.detail-wrapper { max-width: 600px; margin: 0 auto; padding: 16px 16px 100px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 50px;
  background: var(--mario-card); border: 1.5px solid var(--mario-border);
  font-family: var(--font-fredoka); font-size: 14px; color: var(--mario-text);
  margin-bottom: 16px; transition: all 0.18s;
}
.back-btn:hover { border-color: var(--mario-red); }
.detail-hero { display: flex; gap: 14px; margin-bottom: 20px; }
.detail-poster {
  width: 110px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden;
}
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.detail-info { flex: 1; }
.detail-title { font-family: var(--font-fredoka); font-size: 18px; line-height: 1.3; margin-bottom: 8px; }
.detail-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.genre-tag {
  padding: 4px 10px; border-radius: 50px;
  background: rgba(37,99,235,0.2); border: 1px solid rgba(37,99,235,0.4);
  font-size: 11px; font-weight: 700; color: var(--mario-sky); cursor: pointer;
}
.detail-desc { font-size: 13px; color: var(--mario-muted); line-height: 1.6; margin-bottom: 12px; }
.detail-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.meta-item { background: var(--mario-card); border-radius: var(--radius-sm); padding: 8px 10px; }
.meta-key { font-size: 10px; color: var(--mario-muted); font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
.meta-val { font-size: 13px; font-weight: 700; }
.glow-line { height: 2px; background: linear-gradient(90deg, transparent, var(--mario-red), transparent); margin: 16px 0; border-radius: 2px; }
.ep-section-title {
  font-family: var(--font-fredoka); font-size: 17px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.ep-count {
  background: var(--mario-red); color: white;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 50px;
}
.episode-list { display: flex; flex-direction: column; gap: 8px; }
.ep-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--mario-card); border-radius: var(--radius-sm);
  padding: 12px; cursor: pointer;
  border: 1.5px solid var(--mario-border);
  transition: all 0.18s;
}
.ep-item:hover { border-color: var(--mario-red); }
.ep-play-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--mario-red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ep-play-icon svg { width: 12px; height: 12px; fill: white; }
.ep-info { flex: 1; }
.ep-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.ep-date { font-size: 11px; color: var(--mario-muted); }
.watch-ep-progress-bar { height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 5px; }
.watch-ep-progress-fill { height: 100%; background: var(--mario-red); border-radius: 2px; }

/* ===== WATCH PAGE ===== */
.watch-wrapper { max-width: 600px; margin: 0 auto; padding-bottom: 100px; }
.watch-back-area { padding: 14px 16px 0; }
.watch-title-area { padding: 10px 16px; }
.watch-title { font-family: var(--font-fredoka); font-size: 16px; line-height: 1.3; }
.watch-video-area { width: 100%; }
.video-container { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.video-container iframe { width: 100%; height: 100%; border: none; }
.no-stream { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; color: var(--mario-muted); font-family: var(--font-fredoka); }
.no-stream-icon { font-size: 40px; }
.watch-servers-area { padding: 12px 16px; }
.server-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.server-tab {
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: var(--mario-card); border: 1.5px solid var(--mario-border);
  font-family: var(--font-fredoka); font-size: 14px; color: var(--mario-text);
  transition: all 0.18s;
}
.server-tab.active { background: var(--mario-red); border-color: var(--mario-red); }
.watch-naveps-area { padding: 0 16px 12px; }
.nav-eps { display: flex; gap: 10px; }
.ep-nav-btn {
  flex: 1; padding: 10px; border-radius: var(--radius-sm);
  background: var(--mario-card); border: 1.5px solid var(--mario-border);
  font-family: var(--font-fredoka); font-size: 13px; color: var(--mario-text);
  transition: all 0.18s;
}
.ep-nav-btn:hover:not(:disabled) { border-color: var(--mario-red); }
.ep-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.watch-eplist-area { padding: 0 16px 12px; }
.watch-ep-panel { background: var(--mario-card); border-radius: var(--radius); border: 1.5px solid var(--mario-border); overflow: hidden; }
.watch-ep-panel-header { padding: 12px 14px; font-family: var(--font-fredoka); font-size: 15px; border-bottom: 1.5px solid var(--mario-border); }
.watch-ep-list { max-height: 240px; overflow-y: auto; }
.watch-ep-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--mario-border); transition: background 0.15s; }
.watch-ep-item:hover { background: rgba(229,34,34,0.1); }
.watch-ep-item.active { background: rgba(229,34,34,0.18); border-left: 3px solid var(--mario-red); }
.watch-ep-item-title { font-size: 13px; font-weight: 700; }
.watch-download-area { padding: 0 16px 16px; }
.download-section { background: var(--mario-card); border-radius: var(--radius); border: 1.5px solid var(--mario-border); padding: 14px; }
.download-title { font-family: var(--font-fredoka); font-size: 15px; margin-bottom: 12px; }
.dl-group { margin-bottom: 12px; }
.dl-quality { font-size: 13px; font-weight: 700; color: var(--mario-yellow); margin-bottom: 6px; }
.dl-links { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-link {
  padding: 5px 12px; border-radius: var(--radius-sm);
  background: rgba(37,99,235,0.2); border: 1px solid rgba(37,99,235,0.4);
  font-size: 12px; font-weight: 700; color: var(--mario-sky);
  transition: all 0.18s;
}
.dl-link:hover { background: rgba(37,99,235,0.35); }

/* ===== HISTORY / LIBRARY ===== */
.history-section { max-width: 600px; margin: 0 auto; padding: 0 12px 100px; }
.history-panel { background: var(--mario-card); border-radius: var(--radius); border: 1.5px solid var(--mario-border); overflow: hidden; }
.history-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1.5px solid var(--mario-border); font-family: var(--font-fredoka); font-size: 16px; }
.history-clear-btn { padding: 6px 12px; border-radius: var(--radius-sm); background: rgba(229,34,34,0.2); border: 1px solid rgba(229,34,34,0.4); color: var(--mario-red); font-family: var(--font-fredoka); font-size: 13px; }
.history-list { display: flex; flex-direction: column; }
.history-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--mario-border); cursor: pointer; transition: background 0.15s; }
.history-item:hover { background: rgba(229,34,34,0.08); }
.history-thumb { width: 56px; height: 78px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.history-info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.history-title { font-size: 13px; font-weight: 700; }
.history-ep { font-size: 12px; color: var(--mario-muted); }
.history-time { font-size: 11px; color: var(--mario-muted); }
.history-progress-bar { height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 5px; }
.history-progress-fill { height: 100%; background: var(--mario-red); border-radius: 2px; }
.history-empty { padding: 40px 20px; text-align: center; color: var(--mario-muted); font-family: var(--font-fredoka); font-size: 16px; line-height: 1.8; }

/* ===== SETTING / PROFIL ===== */
.setting-wrap { max-width: 600px; margin: 0 auto; padding: 0 12px 100px; display: flex; flex-direction: column; gap: 10px; }
.profile-card {
  background: linear-gradient(135deg, var(--mario-red-dark), var(--mario-red));
  border-radius: var(--radius); padding: 24px;
  text-align: center; margin-bottom: 6px;
}
.profile-avatar { font-size: 48px; margin-bottom: 10px; }
.profile-name { font-family: var(--font-fredoka); font-size: 22px; margin-bottom: 4px; }
.profile-sub { font-size: 13px; opacity: 0.8; }
.setting-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--mario-card); border-radius: var(--radius);
  border: 1.5px solid var(--mario-border); padding: 14px 16px;
  cursor: pointer; transition: border-color 0.18s;
}
.setting-card:hover { border-color: var(--mario-red); }
.setting-icon { font-size: 22px; flex-shrink: 0; }
.setting-info { flex: 1; }
.setting-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.setting-desc { font-size: 12px; color: var(--mario-muted); }
.setting-badge {
  padding: 4px 10px; border-radius: 50px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--mario-border);
  font-size: 12px; font-weight: 700;
}
.setting-badge.on { background: rgba(22,163,74,0.2); border-color: var(--mario-green); color: var(--mario-green-light); }
.setting-arrow { font-size: 20px; color: var(--mario-muted); }

/* ===== BOTTOM NAVBAR ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: var(--mario-dark2);
  border-top: 2px solid var(--mario-border);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 1000; padding: 0 10px;
  backdrop-filter: blur(16px);
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; flex: 1; padding: 6px 4px;
  color: var(--mario-muted); transition: all 0.18s; border-radius: var(--radius-sm);
}
.bnav-item.active { color: var(--mario-red); }
.bnav-item.active .bnav-icon { transform: scale(1.15); }
.bnav-icon { font-size: 20px; transition: transform 0.18s; }
.bnav-label { font-size: 10px; font-weight: 700; font-family: var(--font-nunito); }

.bnav-center-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--mario-red), var(--mario-red-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(229,34,34,0.5);
  transition: all 0.2s;
}
.bnav-center-btn:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(229,34,34,0.6); }

/* ===== LOADING / EMPTY STATES ===== */
.loading-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 40vh; gap: 14px; color: var(--mario-muted); font-family: var(--font-fredoka); font-size: 16px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--mario-border); border-top-color: var(--mario-red); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 30vh; gap: 12px; color: var(--mario-muted); font-family: var(--font-fredoka); text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 40px; }
.empty-title { font-size: 18px; color: var(--mario-text); }

.loading-dots { display: flex; gap: 8px; align-items: center; padding: 20px 0; }
.loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--mario-red); animation: dotBounce 0.7s infinite alternate; }
.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotBounce { from { transform: translateY(0); opacity: 0.4; } to { transform: translateY(-8px); opacity: 1; } }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: calc(var(--bnav-h) + 14px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--mario-card); border: 1.5px solid var(--mario-red);
  color: var(--mario-text); padding: 10px 20px;
  border-radius: var(--radius); font-family: var(--font-fredoka); font-size: 14px;
  opacity: 0; pointer-events: none; white-space: nowrap;
  transition: all 0.3s; z-index: 2000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== SEARCH BAR FOCUS ===== */
input:focus { outline: none; }

/* ===== SCROLLBAR IN LIST ===== */
.watch-ep-list::-webkit-scrollbar { width: 4px; }
.watch-ep-list::-webkit-scrollbar-track { background: var(--mario-dark2); }
.watch-ep-list::-webkit-scrollbar-thumb { background: var(--mario-red); border-radius: 2px; }

/* ===== SAFE AREA ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: calc(env(safe-area-inset-bottom) + 4px); height: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
}
