/* ═══════════════════════════════════════════════════════
   ANIZONE 2026 — MAIN STYLESHEET
   ═══════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ── */
:root {
  --bg-main: #0d0f14;
  --bg-card: #161920;
  --bg-input: #1e2129;
  --surface-high: #1e2129;
  --border-color: #2a2d37;
  --text-main: #E2E2E9;
  --text-muted: #9aa0b4;
  --accent: #4285F4;
  --accent-light: #A8C7FA;
  --accent-glow: rgba(66,133,244,0.3);
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --sidebar-w: 220px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

[data-theme="light"] {
  --bg-main: #f1f3f8;
  --bg-card: #ffffff;
  --bg-input: #f0f2f7;
  --surface-high: #e8eaf0;
  --border-color: #dde0ea;
  --text-main: #1a1d2e;
  --text-muted: #6b7280;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; cursor: pointer; background: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; left: 0; top: 0; height: 100vh;
  width: var(--sidebar-w); background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column;
  z-index: 100; padding: 16px 12px;
  overflow-y: auto; overflow-x: hidden;
  transition: transform var(--transition);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px 18px; border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}
.sidebar-title { font-size: 18px; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sidebar-username { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sidebar-footer { display: flex; flex-direction: column; gap: 3px; padding-top: 12px; border-top: 1px solid var(--border-color); }

/* Settings button & dropdown */
.sidebar-settings-wrap { position: relative; flex-shrink: 0; }
.sidebar-settings-btn { width: 30px; height: 30px; border-radius: 8px; background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.sidebar-settings-btn:hover { background: rgba(66,133,244,0.12); border-color: rgba(66,133,244,0.4); color: var(--accent); }
.settings-dropdown { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); min-width: 180px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 6px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); z-index: 9999; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(-6px); transition: opacity 0.2s, transform 0.2s; }
.settings-dropdown.open { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.settings-dropdown-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; background: none; border: none; color: var(--text-main); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background var(--transition); text-align: left; }
.settings-dropdown-item:hover { background: rgba(255,255,255,0.06); }
.settings-logout { color: var(--danger) !important; }
.settings-logout:hover { background: rgba(248,113,113,0.1) !important; }
.settings-dropdown-divider { height: 1px; background: var(--border-color); margin: 4px 0; }
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  transition: all var(--transition); text-align: left; width: 100%;
}
.sidebar-item:hover { background: var(--surface-high); color: var(--text-main); }
.sidebar-item.active { background: rgba(66,133,244,0.12); color: var(--accent); }
.sidebar-item.active svg { stroke: var(--accent); }
.sidebar-item svg { flex-shrink: 0; stroke: currentColor; }
.sidebar-logout { color: var(--danger) !important; }
.sidebar-logout:hover { background: rgba(248,113,113,0.1) !important; }
.sidebar-logout svg { stroke: var(--danger) !important; }

/* User avatar */
.sidebar-user-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  cursor: pointer; overflow: hidden; position: relative;
  box-shadow: 0 0 0 2.5px var(--accent);
  transition: transform var(--transition);
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.sidebar-user-avatar:hover { transform: scale(1.08); }

/* ── TOP NAVBAR ── */
.navbar {
  position: fixed; top: 0; right: 0; left: 0;
  height: 60px; background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; z-index: 99;
  backdrop-filter: blur(12px);
}
@media (min-width: 900px) { .navbar { left: var(--sidebar-w); } }

.top-user-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
  cursor: pointer; overflow: hidden; position: relative;
  border: 2px solid var(--accent);
}
.top-user-avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Navbar settings wrapper */
.navbar-settings-wrap { position: relative; flex-shrink: 0; }
@media (min-width: 900px) { .navbar-settings-wrap { display: none !important; } }

/* Navbar settings dropdown — opens downward */
.navbar-settings-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 190px; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 14px;
  padding: 6px; box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  z-index: 9999; opacity: 0; pointer-events: none;
  transform: translateY(-6px); transition: opacity 0.2s, transform 0.2s;
}
.navbar-settings-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }

.top-search-bar {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: 99px; padding: 0 16px; height: 40px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.top-search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.top-search-bar svg { color: var(--text-muted); flex-shrink: 0; }
.top-search-bar input { flex: 1; background: none; border: none; outline: none; color: var(--text-main); font-family: inherit; font-size: 14px; }
.top-search-bar input::placeholder { color: var(--text-muted); }
.search-text-btn { background: var(--accent); color: #fff; border: none; border-radius: 99px; padding: 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background var(--transition); white-space: nowrap; }
.search-text-btn:hover { background: #5a95f5; }
.navbar-settings-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-high); border: 1px solid var(--border-color); color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); flex-shrink: 0; }
.navbar-settings-btn:hover { color: var(--text-main); background: var(--bg-input); }
.theme-toggle-btn { display: none; }
@media (min-width: 900px) { .navbar .theme-toggle-btn { display: none !important; } }

/* ── MAIN CONTENT ── */
#app {
  padding-top: 60px; min-height: 100vh;
}
@media (min-width: 900px) { #app { margin-left: var(--sidebar-w); } .sidebar { display: flex !important; } }
@media (max-width: 899px) { .sidebar { display: none; } }

/* ── LOADING ── */
#loading {
  position: fixed; inset: 0; background: rgba(13,15,20,0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9000; gap: 16px; backdrop-filter: blur(4px);
}
#loading p { color: var(--text-muted); font-size: 14px; }
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ── HERO SLIDER ── */
.hero-section-container { position: relative; width: 100%; overflow: visible; padding: 0 14px; }
.hero-slider {
  position: relative; width: 100%; height: 360px; overflow: hidden;
  border-radius: 20px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.45),
    0 4px 10px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transform: perspective(1000px) rotateX(1.5deg);
  transform-origin: top center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-slider:hover {
  transform: perspective(1000px) rotateX(0deg);
  box-shadow:
    0 18px 45px rgba(0,0,0,0.55),
    0 6px 16px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
@media (min-width: 900px) { .hero-slider { height: 440px; border-radius: 24px; } }
.hero-wrapper { display: flex; height: 100%; will-change: transform; }
.hero-slide {
  min-width: 100%; height: 100%; position: relative;
  overflow: hidden; cursor: pointer;
}
.hero-bg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(13,15,20,0.6) 60%, rgba(13,15,20,0.95) 100%);
}
.hero-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 20px 28px;
}
.hero-badge {
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  margin-bottom: 8px;
}
.hero-title { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 6px; line-height: 1.3; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
@media (min-width: 600px) { .hero-title { font-size: 26px; } }
.hero-meta { font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 99px; padding: 10px 22px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all var(--transition); box-shadow: 0 4px 15px var(--accent-glow);
}
.hero-btn:hover { transform: translateY(-2px); background: #5a95f5; }
.hero-dots { position: absolute; bottom: 12px; right: 20px; display: flex; gap: 6px; }
.hero-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.35); cursor: pointer; transition: all var(--transition); }
.hero-dot.active { background: #fff; width: 20px; border-radius: 99px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  backdrop-filter: blur(6px); z-index: 10;
  opacity: 0; pointer-events: none;
}
.hero-slider:hover .hero-arrow { opacity: 1; pointer-events: auto; }
.hero-arrow:hover { background: rgba(255,255,255,0.25); transform: translateY(-50%) scale(1.1); }
.hero-arrow-left  { left: 14px; }
.hero-arrow-right { right: 14px; }

/* ── SECTIONS ── */
.category-section { padding: 6px 0 0; }
.section-header { display: flex; align-items: center; gap: 10px; padding: 0 16px; margin-bottom: 14px; }
.section-header.mt-large { margin-top: 20px; }
.bar-accent { width: 4px; height: 20px; background: var(--accent); border-radius: 99px; flex-shrink: 0; }
.section-header h2 { font-size: 16px; font-weight: 700; }
.header-flex { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-bottom: 14px; margin-top: 20px; }
.more-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.more-link:hover { color: var(--accent-light); }

/* ── HERO -> SECTION GAP ── */
.hero-section-container { margin-bottom: 12px; }

/* ── HORIZONTAL SCROLL ── */
.horizontal-scroll { display: flex; gap: 12px; padding: 4px 16px 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.horizontal-scroll::-webkit-scrollbar { display: none; }

/* ── SCROLL CARD ── */
.scroll-card {
  min-width: 130px; max-width: 130px; cursor: pointer;
  animation: fadeInUp 0.4s ease both;
  transition: transform var(--transition);
}
.scroll-card:hover { transform: translateY(-5px); }

/* .scroll-card-outer: pegang SHADOW — tidak punya overflow:hidden
   supaya shadow tidak terpotong */
.scroll-card-outer {
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55), 0 3px 8px rgba(0,0,0,0.35);
  transition: box-shadow var(--transition);
}
.scroll-card:hover .scroll-card-outer {
  box-shadow: 0 18px 40px rgba(0,0,0,0.65), 0 6px 16px rgba(66,133,244,0.3);
}

/* .scroll-card-img: pegang overflow:hidden untuk clip rounded + zoom gambar */
.scroll-card-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-input);
  display: block;
}
.scroll-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; display: block; }
.scroll-card:hover .scroll-card-img img { transform: scale(1.07); }
.ep-badge {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
}
.scroll-card-title { font-size: 12px; font-weight: 600; color: var(--text-main); line-height: 1.4; }


/* ── ANIME GRID ── */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px; padding: 4px 16px 16px;
}
@media (min-width: 600px) { .anime-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

/* ── GENRE GRID ── */
.genre-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.genre-btn {
  padding: 8px 18px; border-radius: 99px;
  background: var(--bg-input); border: 1px solid var(--border-color);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.genre-btn:hover, .genre-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── PAGE TITLE ── */
.page-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; }

/* ── DETAIL VIEW ── */
.nav-back { padding: 16px; }
.nav-back button {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 14px; font-weight: 600;
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: 99px; padding: 8px 16px;
  transition: all var(--transition);
}
.nav-back button:hover { color: var(--text-main); background: var(--surface-high); }
.detail-breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; padding: 0 16px; }
.detail-title { font-size: 22px; font-weight: 800; padding: 0 16px; line-height: 1.3; margin-bottom: 4px; flex: 1; }
.detail-subtitle { font-size: 13px; color: var(--text-muted); padding: 0 16px 14px; }
.detail-main-layout { display: flex; gap: 16px; padding: 0 16px; margin-bottom: 16px; }
.detail-poster { width: 130px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 2/3; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info-col { flex: 1; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.badge.status { background: rgba(74,222,128,0.12); color: var(--success); border: 1px solid rgba(74,222,128,0.25); }
.badge.score { background: rgba(251,191,36,0.12); color: var(--warning); border: 1px solid rgba(251,191,36,0.25); }
.badge.type { background: rgba(66,133,244,0.12); color: var(--accent); border: 1px solid rgba(66,133,244,0.25); }
.detail-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.genre-tag { font-size: 11px; color: var(--text-muted); border: 1px solid var(--border-color); padding: 3px 9px; border-radius: 20px; background: var(--bg-input); }
.detail-season { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; }
.detail-synopsis { font-size: 13px; line-height: 1.7; color: var(--text-muted); margin-bottom: 14px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-action {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 99px;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
}
.btn-action:hover { background: #5a95f5; transform: translateY(-1px); }
.btn-fav-detail {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-input); border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition); margin: 0 16px;
  color: var(--text-muted);
}
.btn-fav-detail:hover, .btn-fav-detail.active { background: rgba(248,113,113,0.12); border-color: var(--danger); color: var(--danger); }
.btn-fav-detail.active svg { fill: var(--danger); stroke: var(--danger); }

.metadata-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px 16px; }
.meta-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px 14px; }
.meta-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 6px; }
.meta-value { font-size: 14px; font-weight: 700; color: var(--text-main); }
.meta-pill { display: inline-flex; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }

.ep-header-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 12px; }
.ep-header-title { font-size: 16px; font-weight: 700; }
.ep-range-badge { font-size: 12px; background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-muted); padding: 4px 12px; border-radius: 20px; }
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; padding: 0 16px 80px; }
.ep-box {
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 10px 6px; text-align: center;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all var(--transition); animation: fadeInUp 0.3s ease both;
}
.ep-box:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── WATCH VIEW ── */
.video-wrapper { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.video-wrapper iframe { width: 100%; height: 100%; border: none; }
.video-main-title { font-size: 16px; font-weight: 700; padding: 14px 16px 6px; }
.server-label { font-size: 12px; color: var(--text-muted); font-weight: 600; padding: 0 16px 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.server-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 80px; }
.server-tag {
  padding: 8px 16px; border-radius: 99px;
  background: var(--bg-input); border: 1px solid var(--border-color);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.server-tag:hover, .server-tag.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Download Section ── */
#download-section { padding: 0 16px 80px; }
.dl-format-group { margin-bottom: 20px; }
.dl-format-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  border-left: 3px solid var(--accent); padding-left: 8px;
  margin-bottom: 10px;
}
.dl-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.dl-row:last-child { border-bottom: none; }
.dl-res {
  font-size: 13px; font-weight: 700; color: var(--text);
  min-width: 52px;
}
.dl-links { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-btn {
  padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: var(--bg-input); border: 1px solid var(--border-color);
  color: var(--text-muted); text-decoration: none;
  transition: all var(--transition);
}
.dl-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: 64px;
  background: var(--bg-card); border-top: 1px solid var(--border-color);
  display: grid; grid-template-columns: repeat(5, 1fr);
  z-index: 99;
}
@media (min-width: 900px) { .bottom-nav { display: none !important; } }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-muted); font-size: 10px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.nav-item.active { color: var(--accent); }
.nav-item svg { stroke: currentColor; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h2 { font-size: 18px; margin: 16px 0 8px; color: var(--text-main); }
.empty-state p { font-size: 14px; }

/* ── SEARCH RESULTS ── */
.search-results-container { padding: 10px 0; }

/* ── TRENDING SECTION ── */
.trending-list { padding: 0 16px; }
.trending-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border-color);
  cursor: pointer; transition: background var(--transition);
}
.trending-item:hover { background: var(--surface-high); margin: 0 -16px; padding: 12px 16px; }
.trending-rank { font-size: 24px; font-weight: 900; color: var(--border-color); min-width: 36px; text-align: center; }
.trending-rank.top3 { background: linear-gradient(135deg, var(--accent), var(--accent-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.trending-img { width: 52px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-input); }
.trending-img img { width: 100%; height: 100%; object-fit: cover; }
.trending-info { flex: 1; min-width: 0; }
.trending-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.trending-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.trending-score { display: flex; align-items: center; gap: 4px; font-weight: 700; color: var(--warning); }

/* ── SCHEDULE SECTION ── */
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.schedule-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: all var(--transition); animation: fadeInUp 0.4s ease both;
}
.schedule-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(66,133,244,0.15); }
.schedule-card-img { aspect-ratio: 3/4; overflow: hidden; background: var(--bg-input); }
.schedule-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.schedule-card:hover .schedule-card-img img { transform: scale(1.07); }
.schedule-card-body { padding: 10px 12px; }
.schedule-card-title { font-size: 12px; font-weight: 700; margin-bottom: 5px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.schedule-card-meta { font-size: 11px; color: var(--text-muted); }
.schedule-day-badge { display: inline-block; background: rgba(66,133,244,0.12); color: var(--accent); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-bottom: 4px; }

/* ── NEWS SECTION ── */
.news-list { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.news-card {
  display: flex; gap: 12px; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 14px; cursor: pointer; transition: all var(--transition);
  animation: fadeInUp 0.4s ease both;
}
.news-card:hover { border-color: var(--accent); background: var(--surface-high); }
.news-img { width: 80px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-input); }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.news-info { flex: 1; min-width: 0; }
.news-title { font-size: 13px; font-weight: 700; margin-bottom: 5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.news-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.news-date { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* ── HOME TABS ── */
.home-tab-bar { display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto; scrollbar-width: none; margin-bottom: 4px; }
.home-tab-bar::-webkit-scrollbar { display: none; }
.home-tab {
  padding: 7px 16px; border-radius: 99px; white-space: nowrap;
  background: var(--bg-input); border: 1px solid var(--border-color);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
}
.home-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.home-tab-content { display: none; padding-bottom: 80px; }
.home-tab-content.active { display: block; }

/* ── MAL BADGE ── */
.mal-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(45,48,65,0.9); border: 1px solid var(--border-color);
  border-radius: 20px; padding: 4px 10px; font-size: 11px; font-weight: 600;
  color: var(--text-muted);
}
.mal-badge img { width: 14px; height: 14px; border-radius: 2px; }

/* ── DEVELOPER VIEW ── */
.social-profile-container { max-width: 600px; margin: 0 auto; padding-bottom: 80px; }
.social-banner { height: 130px; overflow: hidden; }
.social-banner img { width: 100%; height: 100%; object-fit: cover; }
.social-profile-header { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 20px 14px; margin-top: -30px; }
.social-avatar-wrapper { border-radius: 50%; border: 4px solid var(--bg-main); overflow: hidden; width: 72px; height: 72px; }
.social-avatar { width: 100%; height: 100%; object-fit: cover; }
.social-follow-btn { padding: 8px 22px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; border: none; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all var(--transition); }
.social-follow-btn:hover { background: #5a95f5; }
.social-follow-btn.following { background: var(--bg-input); color: var(--text-main); border: 1px solid var(--border-color); }
.social-info { padding: 4px 20px 16px; }
.social-name-wrapper { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.social-name { font-size: 18px; font-weight: 800; }
.verified-badge { flex-shrink: 0; }
.social-handle { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.social-bio { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin-bottom: 14px; }
.social-stats { display: flex; gap: 20px; }
.stat-item { display: flex; gap: 5px; align-items: baseline; }
.stat-num { font-size: 16px; font-weight: 800; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.social-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin: 0 20px; }
.social-tab { padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; transition: all var(--transition); }
.social-tab.active { color: var(--accent); border-color: var(--accent); }
.social-content { padding: 16px 20px; }
.doc-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; animation: fadeInUp 0.4s ease both; }
.doc-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.doc-card p { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ── PROFILE ── */
.profile-container { max-width: 600px; margin: 0 auto; padding: 0 0 80px; }

/* ── HEADER CARD ── */
.profile-header-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: visible; margin-bottom: 16px; animation: fadeInUp 0.4s ease; position: relative; }

/* Banner — taller, like fanbias */
.profile-banner { height: 170px; background: linear-gradient(135deg, #1a237e 0%, var(--accent) 50%, var(--accent-light) 100%); position: relative; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
@media (min-width: 600px) { .profile-banner { height: 190px; } }
.profile-banner-pattern { position: absolute; inset: 0; opacity: 0.15; background-image: radial-gradient(circle at 20% 50%, white 1px, transparent 1px), radial-gradient(circle at 80% 20%, white 1px, transparent 1px); background-size: 30px 30px; }

/* Avatar — flow-based overlap */
.profile-avatar-wrap { position: relative; flex-shrink: 0; width: 88px; height: 88px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-light)); display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; color: #fff; border: 4px solid var(--bg-card); overflow: hidden; z-index: 2; box-shadow: 0 4px 20px rgba(0,0,0,0.35); }
@media (min-width: 600px) { .profile-avatar-wrap { width: 98px; height: 98px; } }
.profile-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Avatar area row: avatar left, edit-btn right */
.profile-avatar-area { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 18px 0; margin-top: -44px; margin-bottom: 0; }

/* Info body */
.profile-info-body { padding: 12px 18px 20px; }
.profile-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.profile-name { font-size: 22px; font-weight: 800; }
.profile-email { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.profile-bio-text { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.6; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.profile-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.badge-role-admin { background: rgba(66,133,244,0.15); color: #7BAEF8; border: 1px solid rgba(66,133,244,0.3); }
.badge-role-user { background: rgba(154,160,180,0.1); color: var(--text-muted); border: 1px solid var(--border-color); }
.badge-method { background: rgba(168,199,250,0.08); color: var(--text-muted); border: 1px solid var(--border-color); }

/* Join meta */
.profile-join-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-bottom: 0; }
.profile-join-meta svg { opacity: 0.6; }

/* Stats row — single unified card */
.profile-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; }
.profile-stat-card { background: transparent; border: none; border-right: 1px solid var(--border-color); border-radius: 0; padding: 18px 10px; text-align: center; animation: fadeInUp 0.4s ease both; transition: background var(--transition); }
.profile-stat-card:last-child { border-right: none; }
.profile-stat-card:hover { background: rgba(66,133,244,0.07); }
.profile-stat-num { font-size: 24px; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.profile-stat-label { font-size: 10px; color: var(--text-muted); font-weight: 700; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.8px; }

/* 2-column body grid */
.profile-body-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 760px) { .profile-body-grid { grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; } }
.profile-col-left, .profile-col-right { display: flex; flex-direction: column; }

.profile-info-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; animation: fadeInUp 0.4s ease both; }
.profile-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 14px; }
.profile-info-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label { font-size: 12px; color: var(--text-muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.profile-info-label svg { width: 14px; height: 14px; }
.profile-info-value { font-size: 13px; font-weight: 600; color: var(--text-main); text-align: right; max-width: 220px; word-break: break-all; }
.profile-logout-btn { width: 100%; padding: 13px; background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.3); border-radius: var(--radius); color: var(--danger); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: all var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px; }
.profile-logout-btn:hover { background: rgba(248,113,113,0.18); transform: translateY(-1px); }
.profile-developer-btn { flex: 1; padding: 13px; background: rgba(66,133,244,0.08); border: 1px solid rgba(66,133,244,0.3); border-radius: var(--radius); color: var(--accent); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: all var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px; }
.profile-developer-btn:hover { background: rgba(66,133,244,0.18); }
.profile-edit-banner-btn { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 20px; background: rgba(13,15,20,0.65); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); color: #fff; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.profile-edit-banner-btn:hover { background: rgba(66,133,244,0.5); }

/* ── EDIT MODAL ── */
.edit-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: flex-end; justify-content: center; z-index: 9998; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
@media (min-width: 600px) { .edit-modal-overlay { align-items: center; } }
.edit-modal-overlay.show { opacity: 1; pointer-events: all; }
.edit-modal { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 24px 24px 0 0; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; transform: translateY(40px); transition: transform 0.35s cubic-bezier(0.34,1.2,0.64,1); font-family: inherit; }
@media (min-width: 600px) { .edit-modal { border-radius: 24px; } }
.edit-modal-overlay.show .edit-modal { transform: translateY(0); }
.edit-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.edit-modal-title { font-size: 16px; font-weight: 700; }
.edit-modal-close { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-input); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.edit-modal-close:hover { color: var(--text-main); }
.edit-modal-body { padding: 20px; }
.edit-banner-preview { height: 110px; border-radius: var(--radius); overflow: hidden; position: relative; background: linear-gradient(135deg,#1a237e,var(--accent),var(--accent-light)); margin-bottom: 20px; cursor: pointer; }
.edit-banner-pattern { position: absolute; inset: 0; opacity: 0.15; background-image: radial-gradient(circle at 20% 50%,white 1px,transparent 1px),radial-gradient(circle at 80% 20%,white 1px,transparent 1px); background-size: 30px 30px; pointer-events: none; }
.edit-avatar-preview { position: absolute; bottom: -18px; left: 16px; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--accent-light)); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; border: 3px solid var(--bg-card); overflow: hidden; cursor: pointer; }
.edit-avatar-overlay { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition); }
.edit-avatar-preview:hover .edit-avatar-overlay { opacity: 1; }
.edit-banner-change-btn { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 16px; background: rgba(13,15,20,0.6); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.15); color: #fff; font-family: inherit; font-size: 11px; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.edit-form-group { margin-bottom: 16px; }
.edit-form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 7px; }
.edit-form-input { width: 100%; padding: 12px 14px; background: var(--bg-input); border: 1.5px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-main); font-family: inherit; font-size: 14px; outline: none; transition: border-color var(--transition), box-shadow var(--transition); resize: none; }
.edit-form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.edit-char-count { text-align: right; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.color-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.color-preset { width: 36px; height: 36px; border-radius: 10px; border: 2.5px solid transparent; cursor: pointer; transition: transform 0.15s, border-color 0.15s; outline: none; }
.color-preset:hover { transform: scale(1.12); }
.color-preset.active { border-color: #fff; transform: scale(1.08); box-shadow: 0 0 0 2px var(--accent); }
.edit-save-btn { width: 100%; padding: 13px; background: linear-gradient(135deg, var(--accent), var(--accent-light)); border: none; border-radius: var(--radius); color: #fff; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: all var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; }
.edit-save-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-glow); }
.edit-save-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.edit-status { text-align: center; font-size: 13px; margin-top: 10px; min-height: 18px; }
.edit-status.success { color: var(--success); }
.edit-status.error { color: var(--danger); }

/* ── LOGOUT MODAL ── */
.logout-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.logout-modal-overlay.show { opacity: 1; pointer-events: all; }
.logout-modal { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 28px 28px 24px; width: 100%; max-width: 340px; margin: 20px; transform: scale(0.9); transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1); box-shadow: 0 25px 60px rgba(0,0,0,0.5); }
.logout-modal-overlay.show .logout-modal { transform: scale(1); }
.logout-modal-icon { font-size: 36px; text-align: center; margin-bottom: 12px; }
.logout-modal-title { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.logout-modal-desc { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 22px; line-height: 1.5; }
.logout-modal-btns { display: flex; gap: 10px; }
.logout-btn-cancel { flex: 1; padding: 11px; border-radius: var(--radius-sm); background: var(--surface-high); border: 1px solid var(--border-color); color: var(--text-muted); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.logout-btn-cancel:hover { color: var(--text-main); }
.logout-btn-confirm { flex: 1; padding: 11px; border-radius: var(--radius-sm); background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.35); color: var(--danger); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: all var(--transition); }
.logout-btn-confirm:hover { background: rgba(248,113,113,0.22); }

/* ── ANIMATIONS ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.skeleton { background: linear-gradient(90deg, var(--bg-input) 25%, var(--surface-high) 50%, var(--bg-input) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ═══════════════════════════════════════════════════
   PROFILE REDESIGN — FanBias Style
   ═══════════════════════════════════════════════════ */

/* Edit btn */
.pfb-edit-btn { display:flex; align-items:center; gap:5px; padding:8px 16px; background:var(--bg-card); border:1px solid var(--border-color); border-radius:20px; color:var(--text-main); font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:all var(--transition); margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.pfb-edit-btn:hover { background:rgba(66,133,244,0.12); border-color:rgba(66,133,244,0.4); }
.profile-join-meta { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--text-muted); margin-top:8px; }
.profile-join-meta svg { flex-shrink:0; }

/* Section header row */
.profile-section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.profile-section-title { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:var(--text-muted); }
.profile-sec-count { font-size:11px; color:var(--text-muted); }
.pfb-small-btn { padding:5px 12px; background:rgba(66,133,244,0.1); border:1px solid rgba(66,133,244,0.3); border-radius:20px; color:var(--accent); font-family:inherit; font-size:11px; font-weight:700; cursor:pointer; transition:all var(--transition); }
.pfb-small-btn:hover { background:rgba(66,133,244,0.2); }

/* Waifu Grid */
.waifu-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.waifu-card { position:relative; cursor:pointer; }
.waifu-card-img { width:100%; aspect-ratio:3/4; object-fit:cover; border-radius:8px; border:2px solid transparent; display:block; transition:border-color 0.2s; }
.waifu-card:hover .waifu-card-img { border-color:var(--accent); }
.waifu-ult-badge { position:absolute; top:5px; left:5px; background:var(--accent); color:#fff; font-size:9px; font-weight:800; padding:2px 6px; border-radius:4px; letter-spacing:.5px; }
.waifu-del-btn { position:absolute; top:5px; right:5px; background:rgba(0,0,0,0.7); border:none; color:#fff; width:22px; height:22px; border-radius:50%; font-size:13px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity 0.2s; }
.waifu-card:hover .waifu-del-btn { opacity:1; }
.waifu-card-name { font-size:11px; font-weight:700; margin-top:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.waifu-card-from { font-size:10px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.waifu-add-card { border:1.5px dashed var(--border-color); border-radius:8px; aspect-ratio:3/4; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; cursor:pointer; color:var(--text-muted); font-size:11px; transition:all var(--transition); }
.waifu-add-card:hover { border-color:var(--accent); color:var(--accent); background:rgba(66,133,244,0.05); }

/* Anime Fav List */
.animefav-list { display:flex; flex-direction:column; gap:6px; }
.animefav-item { display:flex; align-items:center; gap:10px; padding:8px; border-radius:8px; cursor:pointer; transition:background var(--transition); }
.animefav-item:hover { background:var(--bg-input); }
.animefav-poster { width:36px; height:52px; object-fit:cover; border-radius:5px; flex-shrink:0; background:var(--bg-input); }
.animefav-info { flex:1; min-width:0; }
.animefav-title { font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.animefav-meta { font-size:11px; color:var(--text-muted); margin-top:2px; }
.animefav-score { font-size:12px; color:#fbbf24; font-weight:700; flex-shrink:0; }
.animefav-del { background:none; border:none; color:var(--text-muted); font-size:18px; cursor:pointer; padding:0 4px; line-height:1; opacity:0; transition:opacity 0.2s; }
.animefav-item:hover .animefav-del { opacity:1; }
.animefav-empty { text-align:center; color:var(--text-muted); font-size:13px; padding:20px 0; }

/* PFB Modals */
.pfb-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.75); display:none; align-items:flex-end; justify-content:center; z-index:1000; }
.pfb-modal-overlay.open { display:flex; }
.pfb-modal { background:var(--bg-card); border-radius:16px 16px 0 0; width:100%; max-width:520px; max-height:80vh; display:flex; flex-direction:column; overflow:hidden; animation:slideUp 0.3s ease; }
@keyframes slideUp { from{transform:translateY(60px);opacity:0} to{transform:translateY(0);opacity:1} }
.pfb-modal-head { display:flex; align-items:center; justify-content:space-between; padding:16px 20px 12px; border-bottom:1px solid var(--border-color); flex-shrink:0; }
.pfb-modal-title { font-size:15px; font-weight:800; }
.pfb-modal-close { background:none; border:none; cursor:pointer; color:var(--text-muted); padding:4px; }
.pfb-modal-body { padding:16px 20px; overflow-y:auto; flex:1; }
.pfb-tab-row { display:flex; gap:6px; margin-bottom:12px; }
.pfb-tab { padding:6px 14px; border-radius:20px; font-size:12px; font-weight:700; cursor:pointer; border:1px solid var(--border-color); background:var(--bg-input); color:var(--text-muted); font-family:inherit; transition:all var(--transition); }
.pfb-tab.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.pfb-search-input { width:100%; padding:10px 14px; border:1px solid var(--border-color); border-radius:10px; font-size:13px; background:var(--bg-input); color:var(--text-main); font-family:inherit; margin-bottom:12px; outline:none; transition:border-color var(--transition); }
.pfb-search-input:focus { border-color:var(--accent); }
.pfb-loading { text-align:center; color:var(--text-muted); font-size:13px; padding:20px 0; }
.waifu-search-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.waifu-search-item { cursor:pointer; border-radius:8px; overflow:hidden; border:1px solid var(--border-color); transition:all var(--transition); }
.waifu-search-item:hover { border-color:var(--accent); transform:translateY(-2px); }
.waifu-search-item img { width:100%; aspect-ratio:3/4; object-fit:cover; display:block; }
.waifu-search-item-info { padding:5px 6px; }
.waifu-search-item-name { font-size:10px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.waifu-search-item-from { font-size:9px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.animefav-search-item { display:flex; align-items:center; gap:10px; padding:8px; border-radius:8px; cursor:pointer; transition:background var(--transition); border-bottom:1px solid var(--border-color); }
.animefav-search-item:last-child { border-bottom:none; }
.animefav-search-item:hover { background:var(--bg-input); }
