:root {
  --bg-main: #0a0a0a;
  --bg-card: #161616;
  --accent: #e50914;
  --accent-2: #b0060f;
  --text-main: #eeeeee;
  --text-muted: #999999;
  --border: #2a2a2a;
  --glass: rgba(30, 30, 30, 0.6);
}
body.anime-mode {
  --accent: #e50914;
  --accent-2: #b0060f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { cursor: pointer; font-family: inherit; transition: 0.2s ease; }
.hidden { display: none !important; }
a.link { color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 500; }
input[type=text], input[type=password], input[type=number], textarea {
  width: 100%; padding: 14px; margin: 8px 0; background: var(--glass);
  border: 1px solid var(--border); border-radius: 12px; color: #fff; font-size: 15px; resize: vertical;
}
input[type=file] {
  width: 100%; padding: 12px; margin: 8px 0; background: var(--glass);
  border: 1px dashed var(--border); border-radius: 12px; color: var(--text-muted); font-size: 13px;
}
input[type=file]::file-selector-button {
  background: var(--accent, #e50914); color: #fff; border: none; border-radius: 8px;
  padding: 8px 14px; margin-right: 10px; font-size: 13px; font-weight: 700; cursor: pointer;
}
label { font-size: 12px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }

/* ===================== AUTH ===================== */
.auth-box { max-width: 380px; margin: 60px auto; padding: 35px 30px; background: var(--bg-card); border-radius: 20px; border: 1px solid var(--border); }
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand-emoji { font-size: 40px; display: block; margin-bottom: 8px; }
.auth-brand h2 { margin: 0; font-weight: 800; }
.auth-brand-sub { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }
.mode-pill-row { display: flex; gap: 10px; margin-bottom: 16px; }
.mode-pill { flex: 1; padding: 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--glass); color: #ccc; font-weight: 700; font-size: 14px; }
.mode-pill.manga.active { background: linear-gradient(135deg, #e50914, #b0060f); color: #fff; border-color: #e50914; }
.mode-pill.anime.active { background: linear-gradient(135deg, #e50914, #b0060f); color: #fff; border-color: #e50914; }
.btn { width: 100%; padding: 15px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; margin-top: 15px; text-transform: uppercase; }
.btn.secondary { background: #222; color: #ccc; background-image: none; }
.btn.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.err { color: #ff5b5b; font-size: 13px; margin-top: 8px; text-align: center; font-weight: 600; }
.center { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }

/* ===================== TELA DE TROCA DE SISTEMA (loading + som) ===================== */
.switch-loader {
  position: fixed; inset: 0; z-index: 999; background: radial-gradient(circle at 50% 30%, #17121f, #08070c 70%);
  display: flex; align-items: center; justify-content: center;
}
body.anime-mode .switch-loader { background: radial-gradient(circle at 50% 30%, #0d1a30, #06090f 70%); }
.switch-loader-inner { text-align: center; padding: 20px; max-width: 320px; }
.switch-logo-ring {
  width: 96px; height: 96px; margin: 0 auto 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 42px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.15), 0 0 40px rgba(139, 92, 246, 0.35);
  animation: pulseRing 1.2s ease-in-out infinite;
}
body.anime-mode .switch-logo-ring { box-shadow: 0 0 0 6px rgba(79, 140, 255, 0.15), 0 0 40px rgba(79, 140, 255, 0.35); }
@keyframes pulseRing { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.switch-loader-title { font-size: 24px; font-weight: 900; letter-spacing: 1.5px; margin: 0 0 6px; }
.switch-loader-bar-track { width: 100%; height: 6px; background: rgba(255,255,255,0.08); border-radius: 20px; overflow: hidden; margin: 18px 0 10px; }
.switch-loader-bar-fill { height: 100%; width: 0%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); transition: width 0.1s linear; }
.switch-loader-sub { color: var(--text-muted); font-size: 13px; margin: 0; }

/* ===================== MANUTENÇÃO ===================== */
.maint-modal-overlay { position: fixed; inset: 0; background: rgba(5,5,5,0.94); z-index: 998; display: flex; align-items: center; justify-content: center; padding: 20px; }
.maint-modal { max-width: 420px; width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 35px 30px; text-align: center; }

/* ===================== HOME (estilo Netflix) ===================== */
#homeApp { min-height: 100vh; padding-bottom: 90px; }
.home-header { position: fixed; top: 0; left: 0; right: 0; z-index: 15; background: transparent; padding: 14px 18px; border-bottom: none; transition: background 0.25s ease, backdrop-filter 0.25s ease; }
.home-header.scrolled { background: rgba(10,10,10,0.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.home-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0; }
.home-brand { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.home-brand strong { display: block; font-size: 15px; font-weight: 900; letter-spacing: 0.5px; color: var(--accent); }
.home-brand-user { display: block; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.home-header-actions { display: flex; gap: 8px; }
.icon-btn { background: var(--glass); border: 1px solid var(--border); border-radius: 10px; color: #eee; padding: 8px 10px; display: flex; align-items: center; justify-content: center; }
.home-search-wrap { display: flex; gap: 8px; margin-top: 12px; }
.home-search { margin: 0 !important; }
.home-search-go { padding: 0 20px; border: none; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; }
.home-header:not(.search-open) .home-search-wrap { display: none; }

/* ---- Hero em destaque ---- */
.home-hero { position: relative; width: 100%; height: 62vh; min-height: 380px; max-height: 620px; overflow: hidden; background: #000 center/cover no-repeat; }
.home-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: background-image 0.4s ease; }
.home-hero-scrim-bottom { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-main) 2%, rgba(10,10,10,0.15) 45%, transparent 75%); }
.home-hero-scrim-side { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.85) 15%, transparent 65%); }
.home-hero-content { position: absolute; left: 0; right: 0; bottom: 26px; padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.home-hero-badge { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--accent); text-transform: uppercase; }
.home-hero-title { font-size: 26px; font-weight: 900; margin: 0; line-height: 1.15; text-shadow: 0 2px 10px rgba(0,0,0,0.6); }
.home-hero-synopsis { font-size: 13px; color: #ddd; max-width: 480px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.home-hero-actions { display: flex; gap: 10px; margin-top: 6px; }
.home-hero-btn { display: flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 8px; border: none; font-weight: 800; font-size: 14px; cursor: pointer; }
.home-hero-btn.play { background: #fff; color: #111; }
.home-hero-btn.info { background: rgba(109,109,110,0.65); color: #fff; }
.home-hero-btn svg { width: 18px; height: 18px; }
.home-hero-dots { position: absolute; bottom: 26px; right: 20px; display: flex; gap: 6px; }
.home-hero-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.35); transition: background 0.2s, width 0.2s; }
.home-hero-dots span.active { background: var(--accent); width: 18px; border-radius: 4px; }

.home-main { padding: 0 0 10px; margin: 0 auto; }
.home-main.no-hero { padding-top: 80px; max-width: 720px; padding-left: 18px; padding-right: 18px; }
.home-section { margin-bottom: 26px; }
.home-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 18px; }
.home-section-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.home-cloud-count { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.home-empty { color: #777; font-size: 13px; text-align: center; padding: 20px 0; }

/* ---- Carrosséis (mesma estrutura para "continue" e "nuvem") ---- */
.home-continue-row, .home-carousel-row { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 4px 18px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.home-continue-row::-webkit-scrollbar, .home-carousel-row::-webkit-scrollbar { display: none; }
.continue-card { flex: 0 0 132px !important; width: 132px !important; max-width: 132px !important; min-width: 132px !important; overflow: hidden; cursor: pointer; scroll-snap-align: start; }
.continue-card-cover { position: relative; width: 132px; height: 182px; border-radius: 6px; overflow: hidden; background: #111; border: 1px solid rgba(255,255,255,0.06); }
.continue-card-cover img { width: 132px !important; height: 182px !important; max-width: 132px !important; object-fit: cover; display: block; }
.continue-card-progress { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.55); padding: 6px 8px; font-size: 11px; font-weight: 700; color: #fff; }
.continue-card-title { width: 132px; font-size: 12px; font-weight: 600; margin-top: 8px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cards do carrossel de nuvem: mais estreitos e "colados", como fileiras da Netflix */
.carousel-card { flex: 0 0 118px !important; width: 118px !important; max-width: 118px !important; min-width: 118px !important; overflow: hidden; cursor: pointer; text-align: left; position: relative; scroll-snap-align: start; transition: transform 0.2s ease; }
.carousel-card:active { transform: scale(0.96); }
.carousel-card-img-wrapper { width: 118px !important; max-width: 118px !important; height: 177px; border-radius: 6px; overflow: hidden; background: #111; border: 1px solid rgba(255,255,255,0.05); position: relative; }
.carousel-card img { width: 118px !important; height: 177px !important; max-width: 118px !important; object-fit: cover; display: block; }
.carousel-card span.carousel-card-title { display: block; width: 118px; max-width: 118px; font-size: 11px; color: #ccc; font-weight: 600; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Grid de cards de mangá/anime (nuvem em grade, favoritos, admin) */
.manga-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px; margin-top: 5px; }
.manga-card { cursor: pointer; text-align: center; position: relative; }
.manga-card-img-wrapper { border-radius: 6px; overflow: hidden; background: #111; aspect-ratio: 2/3; margin-bottom: 10px; border: 1px solid rgba(255,255,255,0.05); position: relative; }
.manga-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.manga-card span { display: block; font-size: 12px; color: #ddd; font-weight: 600; }
.fav-badge { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.6); border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.fav-badge svg { width: 14px; height: 14px; }
.count-badge { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,0.75); border-radius: 8px; padding: 3px 7px; font-size: 11px; font-weight: 700; color: #fff; }
.search-box { margin-bottom: 6px !important; }

/* ===================== BOTTOM TABBAR (home) ===================== */
.bottom-tabbar { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: rgba(10,10,10,0.94); backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); z-index: 9; }
.tab-btn { flex: 1; background: none; border: none; color: #888; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 10px; font-weight: 700; }
.tab-btn span { font-size: 20px; }
.tab-btn.active { color: var(--accent); }

/* ===================== DETALHE ===================== */
#mangaDetailApp { max-width: 600px; margin: 0 auto; padding: 40px 24px; text-align: center; padding-bottom: 100px; position: relative; }
.detail-back { position: absolute; top: 16px; left: 16px; background: var(--glass); border: 1px solid var(--border); border-radius: 10px; color: #eee; padding: 8px; }
.manga-cover-large { width: 100%; max-width: 220px; border-radius: 16px; margin: 40px auto 20px; display: block; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.manga-info-centered h2 { margin: 0 0 15px; font-size: 24px; font-weight: 800; color: #fff; }
.manga-synopsis-large { font-size: 14px; color: #bbb; line-height: 1.6; text-align: justify; background: var(--glass); padding: 18px; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 20px; }
.manga-detail-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin-bottom: 25px; }
.btn-action-circle { flex: 0 0 54px; height: 54px; background: var(--glass); color: #eee; border: 1px solid var(--border); border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.btn-action-circle.active { background: var(--accent); border-color: var(--accent); }
.btn-action-circle svg { width: 24px; height: 24px; }
.btn-action-main { flex: 1; height: 54px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: none; border-radius: 16px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
#chaptersListModal { max-height: 250px; overflow-y: auto; border-radius: 16px; background: rgba(0,0,0,0.5); padding: 12px; text-align: left; border: 1px solid var(--border); }

/* ===================== LEITOR / PLAYER ===================== */
header.reader-header { position: sticky; top: 0; background: rgba(15,15,15,0.85); backdrop-filter: blur(12px); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; z-index: 10; border-bottom: 1px solid rgba(255,255,255,0.05); transition: transform 0.3s; }
header.reader-header.ui-hidden { transform: translateY(-100%); }
header.reader-header h1 { font-size: 15px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; font-weight: 700; }
.dots { background: var(--glass); border: 1px solid var(--border); border-radius: 8px; color: #eee; padding: 6px 12px; display: flex; align-items: center; justify-content: center; }
#reader { max-width: 800px; margin: 0 auto; padding-bottom: 100px; min-height: 60vh; }
#reader img { width: 100%; display: block; }
#reader .page-wrap { position: relative; min-height: 80vh; }
#reader .page-reload { display: none; position: absolute; inset: 0; background: rgba(0,0,0,0.7); color: #fff; align-items: center; justify-content: center; flex-direction: column; gap: 10px; font-size: 13px; text-align: center; padding: 20px; }
#reader .page-reload.show { display: flex; }
#reader .page-reload button { padding: 10px 20px; border: none; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; }
#status { text-align: center; padding: 80px 20px; color: var(--text-muted); font-size: 15px; font-weight: 500; line-height: 1.5; }
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(15,15,15,0.9); backdrop-filter: blur(12px); padding: 15px 20px calc(15px + env(safe-area-inset-bottom)); display: flex; gap: 12px; border-top: 1px solid rgba(255,255,255,0.05); transition: transform 0.3s; z-index: 9; }
.bottom-bar.ui-hidden { transform: translateY(100%); }
.bottom-bar button { flex: 1; padding: 15px; border: none; border-radius: 14px; background: var(--glass); border: 1px solid var(--border); color: #ccc; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.bottom-bar button.secondary, .bottom-bar button.next { flex: 0.6; }
.bottom-bar button.home-mid { flex: 0.6; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: var(--accent); }
.bottom-bar button svg { width: 22px; height: 22px; }
.jump-input { flex: 0 0 70px; text-align: center; margin: 0 !important; font-size: 16px; font-weight: 700; -moz-appearance: textfield; }
#autoToast { display: none; position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 12px 24px; border-radius: 30px; font-size: 13px; font-weight: bold; z-index: 15; }
#playerBody { padding: 16px; max-width: 900px; margin: 0 auto; padding-bottom: 100px; }

/* ===================== MENU LATERAL / ADMIN (compartilhado) ===================== */
.sheet-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 20; }
.action { margin-top: 12px; width: 100%; padding: 15px; border: none; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; text-transform: uppercase; cursor: pointer; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--glass); border: 1px solid var(--border); transition: .3s; border-radius: 28px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; transition: .3s; border-radius: 50%; }
input:checked + .slider { background: var(--accent); border-color: var(--accent); }
input:checked + .slider:before { transform: translateX(22px); }

#adminApp, .reader-menu-app { max-width: 100%; height: 100vh; display: flex; flex-direction: column; overflow: hidden; position: fixed; inset: 0; background: var(--bg-main); z-index: 30; }
.admin-header { display: flex; align-items: center; background: rgba(21,21,21,0.9); padding: 16px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.admin-hamburger { background: none; border: none; color: #eee; padding: 0 20px 0 0; }
.admin-header h1 { font-size: 16px; margin: 0; flex: 1; font-weight: 800; }
.admin-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 300px; background: var(--bg-card); z-index: 31; transition: transform 0.4s; transform: translateX(-100%); padding-top: 30px; border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; }
.admin-sidebar.open { transform: translateX(0); }
.admin-sidebar h2 { color: #fff; padding: 0 30px 20px; margin: 0 0 10px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 15px; font-weight: 800; color: var(--text-muted); }
.admin-sidebar .nav-group-label { padding: 18px 30px 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); opacity: 0.7; }
.admin-sidebar .nav-group-label:first-of-type { padding-top: 4px; }
.admin-sidebar button { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: none; border: none; color: #ddd; padding: 16px 30px; font-size: 15px; font-weight: 600; }
.admin-sidebar button.active-page { color: #fff; background: rgba(255,255,255,0.04); }
.admin-pages-container { padding: 24px; overflow-y: auto; flex: 1; padding-bottom: 80px; }
.admin-page section { background: var(--glass); border-radius: 20px; padding: 24px; margin-bottom: 20px; border: 1px solid var(--border); }
.admin-page section h3 { margin-top: 0; }
.row-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); gap: 12px; }
.row-item button { padding: 10px 18px; border: none; border-radius: 10px; font-size: 13px; background: var(--glass); border: 1px solid var(--border); color: #eee; font-weight: 700; }
.row-item button.danger { background: rgba(239,68,68,0.15); border-color: #7a1616; color: #fca5a5; }
.row-item button.approve { background: rgba(16,185,129,0.15); border-color: #0d5b40; color: #6ee7b7; }
.terminal-box { background: #000; color: #4ade80; padding: 20px; border-radius: 16px; border: 1px solid #333; font-family: monospace; font-size: 13px; height: 320px; overflow-y: auto; margin-top: 15px; white-space: pre-wrap; word-break: break-all; }
.ftp-box { background: linear-gradient(145deg, #181818, #000); border: 1px solid #262626; border-radius: 18px; padding: 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 20px; }
.ftp-status { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #ef4444; margin-right: 8px; }
.ftp-status.online { background: #22c55e; }
.queue-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 12px; gap: 10px; }
.queue-item span.url { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ccc; }
.queue-item button { padding: 6px 10px; font-size: 11px; }
.stat-pill { display: inline-block; padding: 6px 14px; border-radius: 20px; background: var(--glass); border: 1px solid var(--border); font-size: 12px; font-weight: 700; margin-right: 8px; margin-bottom: 8px; }
.stat-pill.big { display: block; font-size: 18px; padding: 14px 18px; margin-right: 0; margin-bottom: 10px; }
.theme-btn { flex: 1; width: auto; display: flex; flex-direction: column; gap: 6px; height: auto; padding: 16px 8px !important; font-size: 12px !important; text-transform: none !important; }
.theme-btn span.emoji { font-size: 22px; }
.theme-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important; color: #fff !important; border-color: var(--accent) !important; }
.pending-tag { color: #fbbf24; font-size: 11px; margin-left: 6px; font-weight: 800; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #ccc; margin: 10px 0; text-transform: none; }

/* ===================== TOASTS ===================== */
#toastContainer { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 999999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; align-items: center; }
.toast { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; padding: 12px 24px; border-radius: 30px; font-weight: bold; font-size: 14px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); animation: fadein 0.4s ease, fadeout 0.4s ease 4.4s; pointer-events: auto; white-space: nowrap; }
@keyframes fadein { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }

/* ===================== MODAIS (VIP / PIX / PWA) ===================== */
.pwa-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: center; z-index: 999999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.pwa-modal-overlay.active { opacity: 1; pointer-events: auto; }
.pwa-modal-card { background: #181818; border: 1px solid var(--border); width: 90%; max-width: 380px; border-radius: 14px; padding: 32px 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.95), 0 0 20px rgba(229,9,20,0.15); position: relative; text-align: center; transform: scale(0.85); transition: transform 0.3s ease; }
.pwa-modal-overlay.active .pwa-modal-card { transform: scale(1); }
.pwa-close-btn { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 26px; color: #777; cursor: pointer; transition: color 0.2s; line-height: 1; }
.pwa-close-btn:hover { color: #fff; }
.pwa-app-icon { width: 76px; height: 76px; border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,0.8); margin-bottom: 14px; background: #000; border: 2px solid var(--border); object-fit: cover; }
.pwa-actions { display: flex; gap: 10px; margin-top: 18px; }
.vip-modal-icon { font-size: 46px; margin-bottom: 8px; }
.vip-modal-title { color: var(--accent); font-size: 22px; margin: 0 0 10px; font-weight: 900; }
.vip-modal-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.pix-amount-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 15px; }
.pix-btn { flex: 1; min-width: 55px; margin-top: 0 !important; padding: 10px 6px !important; }
.pix-btn.selected { background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important; color: #fff !important; border-color: var(--accent) !important; }

/* ===================== VIP (badge / botão / status) ===================== */
.vip-star-btn { color: #f59e0b; }
.vip-badge { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 900; margin-left: 6px; box-shadow: 0 2px 5px rgba(245,158,11,0.5); vertical-align: middle; }
.vip-status-line { color: #f59e0b; font-weight: 700; font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ===================== Player: botão flutuante "Próximo Ep" ===================== */
#btnProximoFlutuante { display: none; position: absolute; bottom: 70px; right: 16px; z-index: 60; background: var(--accent); color: #fff; border: none; padding: 11px 16px; font-weight: 800; font-size: 13px; border-radius: 8px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.7); }

/* ===================== Toast de doação (persistente, com checkbox) ===================== */
.donation-toast { background: #181818; border: 1px solid var(--border); border-left: 3px solid #f59e0b; color: #fff; padding: 14px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); pointer-events: auto; width: min(320px, 88vw); animation: fadein 0.4s ease; }
.donation-toast-text { font-size: 13px; line-height: 1.4; margin-bottom: 10px; color: #eee; }
.donation-toast-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.donation-toast-actions button { flex: 1; padding: 9px; border-radius: 8px; border: none; font-weight: 700; font-size: 13px; cursor: pointer; }
.donation-toast-actions .donate-btn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.donation-toast-actions .dismiss-btn { background: rgba(255,255,255,0.08); color: #ccc; }
.donation-toast-snooze { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.donation-toast-snooze input { width: 15px; height: 15px; margin: 0; cursor: pointer; }

/* ===================== Ranking de doadores (modal Pix) ===================== */
.donor-rank-list { margin-top: 14px; text-align: left; max-height: 220px; overflow-y: auto; }
.donor-rank-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.donor-rank-pos { width: 22px; font-weight: 900; font-size: 13px; color: var(--text-muted); text-align: center; flex-shrink: 0; }
.donor-rank-item:nth-child(1) .donor-rank-pos { color: #ffd700; }
.donor-rank-item:nth-child(2) .donor-rank-pos { color: #c0c0c0; }
.donor-rank-item:nth-child(3) .donor-rank-pos { color: #cd7f32; }
.donor-rank-name { flex: 1; font-size: 13px; font-weight: 700; color: #eee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donor-rank-amount { font-size: 12px; font-weight: 800; color: #f59e0b; flex-shrink: 0; }

@media (max-width: 420px) {
  .continue-card { flex-basis: 112px; width: 112px; max-width: 112px; min-width: 112px; }
  .continue-card-cover { width: 112px; height: 156px; }
  .continue-card-cover img { width: 112px; height: 156px; }
  .continue-card-title { width: 112px; }
  .carousel-card { flex-basis: 100px; width: 100px; max-width: 100px; min-width: 100px; }
  .carousel-card-img-wrapper { width: 100px; height: 150px; }
  .carousel-card img { width: 100px; height: 150px; }
  .carousel-card span.carousel-card-title { width: 100px; }
}

#notifTargetAllBtn.selected, #notifTargetUserBtn.selected { background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important; color: #fff !important; border-color: var(--accent) !important; }

/* ===================== Sino de notificações ===================== */
.notif-bell-btn { position: relative; }
.notif-unread-badge { position: absolute; top: 2px; right: 2px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px; line-height: 1; }
#notificationsList .notif-item { padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); margin-bottom: 8px; position: relative; }
#notificationsList .notif-item.unread { border-left: 3px solid var(--accent); background: rgba(229,9,20,0.06); }
#notificationsList .notif-item-title { font-weight: 800; font-size: 13px; color: #fff; margin-bottom: 4px; padding-right: 24px; }
#notificationsList .notif-item-body { font-size: 12px; color: #ccc; line-height: 1.4; }
#notificationsList .notif-item-date { font-size: 10px; color: var(--text-muted); margin-top: 6px; }
#notificationsList .notif-item-delete { position: absolute; top: 10px; right: 10px; background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 2px 6px; }
#notificationsList .notif-item-delete:hover { color: #ef4444; }
.notif-modal-push-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }

/* ===================== Toggle switch ===================== */
.switch-toggle { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch-toggle input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; border-radius: 26px; transition: 0.25s; }
.switch-slider::before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: #fff; border-radius: 50%; transition: 0.25s; }
.switch-toggle input:checked + .switch-slider { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch-toggle input:checked + .switch-slider::before { transform: translateX(20px); }
