/* ═══════════════════════════════════════════════════════
   AnimeVault — Premium Streaming UI
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #050508;
  --bg-elevated: #0d0d14;
  --bg-card: #12121c;
  --bg-card-hover: #1a1a28;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(255, 255, 255, 0.15);

  /* Fallback Theme (Violet) */
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.4);
  --accent-secondary: #06b6d4;
  
  --danger: #ef4444;
  --success: #22c55e;
  --text: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Feature 4: Theme Settings Variablen */
[data-theme="violet"] { --accent: #7c3aed; --accent-light: #a78bfa; --accent-glow: rgba(124, 58, 237, 0.4); }
[data-theme="crimson"] { --accent: #e11d48; --accent-light: #fb7185; --accent-glow: rgba(225, 29, 72, 0.4); }
[data-theme="ocean"] { --accent: #0284c7; --accent-light: #38bdf8; --accent-glow: rgba(2, 132, 199, 0.4); }
[data-theme="sakura"] { --accent: #db2777; --accent-light: #f472b6; --accent-glow: rgba(219, 39, 119, 0.4); }
[data-theme="emerald"] { --accent: #059669; --accent-light: #34d399; --accent-glow: rgba(0, 150, 105, 0.4); }
[data-theme="sunset"] { --accent: #ea580c; --accent-light: #fb923c; --accent-glow: rgba(234, 88, 12, 0.4); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ─── Isolated Login Screen ───────────────────────────── */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a12 0%, #1a1a2e 50%, #0a0a12 100%);
}

.login-card {
  background: rgba(18, 18, 28, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.login-logo .logo-icon {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.login-logo .logo-text {
  font-size: 1.5rem;
}

.login-screen h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}

.login-sub {
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.login-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  margin-bottom: 20px;
  transition: var(--transition);
  pointer-events: auto;
  z-index: 10000;
}

.login-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  cursor: pointer;
  pointer-events: auto;
}

.login-remember input {
  pointer-events: auto;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 16px;
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-sm);
}

.login-submit {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  pointer-events: auto;
}

/* ─── App Content Container ───────────────────────────── */
.app-content {
  position: relative;
  z-index: 1;
}

body.is-locked .app-content {
  display: none !important;
}

body.is-locked .ambient-bg {
  display: none !important;
}

body.is-locked .app-loader {
  display: none !important;
}

/* ─── Ambient Background ─────────────────────────────── */
.ambient-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.35; animation: float 20s ease-in-out infinite; }
.orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, var(--accent), transparent 70%); top: -200px; right: -100px; }
.orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-secondary), transparent 70%); bottom: -150px; left: -100px; animation-delay: -7s; }
.orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, #ec4899, transparent 70%); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -14s; opacity: 0.2; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ─── Navbar ─────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center;
  padding: 16px 48px; background: rgba(5, 5, 8, 0.7); backdrop-filter: blur(20px) saturate(1.5); border-bottom: 1px solid var(--border); -webkit-app-region: drag;
}
.nav-left { display: flex; align-items: center; gap: 40px; }
.nav-right { display: flex; gap: 12px; -webkit-app-region: no-drag; }
.logo { display: flex; align-items: center; gap: 10px; -webkit-app-region: no-drag; }
.logo-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); border-radius: 8px; font-size: 12px; color: white; }
.logo-text { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.logo-accent { background: linear-gradient(135deg, var(--accent-light), var(--accent-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 4px; -webkit-app-region: no-drag; }
.nav-link { background: none; border: none; color: var(--text-secondary); font-family: var(--font); font-size: 0.9rem; font-weight: 500; padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); background: var(--surface-hover); }

.btn-icon { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); }
.btn-icon:hover { color: white; background: var(--surface); border-color: var(--border-active); }

/* ─── Buttons ────────────────────────────────────────── */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--accent), #6d28d9); color: white; border: none; padding: 10px 20px; border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: var(--transition); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--text); border: 1px solid var(--border); padding: 10px 20px; border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-active); }

/* ─── Views ──────────────────────────────────────────── */
.view { display: none; position: relative; z-index: 1; min-height: 100vh; padding-top: 64px; }
.view.active { display: block; }

/* ─── Hero ───────────────────────────────────────────── */
.hero { position: relative; height: 520px; overflow: hidden; }
.hero-backdrop { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; background-position: center top; transform: scale(1.05); transition: transform 8s ease; }
.hero:hover .hero-backdrop { transform: scale(1.0); }
.hero-gradient { position: absolute; inset: 0; background: linear-gradient(to right, rgba(5,5,8,0.95) 0%, rgba(5,5,8,0.4) 50%, transparent 100%), linear-gradient(to top, var(--bg) 0%, transparent 60%); }
.hero-content { position: absolute; bottom: 80px; left: 48px; max-width: 560px; z-index: 2; }
.hero-badge { display: inline-block; padding: 4px 12px; background: var(--accent); border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.hero-title { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 12px; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.hero-meta { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; }
.btn-hero-play { display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; background: white; color: #0a0a0a; border: none; border-radius: var(--radius-sm); font-family: var(--font); font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-hero-play:hover { transform: scale(1.04); box-shadow: 0 8px 32px rgba(255,255,255,0.15); }
.btn-hero-info { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; background: rgba(255,255,255,0.12); backdrop-filter: blur(10px); color: white; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-hero-info:hover { background: rgba(255,255,255,0.2); }

/* ─── Content Sections ───────────────────────────────── */
.content { padding: 32px 48px 64px; }
.section { margin-bottom: 48px; }
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.section-header h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.section-line { flex: 1; height: 1px; background: linear-gradient(to right, var(--border-active), transparent); }
.library-count { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.empty-hint { color: var(--text-muted); font-size: 0.9rem; padding: 8px 0; }

/* ─── Library Controls (Custom Dropdowns) ────────────── */
.library-controls { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  margin-bottom: 24px; 
  flex-wrap: wrap; 
  position: relative;
  z-index: 10; 
}

.custom-dropdown { 
  position: relative; 
}

.dropdown-btn { 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  background: var(--surface); 
  color: var(--text); 
  border: 1px solid var(--border); 
  padding: 10px 16px; 
  border-radius: var(--radius-sm); 
  font-family: var(--font); 
  font-size: 0.9rem; 
  font-weight: 500; 
  cursor: pointer; 
  transition: var(--transition); 
}

.dropdown-btn:hover, .dropdown-btn.active { 
  background: var(--surface-hover); 
  border-color: var(--accent); 
}

.dropdown-btn svg { 
  opacity: 0.7; 
  transition: transform 0.2s ease; 
}

.dropdown-btn.open svg { 
  transform: rotate(180deg); 
}

.dropdown-menu { 
  position: absolute; 
  top: calc(100% + 8px); 
  left: 0; 
  min-width: 220px;
  background: rgba(18, 18, 28, 0.95); 
  backdrop-filter: blur(20px); 
  border: 1px solid var(--border-active); 
  border-radius: var(--radius-md); 
  box-shadow: var(--shadow-card), 0 10px 30px rgba(0,0,0,0.5); 
  padding: 8px; 
  display: flex; 
  flex-direction: column; 
  gap: 4px;
  opacity: 0; 
  visibility: hidden; 
  transform: translateY(-10px); 
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
  z-index: 100;
}

.dropdown-menu.show { 
  opacity: 1; 
  visibility: visible; 
  transform: translateY(0); 
}

.dropdown-item { 
  background: transparent; 
  border: none; 
  color: var(--text-secondary); 
  text-align: left;
  padding: 10px 12px; 
  border-radius: var(--radius-sm); 
  font-family: var(--font); 
  font-size: 0.9rem; 
  cursor: pointer; 
  transition: var(--transition); 
}

.dropdown-item:hover { 
  background: var(--surface); 
  color: var(--text); 
}

.dropdown-item.active { 
  background: rgba(124, 58, 237, 0.15); 
  color: var(--accent-light); 
  font-weight: 600; 
}

.genre-menu { 
  width: 320px; 
  padding: 16px; 
}

.genre-filters { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

.genre-chip { 
  padding: 6px 12px; 
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: 16px; 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  cursor: pointer; 
  transition: var(--transition); 
}

.genre-chip:hover, .genre-chip.active { 
  background: var(--accent); 
  color: white; 
  border-color: var(--accent); 
  box-shadow: 0 0 12px var(--accent-glow); 
}

/* ─── Grid & Cards ───────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }

.horizontal-favorites {
  display: flex; gap: 24px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--border-active) transparent;
}
.horizontal-favorites .anime-card { flex: 0 0 220px; }

.anime-card { position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; transition: var(--transition); background: var(--bg-card); }
.anime-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-card), var(--shadow-glow); }
.card-image-wrap { position: relative; aspect-ratio: 2/3; overflow: hidden; }
.card-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.anime-card:hover .card-image-wrap img { transform: scale(1.08); }
.card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1a2e, #16213e); font-size: 3.5rem; }
.card-placeholder.small { font-size: 2.5rem; }
.card-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); }
.anime-card:hover .card-overlay { opacity: 1; }
.card-play-btn { width: 64px; height: 64px; border-radius: 50%; background: white; color: #0a0a0a; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transform: scale(0.8); transition: var(--transition); }
.anime-card:hover .card-play-btn { transform: scale(1); }
.card-play-btn:hover { transform: scale(1.1) !important; }
.delete-btn { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(239, 68, 68, 0.9); color: white; border: none; font-size: 1.2rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); z-index: 5; backdrop-filter: blur(4px); }
.anime-card:hover .delete-btn { opacity: 1; }
.delete-btn:hover { background: var(--danger); transform: scale(1.15); }
.card-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(255,255,255,0.15); }
.card-progress-fill { height: 100%; background: var(--accent); border-radius: 0 2px 2px 0; transition: width 0.3s ease; }
.card-info { padding: 16px 18px 18px; }
.card-title { font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; line-height: 1.3; }
.card-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; line-height: 1.2; }

/* ─── Next Up Cards ──────────────────────────────────── */
.horizontal-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--border-active) transparent; }
.next-card { position: relative; flex: 0 0 320px; display: flex; gap: 14px; padding: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); }
.next-card:hover { background: var(--bg-card-hover); border-color: var(--border-active); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.next-card-thumb { position: relative; width: 80px; height: 110px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.next-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.next-play-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); }
.next-card:hover .next-play-overlay { opacity: 1; }
.next-card-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.next-card-title { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-card-episode { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-card-time { font-size: 0.75rem; color: var(--accent-light); margin-top: 6px; font-weight: 500; }

.next-remove-btn {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; background: rgba(0,0,0,0.6); color: white;
  border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: var(--transition);
}
.next-card:hover .next-remove-btn { opacity: 1; }
.next-remove-btn:hover { background: var(--danger); transform: scale(1.1); }

/* ─── Empty State ────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.6; }
.empty-state h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* ─── Drop Zone ──────────────────────────────────────── */
.drop-zone { border: 2px dashed var(--accent); background: rgba(124, 58, 237, 0.06); border-radius: var(--radius-lg); padding: 48px; text-align: center; margin-bottom: 32px; transition: var(--transition); }
.drop-zone.drag-active { background: rgba(124, 58, 237, 0.15); border-color: var(--accent-light); transform: scale(1.01); }
.drop-inner h3 { font-size: 1.2rem; font-weight: 600; margin: 16px 0 8px; }
.drop-inner p { color: var(--text-muted); font-size: 0.9rem; }
.drop-icon { color: var(--accent-light); opacity: 0.7; }
.import-progress { display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: var(--bg-card); border-radius: var(--radius-md); margin-bottom: 24px; color: var(--text-secondary); font-size: 0.9rem; }
.import-spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Detail View ────────────────────────────────────── */
.detail-hero { position: relative; min-height: 480px; overflow: visible; isolation: isolate; }
.detail-backdrop { position: absolute; top: 0; left: 0; right: 0; height: 400px; background-size: cover; background-repeat: no-repeat; background-position: center 25%; transition: height 0.25s ease, opacity 0.25s ease; z-index: 0; }
.detail-gradient { position: absolute; top: 0; left: 0; right: 0; height: 400px; background: linear-gradient(to right, rgba(5,5,8,0.92) 0%, rgba(5,5,8,0.5) 60%, transparent 100%), linear-gradient(to top, var(--bg) 0%, rgba(5,5,8,0.3) 50%, rgba(5,5,8,0.6) 100%); transition: height 0.25s ease; z-index: 1; }
.detail-title { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 8px; }
.back-btn { position: absolute; top: -40px; left: 48px; z-index: 20; display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.6); backdrop-filter: blur(10px); border: 1px solid var(--border); color: white; padding: 8px 16px; border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: var(--transition); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.detail-hero-content { position: relative; z-index: 2; max-width: 640px; padding: 0 48px; margin-top: 70px; padding-bottom: 40px; animation: detailFadeIn 0.5s ease; }

.detail-hero.zoom-in .detail-backdrop {
  animation: heroZoomIn 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.detail-hero.zoom-in .detail-gradient {
  animation: heroGradientIn 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes heroZoomIn {
  0%   { opacity: 0; transform: scale(1.8); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes heroGradientIn {
  0%   { opacity: 0; }
  40%  { opacity: 0; }
  100% { opacity: 1; }
}

.episode-row {
  opacity: 0;
  transform: translateX(-60px);
  animation: episodeSlideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes episodeSlideIn {
  to { opacity: 1; transform: translateX(0); }
}

.detail-title { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 8px; margin-top: 20px; }

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

.detail-description-container {
  margin-bottom: 12px;
  max-width: 850px;
  line-height: 1.6;
}
.detail-description { 
  color: var(--text-secondary); 
  font-size: 0.95rem; 
}
.read-more-btn {
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  margin-left: 6px;
  display: inline-block;
  transition: var(--transition);
}
.read-more-btn:hover {
  background: var(--surface-hover);
  color: var(--accent-light);
  border-color: var(--border-active);
}
.detail-rating { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-bottom: 16px; 
  font-size: 1.1rem; 
}
.stars-gold { 
  color: #fbbf24; 
  letter-spacing: 2px; 
}
.rating-num { 
  font-size: 0.85rem; 
  color: var(--text-secondary); 
  font-weight: 600; 
}

.detail-meta { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.meta-tag { padding: 4px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }

.detail-actions { display: flex; gap: 12px; }

.btn-favorite-outline { display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; background: transparent; color: white; border: 1px solid var(--border-active); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-favorite-outline:hover { background: var(--surface-hover); }

.btn-favorite-outline.active-fav { background: rgba(234, 179, 8, 0.1); color: #eab308; border-color: #eab308; }
.btn-favorite-outline.active-watched { background: var(--surface-hover); color: var(--accent); border-color: var(--accent); }

.btn-danger-outline { display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; background: transparent; color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-danger-outline:hover { background: rgba(239, 68, 68, 0.1); border-color: var(--danger); }
.detail-body { padding: 32px 48px 64px; }

/* ─── Staffel Header & Season Tabs ───────────────────── */
.season-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}
.season-header .season-tabs { margin-bottom: 0; flex: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.season-tab { padding: 10px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); font-family: var(--font); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: var(--transition); }
.season-tab:hover { background: var(--surface-hover); color: var(--text); }
.season-tab.active { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 4px 16px var(--accent-glow); }

/* ─── Episode List ───────────────────────────────────── */
.episode-list { display: flex; flex-direction: column; gap: 4px; }
.episode-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); border: 1px solid transparent; }
.episode-row:hover { background: var(--surface); border-color: var(--border); }
.episode-row.current { background: rgba(124, 58, 237, 0.08); border-color: rgba(124, 58, 237, 0.2); }
.ep-number { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--surface); border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); flex-shrink: 0; }
.episode-row.current .ep-number { background: var(--accent); color: white; }
.ep-info { flex: 1; min-width: 0; }
.ep-title { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-filename { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.ep-progress { height: 2px; background: rgba(255,255,255,0.08); border-radius: 1px; margin-top: 8px; overflow: hidden; }
.ep-progress-fill { height: 100%; background: var(--accent); border-radius: 1px; }

.ep-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-check-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.ep-check-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--accent);
  transform: scale(1.05);
}

.ep-check-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 12px var(--accent-glow);
}

.ep-check-btn.active:hover {
  opacity: 0.9;
  transform: scale(1.08);
}

.ep-play-btn { 
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  background: var(--surface); 
  border: 1px solid var(--border); 
  color: var(--text); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  cursor: pointer; 
  flex-shrink: 0; 
  opacity: 0; 
  transition: var(--transition); 
}

.episode-row:hover .ep-play-btn { opacity: 1; }
.ep-play-btn:hover { background: var(--accent); border-color: var(--accent); color: white; }

/* ─── Player Modal ───────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 2000; background: #000; display: flex; flex-direction: column; }
.player-topbar { 
  padding: 16px 24px; 
  background: transparent !important; 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  z-index: 10; 
}
.player-back { display: inline-flex; align-items: center; gap: 10px; background: none; border: none; color: white; font-family: var(--font); font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: var(--transition); opacity: 0.8; }
.player-back:hover { opacity: 1; }
.player-container { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; }
#video-player { width: 100%; max-height: calc(100vh - 80px); outline: none; background: #000; }
.player-controls { display: flex; align-items: center; gap: 16px; width: 100%; padding: 12px 24px 20px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); position: relative; z-index: 20; }
.ctrl-btn { background: none; border: none; color: white; cursor: pointer; padding: 6px; border-radius: 4px; transition: var(--transition); opacity: 0.85; flex-shrink: 0; }
.ctrl-btn:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.volume-control { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.volume-slider-wrap { width: 0; overflow: hidden; transition: width 0.2s ease, opacity 0.2s ease; opacity: 0; }
.volume-control:hover .volume-slider-wrap, .volume-control:focus-within .volume-slider-wrap { width: 80px; opacity: 1; }
.volume-slider { -webkit-appearance: none; appearance: none; width: 80px; height: 4px; background: rgba(255, 255, 255, 0.15); border-radius: 2px; outline: none; cursor: pointer; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-light); box-shadow: 0 0 6px var(--accent-glow); cursor: pointer; }
.volume-slider::-moz-range-thumb { width: 12px; height: 12px; border: none; border-radius: 50%; background: var(--accent-light); box-shadow: 0 0 6px var(--accent-glow); cursor: pointer; }
.progress-wrap { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.progress-bar { position: relative; height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px; cursor: pointer; transition: height 0.15s; }
.progress-bar:hover { height: 6px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; width: 0%; transition: width 0.1s linear; pointer-events: none; }
.progress-thumb { position: absolute; top: 50%; width: 14px; height: 14px; background: var(--accent-light); border-radius: 50%; transform: translate(-50%, -50%); left: 0%; opacity: 0; transition: opacity 0.15s; pointer-events: none; box-shadow: 0 0 8px var(--accent-glow); }
.progress-bar:hover .progress-thumb { opacity: 1; }
.time-display { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.time-sep { opacity: 0.4; }
.time-finish { margin-left: 8px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, 0.2); color: var(--accent-light); font-weight: 500; }

.ctrl-btn-text {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.ctrl-btn-text:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-light);
}

.speed-control-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.speed-dropup {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: rgba(18, 18, 28, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
  min-width: 90px;
  animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.speed-option {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.speed-option:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.speed-option.active {
  background: var(--accent);
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.skip-overlay { position: absolute; bottom: 80px; right: 40px; z-index: 100; background: rgba(18, 18, 28, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--border-active); border-radius: var(--radius-md); padding: 16px 20px; box-shadow: var(--shadow-card); animation: slideInBottom 0.3s ease-out; }
@keyframes slideInBottom { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.skip-content { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.skip-text { font-size: 0.95rem; font-weight: 500; color: var(--text); }
.skip-timer-count { color: var(--accent-light); font-weight: 700; }
.skip-actions { display: flex; gap: 8px; }
.skip-btn { padding: 8px 16px; font-size: 0.85rem; }

.settings-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.settings-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); pointer-events: auto; animation: fadeInBackdrop 0.25s ease; }
.settings-modal.hidden .settings-backdrop { pointer-events: none; }
.settings-panel { position: relative; width: 100%; max-width: 500px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); pointer-events: auto; z-index: 1001; animation: popInPanel 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popInPanel {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.settings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.settings-header h2 { font-size: 1.5rem; font-weight: 700; }
.settings-close { background: transparent; border: none; color: var(--text-secondary); font-size: 1.8rem; cursor: pointer; transition: var(--transition); }
.settings-close:hover { color: white; }
.settings-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 0.95rem; color: var(--text); }
.settings-input { width: 80px; background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 6px 12px; border-radius: var(--radius-sm); font-family: var(--font); text-align: right; outline: none; transition: var(--transition); }
.settings-input:focus { border-color: var(--accent); background: var(--surface-hover); }

.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.theme-option { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font); cursor: pointer; transition: var(--transition); }
.theme-option:hover { background: var(--surface-hover); }
.theme-option.active { border-color: var(--accent); background: rgba(255,255,255,0.08); box-shadow: 0 0 12px var(--accent-glow); }
.theme-preview { width: 20px; height: 20px; border-radius: 50%; }
.theme-violet { background: #7c3aed; }
.theme-crimson { background: #e11d48; }
.theme-ocean { background: #0284c7; }
.theme-sakura { background: #db2777; }
.theme-emerald { background: #059669; }
.theme-sunset { background: #ea580c; }

/* ─── Toast ──────────────────────────────────────────── */
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px); padding: 12px 24px; background: var(--bg-card); border: 1px solid var(--border-active); border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; z-index: 3000; opacity: 0; transition: all 0.3s ease; backdrop-filter: blur(20px); box-shadow: var(--shadow-card); pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { border-color: rgba(34, 197, 94, 0.3); color: var(--success); }
.toast-error { border-color: rgba(239, 68, 68, 0.3); color: var(--danger); }

/* ─── Scrollbar komplett ausblenden ──────────────────── */
* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 12px 20px; }
  .content, .detail-body { padding: 20px; }
  .hero-content, .detail-hero-content { left: 20px; }
  .hero-title { font-size: 2rem; }
  .detail-title { font-size: 1.8rem; }
  .nav-links { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .theme-grid { grid-template-columns: 1fr; }
}

/* ─── Search Bar ─────────────────────────────────────── */
.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  margin: 0 24px;
  -webkit-app-region: no-drag;
}

.search-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

#search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px 10px 42px;
  border-radius: 24px;
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

#search-input:focus {
  background: var(--surface-hover);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  margin-top: 12px;
  background: rgba(18, 18, 28, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), 0 10px 30px rgba(0,0,0,0.5);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--surface-hover);
}

.search-result-banner {
  width: 45px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.search-result-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ─── Auto-Hide für Video Player Controls ─────────── */
.player-header,
.player-controls,
.player-top,
#player-episode-title,
#close-player,
#player-modal .player-overlay {
  transition: opacity 0.3s ease;
}

#player-modal.idle {
  cursor: none;
}

#player-modal.idle .player-header,
#player-modal.idle .player-controls,
#player-modal.idle .player-top,
#player-modal.idle #player-episode-title,
#player-modal.idle #close-player,
#player-modal.idle .player-overlay {
  opacity: 0;
  pointer-events: none;
}

/* ─── Ladescreen ─────────────────────────────────────── */
.app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.app-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--surface);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loader-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
  animation: pulse 2s infinite;
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

body.player-active .ambient-bg,
body.player-active .navbar,
body.player-active header,
body.player-active .content {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

body.player-active #player-modal,
body.player-active .player-modal {
  background: #000000 !important;
  backdrop-filter: none !important;
}

/* ─── Admin Notification Dropdown ───────────────────── */
.notify-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 200;
  overflow: hidden;
}

.notify-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.notify-header h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.notify-count-header {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.notify-list {
  max-height: 400px;
  overflow-y: auto;
}

.notify-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.notify-item:hover {
  background: var(--surface);
}

.notify-item-info {
  flex: 1;
  min-width: 0;
}

.notify-item-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notify-item-user {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notify-item-actions {
  display: flex;
  gap: 8px;
  margin-left: 12px;
}

.notify-action-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.notify-action-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.notify-action-btn.approve:hover {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.notify-action-btn.reject:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.notify-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── Admin Drawer ──────────────────────────────────── */
.admin-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

.admin-drawer.hidden .drawer-backdrop {
  pointer-events: none;
}

.drawer-panel {
  position: relative;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  z-index: 301;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.drawer-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.drawer-close:hover {
  background: var(--surface);
  color: var(--text);
}

.drawer-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* ─── User Accordion ─────────────────────────────────── */
.user-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.user-accordion-item:hover {
  border-color: var(--border-active);
}

.user-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  background: var(--bg-card);
  transition: var(--transition);
}

.user-accordion-header:hover {
  background: var(--surface);
}

.user-accordion-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-accordion-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
}

.user-accordion-name {
  font-weight: 500;
  color: var(--text);
}

.user-accordion-role {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  margin-left: 8px;
}

.user-accordion-role.admin {
  background: rgba(124, 58, 237, 0.2);
  color: var(--accent-light);
}

.user-accordion-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.user-accordion-toggle:hover {
  color: var(--text);
}

.user-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  border-top: 1px solid var(--border);
}

.user-accordion-content.open {
  max-height: 80vh;
  overflow-y: auto;
  pointer-events: auto;
}

.user-accordion-body {
  padding: 16px;
  pointer-events: auto;
}

.user-form-group {
  margin-bottom: 16px;
}

.user-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.user-form-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  transition: var(--transition);
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.user-form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.anime-library-checklist {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--bg);
}

.anime-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.anime-checklist-item:hover {
  background: var(--surface);
  border-color: var(--border-active);
}

.anime-checklist-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.anime-checklist-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.anime-checklist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anime-checklist-label {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  font-weight: 500;
}

.user-accordion-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.user-accordion-actions .btn-primary,
.user-accordion-actions .btn-danger-outline {
  flex: 1;
  font-size: 0.8rem;
  padding: 8px 12px;
}

/* ─── Request Modal (Gefixt & Überarbeitet) ─────────── */
#request-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(10px);
}

#request-modal.hidden {
  display: none !important;
}

#request-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.request-panel {
  position: relative;
  width: 90%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: #12131c;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px var(--accent-glow);
  overflow: hidden;
  z-index: 10;
}

#request-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#request-modal .modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

#request-modal .modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

#request-modal .modal-close:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

#request-modal .modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.request-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ─── Abstand zwischen Suche, Genre-Filter und Liste ─── */
.request-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}


.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--surface);
}

.request-card .card-overlay {
  opacity: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  align-items: flex-end;
  padding-bottom: 16px;
}
.request-card.already-unlocked .card-image-wrap img {
  filter: brightness(0.6);
}
.request-card .request-ask-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.request-card .request-ask-btn:hover {
  filter: brightness(1.1);
}
.request-card .request-ask-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.request-card .request-unlocked-badge {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 600;
}

.request-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.request-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.request-chip:hover {
  border-color: var(--border-active);
  color: var(--text);
}
.request-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.request-anime-status {
  margin-left: auto;
  flex-shrink: 0;
}
.request-ask-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.request-ask-btn:hover {
  filter: brightness(1.1);
}
.request-ask-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.request-unlocked-badge {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 600;
}
.request-popular-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75rem;
  color: #fbbf24;
}
.request-anime-item.already-unlocked {
  opacity: 0.75;
}

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

/* ─── Genre Dropdown Menü & Chips (Library-Stil) ─── */
.request-controls .genre-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-card, #14141f);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 16px;
  width: 320px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: none; /* Standardmäßig versteckt */
}

/* Wenn das Dropdown offen ist (entweder .active oder .open Klasse) */
.request-controls .custom-dropdown.open .genre-menu,
.request-controls .genre-menu.active {
  display: flex;
}

.genre-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
}

.genre-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
}

/* Falls ein Genre ausgewählt/aktiv ist */
.genre-chip.active {
  background: var(--accent, #3b82f6);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Request-Modal: Genre-Select im Library-Dropdown-Stil ─── */
.request-filter {
  position: relative;
}

.request-filter .custom-select,
#request-genre-filter.custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 200px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 42px 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.request-filter .custom-select:hover,
#request-genre-filter.custom-select:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-active);
}

.request-filter .custom-select:focus,
#request-genre-filter.custom-select:focus {
  outline: none;
  background-color: var(--surface-hover);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.request-filter .custom-select option,
#request-genre-filter.custom-select option {
  background: #12121c;
  color: var(--text);
  padding: 10px;
}

.request-filter .custom-select option:checked,
.request-filter .custom-select option:hover,
#request-genre-filter.custom-select option:checked,
#request-genre-filter.custom-select option:hover {
  background: var(--accent);
  color: #ffffff;
}

.request-search {
  flex: 1;
  position: relative;
}

.request-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.request-search input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.request-search::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.5;
}

.request-anime-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px; /* Mehr Innenabstand für das gesamte Feld */
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  overflow: hidden;
}

.request-anime-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
}

.request-anime-thumb {
  width: 65px;   /* Hier von 48px auf 65px vergrößert */
  height: 95px;  /* Hier von 68px auf 95px vergrößert */
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.request-anime-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.request-anime-info {
  flex: 1;
  min-width: 0;
}

.request-anime-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.request-anime-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Requests List View ─────────────────────────────── */
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.request-item:hover {
  border-color: var(--border-active);
}

.request-item-info {
  flex: 1;
  min-width: 0;
}

.request-item-anime {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.request-item-status {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.request-item-status.pending {
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
}

.request-item-status.approved {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.request-item-status.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ─── Auto-scroll containers ─────────────────────────── */
.detail-description {
  display: block;
  max-height: 100px;
  overflow: hidden;
  line-height: 1.6;
  transition: max-height 0.3s ease;
}

.detail-description.expanded {
  max-height: 2000px;
}

.read-more-btn {
  transition: transform 0.2s ease, background 0.2s ease;
}
.read-more-btn:active {
  transform: scale(0.94);
}

.detail-description::-webkit-scrollbar,
.notify-list::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar,
.user-accordion-content::-webkit-scrollbar,
.anime-library-checklist::-webkit-scrollbar,
.request-anime-list::-webkit-scrollbar {
  width: 6px;
}

.detail-description::-webkit-scrollbar-thumb,
.notify-list::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb,
.user-accordion-content::-webkit-scrollbar-thumb,
.anime-library-checklist::-webkit-scrollbar-thumb,
.request-anime-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.detail-description::-webkit-scrollbar-thumb:hover,
.notify-list::-webkit-scrollbar-thumb:hover,
.drawer-body::-webkit-scrollbar-thumb:hover,
.user-accordion-content::-webkit-scrollbar-thumb:hover,
.anime-library-checklist::-webkit-scrollbar-thumb:hover,
.request-anime-list::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}


/* ─── Globales Klick-Feedback für Buttons ────────────── */
.btn-primary:active,
.btn-secondary:active,
.btn-favorite-outline:active,
.btn-danger-outline:active,
.btn-icon:active,
.season-tab:active,
.theme-option:active {
  transform: scale(0.96);
}

.btn-primary, .btn-secondary, .btn-favorite-outline, .btn-danger-outline, .btn-icon {
  transition: var(--transition), transform 0.15s ease;
}

/* ─── Login-Logs Drawer ──────────────────────────────── */
.logs-panel { width: 560px; }
.logs-panel .drawer-header { justify-content: flex-start; gap: 16px; }
.logs-panel .drawer-close { margin-left: auto; }

.logs-view-toggle { display: flex; background: var(--surface); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.logs-toggle-btn { background: transparent; border: none; color: var(--text-secondary); padding: 6px 14px; border-radius: 6px; font-family: var(--font); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.logs-toggle-btn.active { background: var(--accent); color: white; box-shadow: 0 2px 8px var(--accent-glow); }

.log-session-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 10px; overflow: hidden; transition: var(--transition); }
.log-session-item:hover { border-color: var(--border-active); }
.log-session-header { display: grid; grid-template-columns: 20px 1.5fr 1fr 1.5fr; align-items: center; padding: 14px 16px; cursor: pointer; gap: 12px; }
.log-session-header:hover { background: var(--surface); }
.log-toggle-icon { color: var(--text-secondary); font-size: 0.7rem; transition: transform 0.25s ease; display: inline-block; }
.log-session-header.open .log-toggle-icon { transform: rotate(180deg); }
.log-session-user { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.log-session-ip { color: var(--text-secondary); font-size: 0.82rem; padding-left: 12px; border-left: 1px solid var(--border); }
.log-session-date { color: var(--text-secondary); font-size: 0.82rem; padding-left: 12px; border-left: 1px solid var(--border); text-align: right; }

.log-session-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; border-top: 1px solid transparent; background: rgba(0,0,0,0.15); }
.log-session-content.open { max-height: 600px; overflow-y: auto; border-top-color: var(--border); }
.log-watch-entry { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 46px; border-bottom: 1px solid var(--border); }
.log-watch-entry:last-child { border-bottom: none; }
.log-watch-thumb { width: 32px; height: 44px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.log-watch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.log-watch-title { flex: 1; font-size: 0.85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-watch-time { font-size: 0.8rem; color: var(--accent-light); font-weight: 500; flex-shrink: 0; }

.logs-range-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.logs-custom-range { display: flex; align-items: center; gap: 8px; }
.logs-custom-range input[type="date"] { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.85rem; }

.logs-graph-container { display: flex; align-items: flex-end; gap: 10px; min-height: 220px; padding: 20px 16px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); overflow-x: auto; }
.logs-graph-bar-wrap { flex: 0 0 auto; width: 36px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.logs-graph-bar { width: 100%; background: linear-gradient(180deg, var(--accent-light), var(--accent)); border-radius: 4px 4px 0 0; transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 0 12px var(--accent-glow); min-height: 2px; }
.logs-graph-bar-count { font-size: 0.72rem; color: var(--text-secondary); font-weight: 600; }
.logs-graph-bar-label { font-size: 0.65rem; color: var(--text-muted); white-space: nowrap; }

/* ─── Account-Sperr-Indikator ────────────────────────── */
.account-lock-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
}
.account-lock-badge span {
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
}
.account-unlock-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
}
.account-status-ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ===== AnimeVault: Offline-Button (Fortschritt als Fuellung) ===== */
.offline-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-width: 8.5rem;
  padding: .4rem .8rem;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: inherit;
  font: inherit;
  font-size: .8rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.offline-btn:hover { background: rgba(255, 255, 255, .12); }
.offline-btn::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: var(--progress, 0%);
  background: var(--accent, #7c5cff);
  opacity: .45;
  transition: width .25s linear;
}
.offline-btn[data-state="done"] { border-color: #3ecf8e; }
.offline-btn[data-state="error"] { border-color: #ff5c6c; }

.app-download-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1.1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cff, #4f8cff);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
}
.app-download-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* ===== Nur in der Desktop-App ===== */
.offline-btn, .offline-season-btn { display: none; }
html.offline-ready .offline-btn, html.offline-ready .offline-season-btn { display: inline-block; }
html.app-mode #app-download-group { display: none; }

/* ===== Offline-Speicher (nur Desktop-App) ===== */
#offline-manage-group { display: none; }
html.offline-ready #offline-manage-group { display: block; }
.offline-delete-btn {
  padding: .55rem 1rem;
  border: 1px solid #ff5c6c;
  border-radius: 8px;
  background: rgba(255, 92, 108, .12);
  color: #ff8a95;
  font: inherit;
  cursor: pointer;
}
.offline-delete-btn:hover:not(:disabled) { background: rgba(255, 92, 108, .25); }
.offline-delete-btn:disabled { opacity: .4; cursor: default; }

/* ===== Staffel-Button (nur Desktop-App) ===== */
.offline-season-btn {
  margin-left: .5rem;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: inherit;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}
.offline-season-btn:hover { background: rgba(255, 255, 255, .12); }
