/* ============================================================
   FireAnimes — Tema dark anime (sem frameworks)
   ============================================================ */
:root {
    --bg: #0c0c11;
    --surface: #15151d;
    --surface-2: #1c1c26;
    --border: #2a2a38;
    --text: #e8e8ee;
    --muted: #9a9aad;
    --accent: #ff6b1a;
    --accent-2: #ff9a3c;
    --danger: #e5484d;
    --ok: #46c46a;
    --radius: 10px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Roboto, system-ui, sans-serif;
    line-height: 1.55;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---- Topbar ---- */
.topbar {
    background: rgba(12, 12, 17, .95);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(6px);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; padding: 10px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 800; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-name span { color: var(--accent); }
.brand-logo { width: 34px; height: 34px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }
.nav-links { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-links a { color: var(--text); font-weight: 600; }
.nav-links a.active { color: var(--accent); }
.nav-user { color: var(--muted); }
.admin-link { color: var(--accent) !important; border: 1px solid var(--accent); border-radius: 6px; padding: 2px 8px; font-size: .85rem; }
.nav-search { display: flex; }
.nav-search input {
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    border-radius: 8px 0 0 8px; padding: 7px 10px; width: 170px;
}
.nav-search button {
    background: var(--accent); border: none; border-radius: 0 8px 8px 0;
    padding: 7px 12px; cursor: pointer; font-size: 1rem;
}

/* ---- Botões / formulários ---- */
.btn {
    display: inline-block; background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px;
    font-weight: 600; cursor: pointer; font-size: .95rem;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; color: #1a0d00; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { background: var(--danger); border: none; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: .85rem; }
.btn-lg { padding: 12px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-done { border-color: var(--ok); color: var(--ok); }
.inline-form { display: inline; margin: 0; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], select, textarea {
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; padding: 9px 12px; font-size: .95rem; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
label.check { flex-direction: row; align-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; background: var(--surface); padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); }
.form-grid .full { grid-column: 1 / -1; }
.form-error { background: rgba(229, 72, 77, .12); border: 1px solid var(--danger); color: #ff9a9e; padding: 10px 14px; border-radius: 8px; }

/* ---- Flash messages ---- */
.flash { padding: 12px 16px; border-radius: 8px; margin: 14px 0; border: 1px solid var(--border); transition: opacity .6s; }
.flash-ok { background: rgba(70, 196, 106, .1); border-color: var(--ok); }
.flash-error { background: rgba(229, 72, 77, .1); border-color: var(--danger); }
.flash.fade { opacity: 0; }

/* ---- Hero ---- */
.hero {
    position: relative; border-radius: var(--radius); overflow: hidden;
    min-height: 340px; display: flex; align-items: flex-end;
    background-size: cover; background-position: center top; margin: 18px 0;
    border: 1px solid var(--border);
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,12,17,.97) 10%, rgba(12,12,17,.55) 55%, rgba(12,12,17,.25)); }
.hero-content { position: relative; padding: 28px; max-width: 640px; }
.hero-content h1 { margin: 6px 0 10px; font-size: 2.2rem; }
.hero-kicker { color: var(--accent-2); font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: 1px; }
.hero-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--muted); margin-bottom: 10px; }
.hero-synopsis { color: #cfcfd8; }
.hero-empty { background: linear-gradient(135deg, #1a0f08, var(--surface)); align-items: center; text-align: center; }
.hero-empty .hero-content { max-width: none; margin: 0 auto; }

/* ---- Faixa de estatísticas ---- */
.stats-strip { display: flex; gap: 14px; margin: 18px 0; flex-wrap: wrap; }
.stat { flex: 1; min-width: 140px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat strong { display: block; font-size: 1.6rem; color: var(--accent-2); }
.stat span { color: var(--muted); font-size: .85rem; }

/* ---- Seções e cards ---- */
.section { margin: 30px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 1.35rem; border-left: 4px solid var(--accent); padding-left: 10px; }
.page-title { font-size: 1.8rem; margin: 22px 0 14px; }
.ep-tag { font-size: 1rem; color: var(--accent-2); vertical-align: middle; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); display: block; }
.card:hover { text-decoration: none; border-color: var(--accent); }
.card-poster { position: relative; aspect-ratio: 3 / 4; background: var(--surface-2); overflow: hidden; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.card:hover .card-poster img { transform: scale(1.06); }
.card-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card-noimg.big { min-height: 300px; background: var(--surface-2); border-radius: var(--radius); }
.card-body { padding: 10px 12px; }
.card-body h3 { margin: 0 0 4px; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { color: var(--muted); font-size: .8rem; }
.score { position: absolute; top: 8px; left: 8px; font-size: .78rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.7); }
.s-high { color: #7dff9a; } .s-mid { color: #ffd97d; } .s-low { color: #ff9a9a; } .s-na { color: var(--muted); }

/* ---- Filtros / paginação ---- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; background: var(--surface); padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.filters input, .filters select { width: auto; flex: 1; min-width: 140px; }
.result-count { color: var(--muted); }
.pagination { display: flex; gap: 8px; justify-content: center; margin: 24px 0; flex-wrap: wrap; align-items: center; }
.pagination a, .pagination .current, .pagination .dots { padding: 7px 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.pagination a:hover { border-color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #1a0d00; font-weight: 800; }
.pagination .dots { border: none; background: none; }
.empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; }

/* ---- Página do anime ---- */
.anime-head { display: flex; gap: 24px; margin: 22px 0; flex-wrap: wrap; }
.anime-poster { flex: 0 0 240px; }
.anime-poster img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.anime-info { flex: 1; min-width: 260px; }
.anime-info h1 { margin: 0 0 4px; font-size: 2rem; }
.alt-title { color: var(--muted); margin: 0 0 12px; }
.meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.meta-row .score { position: static; font-size: .9rem; }
.meta { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; font-size: .85rem; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chip { background: rgba(255, 107, 26, .12); border: 1px solid var(--accent); color: var(--accent-2); border-radius: 20px; padding: 3px 12px; font-size: .82rem; }
.chip:hover { background: var(--accent); color: #1a0d00; text-decoration: none; }
.synopsis { color: #cfcfd8; max-width: 800px; }
.actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.btn-fav.active { border-color: #ff5b7a; color: #ff8ba0; }
.rating-form { display: flex; align-items: center; gap: 8px; }
.rating-label { color: var(--muted); font-size: .9rem; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars button { background: none; border: none; color: #4a4a5c; font-size: 1.6rem; cursor: pointer; padding: 0 2px; line-height: 1; }
.stars button.on, .stars button:hover, .stars button:hover ~ button { color: #ffc94d; }
.rating-avg { color: var(--muted); font-size: .85rem; }
.stars-inline { color: #ffc94d; }

/* ---- Grade de episódios ---- */
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.ep-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.ep-btn:hover { border-color: var(--accent); text-decoration: none; }
.ep-num { font-weight: 800; color: var(--accent-2); }
.ep-title { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Player ---- */
.watch-layout { display: grid; grid-template-columns: 1fr 280px; gap: 22px; margin: 18px 0; }
.breadcrumb { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tab { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 14px; font-weight: 600; }
.tab small { color: var(--muted); font-weight: 400; }
.tab:hover { text-decoration: none; border-color: var(--accent); }
.tab.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a0d00; border: none; }
.tab.active small { color: #1a0d00; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.player-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 30px; aspect-ratio: auto; min-height: 300px; }
.player-empty p:first-child { font-size: 3rem; margin: 0; }
.source-note { color: var(--muted); font-size: .85rem; }
.ep-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0; }
.watch-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; align-self: start; }
.watch-side h3 { margin: 12px 0 8px; font-size: 1rem; }
.side-anime { display: flex; gap: 10px; color: var(--text); margin-bottom: 6px; }
.side-anime:hover { text-decoration: none; }
.side-anime img { width: 56px; border-radius: 6px; }
.side-anime div { display: flex; flex-direction: column; }
.side-anime span { color: var(--muted); font-size: .8rem; }
.side-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-height: 420px; overflow-y: auto; }
.side-ep { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; text-align: center; padding: 6px 0; color: var(--text); font-size: .85rem; }
.side-ep:hover { border-color: var(--accent); text-decoration: none; }
.side-ep.current { background: var(--accent); color: #1a0d00; font-weight: 800; border: none; }
.side-ep.seen { border-color: var(--ok); }

/* ---- Auth ---- */
.auth-box { max-width: 420px; margin: 40px auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.auth-box h1 { margin-top: 0; }
.auth-box form { display: flex; flex-direction: column; gap: 14px; }
.auth-alt { text-align: center; color: var(--muted); }

/* ---- Perfil ---- */
.history-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.history-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.history-list li:last-child { border-bottom: none; }

/* ---- Tabelas (admin) ---- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; margin: 14px 0; font-size: .92rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: var(--surface-2); color: var(--muted); font-size: .82rem; text-transform: uppercase; }
.table tr.inactive { opacity: .55; }
.thumb { width: 44px; border-radius: 4px; display: block; }
.url-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; color: var(--muted); }

/* ---- Admin ---- */
.admin-badge { background: var(--accent); color: #1a0d00; font-size: .7rem; font-weight: 800; border-radius: 6px; padding: 3px 9px; vertical-align: middle; letter-spacing: 1px; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 18px 0; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.admin-card strong { display: block; font-size: 2rem; color: var(--accent-2); }
.admin-card span { color: var(--muted); }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }

/* ---- 404 ---- */
.notfound { text-align: center; padding: 70px 20px; }
.notfound-code { font-size: 5rem; font-weight: 900; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound code { background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }
.notfound-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }

/* ---- Rodapé ---- */
.footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 34px 0 26px; color: var(--muted); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { color: var(--text); font-size: .95rem; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--muted); display: inline-flex; transition: color .15s; }
.footer-social a:hover { color: var(--accent); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.footer-div { border: none; border-top: 1px solid var(--border); margin: 26px 0 18px; }
.footer-copy, .footer-disclaimer { text-align: center; margin: 6px 0; font-size: .88rem; }
.footer-credit { text-align: center; font-size: .78rem; margin: 12px 0 0; }

/* Páginas estáticas (DMCA, Contato) */
.static-page { max-width: 760px; }
.static-page h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
.static-page p, .static-page li { line-height: 1.65; color: #c9c9d6; }
.static-page ol { padding-left: 1.3rem; }

/* Calendário */
.cal-day { font-size: 1rem; color: var(--accent); margin: 1.4rem 0 .6rem; text-transform: uppercase; letter-spacing: .05em; }
.cal-day:first-of-type { margin-top: 0; }
.cal-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.cal-row:hover { background: var(--surface-2); text-decoration: none; }
.cal-row img { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; }

/* ---- Responsivo ---- */
@media (max-width: 860px) {
    .watch-layout { grid-template-columns: 1fr; }
    .nav-toggle { display: block; }
    .nav-links { display: none; width: 100%; flex-direction: column; align-items: flex-start; }
    .nav-links.open { display: flex; }
    .nav-search { width: 100%; }
    .nav-search input { flex: 1; }
    .hero-content h1 { font-size: 1.6rem; }
    .anime-poster { flex: 0 0 160px; }
    .table { display: block; overflow-x: auto; }
}

/* ============================================================
   Home vitrine (banner + cards de episódios 16:9)
   ============================================================ */
.banner-box {
    border: 1px solid #23232e;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.8rem;
}
.banner-box-head {
    background: linear-gradient(135deg, #ff6b1a, #ff9a3c);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    padding: .9rem 1.2rem;
}
.banner-box-head span { font-weight: 400; opacity: .9; }
.banner-box-body {
    background: #15151d;
    color: #c9c9d6;
    padding: .9rem 1.2rem;
    font-size: .95rem;
}
.home-sec { margin-bottom: 2.2rem; }
.sec-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.sec-head h2 { font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.pill {
    background: #ff6b1a;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    padding: .28rem .7rem;
    border-radius: 999px;
    letter-spacing: .08em;
}
.btn-vermais {
    margin-left: auto;
    background: #ff6b1a;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    padding: .5rem 1.3rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}
.btn-vermais:hover { background: #ff7f2e; color: #fff; }
.ep-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.ep-grid > * { min-width: 0; } /* impede títulos longos de estourar a grade */
.ep-card { display: block; text-decoration: none; color: inherit; transition: transform .2s ease; }
.ep-card:hover { transform: translateY(-3px); }
.ep-card:hover .ep-title { color: var(--accent-2); }
.ep-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #1b1b24;
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ep-card:hover .ep-thumb img { transform: scale(1.06); }
.hd {
    position: absolute;
    top: .6rem;
    left: .6rem;
    background: #2b4bff;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    padding: .3rem .55rem;
    border-radius: 999px;
    letter-spacing: .05em;
}
.ep-title {
    display: block;
    margin-top: .55rem;
    font-weight: 600;
    font-size: .92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-num { display: block; color: #9a9aad; font-size: .75rem; letter-spacing: .05em; margin-top: .15rem; }
@media (max-width: 900px) { .ep-grid { grid-template-columns: repeat(2, 1fr); } }

/* Cards de episódios na página do anime */
.ep-grid-cards .ep-num { font-size: .85rem; font-weight: 700; color: var(--text); letter-spacing: .04em; }
.ep-play {
    position: absolute; inset: 0; margin: auto;
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(12,12,17,.6); border: 2px solid rgba(255,255,255,.9);
    color: #fff; font-size: 1rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s, background .2s;
}
.ep-card:hover .ep-play { opacity: 1; }
.ep-card.has-video .ep-play { opacity: .92; }
.ep-card.has-video:hover .ep-play { background: rgba(255,107,26,.9); border-color: transparent; }

/* Outras temporadas (página do anime) */
.season-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-block; padding: .45rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .85rem; font-weight: 600; }
a.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   Player: toolbar, sidebar de episódios e modal de report
   ============================================================ */
.player-toolbar {
    display: flex; align-items: stretch; justify-content: space-between; gap: 6px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px; margin: 14px 0;
    overflow-x: auto;
}
.pt-item {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    flex: 1 1 0;
    padding: 10px 14px; border-radius: 8px; white-space: nowrap;
    color: var(--text); font-size: .82rem; font-weight: 700; letter-spacing: .03em;
    background: transparent; border: none; cursor: pointer; font-family: inherit;
}
a.pt-item:hover, button.pt-item:hover { background: var(--surface-2); text-decoration: none; color: var(--accent); }
.pt-item.disabled { opacity: .35; cursor: default; }
.pt-item.disabled:hover { background: transparent; color: var(--text); }
.pt-ico { font-size: 1rem; line-height: 1; }
.watched-row { margin: 0 0 14px; display: flex; }
.watched-row .btn { flex: 1; }

/* Sidebar: busca + lista de episódios */
.side-search { position: relative; margin: 10px 0; }
.side-search input {
    width: 100%; padding: 10px 36px 10px 12px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-size: .85rem;
}
.side-search input:focus { outline: none; border-color: var(--accent); }
.side-search input::placeholder { color: var(--muted); }
.side-search-ico { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); opacity: .6; }
.side-eps-list { display: flex; flex-direction: column; max-height: 460px; overflow-y: auto; border-top: 1px solid var(--border); }
.side-row { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-bottom: 1px solid var(--border); color: var(--text); }
.side-row:hover { background: var(--surface-2); text-decoration: none; }
.side-row-num { font-size: 1.05rem; font-weight: 800; min-width: 34px; }
.side-row-lbl { color: var(--muted); font-size: .9rem; }
.side-row-seen { margin-left: auto; color: var(--ok); font-weight: 700; }
.side-row.current { background: rgba(255,107,26,.12); }
.side-row.current .side-row-num { color: var(--accent); }
.side-row.seen .side-row-num { color: var(--ok); }
.side-row.current.seen .side-row-num { color: var(--accent); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 420px; }
.modal-box h3 { margin: 0 0 4px; }
.modal-box .muted { margin: 0 0 6px; font-size: .85rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.field { display: block; margin: 10px 0; font-size: .9rem; font-weight: 600; }
.field select, .field textarea {
    display: block; width: 100%; margin-top: 6px; padding: 10px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font: inherit; font-weight: 400;
}
.field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
body.no-scroll { overflow: hidden; }

/* Sidebar recolhível (☰) */
.watch-layout.side-collapsed { grid-template-columns: 1fr; }
.watch-layout.side-collapsed .watch-side { display: none; }

@media (max-width: 860px) {
    .watch-side { display: none; }
    .watch-layout.side-open .watch-side { display: block; }
    .player-toolbar { gap: 2px; padding: 6px; flex-wrap: wrap; overflow-x: visible; }
    .pt-item { flex: 1 1 30%; padding: 10px 8px; font-size: .72rem; gap: 6px; justify-content: center; }
    .page-title { font-size: 1.35rem; }
    .breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .footer-top { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; gap: 18px; }
}

/* Módulo "Últimos Animes" da home (pôsteres 3:4, título centralizado) */
.home-animes-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.card-body-simple { text-align: center; }
.card-body-simple h3 {
    white-space: normal; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em;
}
@media (max-width: 860px) {
    .home-animes-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
    .home-animes-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Correções mobile (conteúdo cortado) ---- */
.watch-layout > * { min-width: 0; } /* permite aos filhos da grade encolher */
.page-title { overflow-wrap: break-word; }

/* ============================================================
   Perfil do usuário
   ============================================================ */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.1rem; flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: .85rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 2.2rem; }
.avatar-fire   { background: linear-gradient(135deg, #ff6b1a, #ff9a3c); }
.avatar-ocean  { background: linear-gradient(135deg, #2196f3, #21cbf3); }
.avatar-grape  { background: linear-gradient(135deg, #9d4edd, #6a1b9a); }
.avatar-forest { background: linear-gradient(135deg, #2ecc71, #16a085); }
.avatar-rose   { background: linear-gradient(135deg, #ff5e78, #ff9a8b); }
.avatar-gold   { background: linear-gradient(135deg, #f7b733, #fc4a1a); }
.avatar-slate  { background: linear-gradient(135deg, #606c88, #3f4c6b); }

.profile-head { display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.profile-info { flex: 1; min-width: 200px; }
.profile-info h1 { margin: 0 0 4px; font-size: 1.5rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-info .muted { margin: 0; font-size: .85rem; }
.profile-bio { margin: 8px 0 0; color: #c9c9d6; line-height: 1.5; }
.profile-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 18px; text-align: center; min-width: 92px; }
.stat strong { display: block; font-size: 1.4rem; color: var(--accent); }
.stat span { font-size: .78rem; color: var(--muted); }
.profile-tabs { margin-bottom: 18px; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; max-width: 560px; }
.form-card h2 { margin: 0 0 8px; font-size: 1.1rem; }
.form-card .btn { margin-top: 6px; }
.field-label { display: block; font-size: .9rem; font-weight: 600; margin: 10px 0 2px; }
.avatar-pick { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 6px; }
.swatch { cursor: pointer; }
.swatch input { display: none; }
.swatch .avatar { border: 3px solid transparent; transition: border-color .15s, transform .15s; }
.swatch:hover .avatar { transform: scale(1.08); }
.swatch input:checked + .avatar { border-color: #fff; transform: scale(1.12); }
.swatch input:focus-visible + .avatar { outline: 2px solid var(--accent); outline-offset: 2px; }

.field input {
    display: block; width: 100%; margin-top: 6px; padding: 10px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font: inherit; font-weight: 400;
}
.field input:focus { outline: none; border-color: var(--accent); }

.nav-user { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 860px) {
    .profile-head { padding: 16px; }
    .avatar-xl { width: 64px; height: 64px; font-size: 1.7rem; }
    .profile-stats { width: 100%; }
    .stat { flex: 1; min-width: 0; padding: 8px 6px; }
}

/* ============================================================
   Comentários (página do episódio)
   ============================================================ */
.comments { margin: 20px 0 8px; }
.comments h2 { font-size: 1.1rem; margin: 0 0 12px; }
.comment-form { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.comment-form-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.comment-form textarea {
    width: 100%; padding: 10px 12px; resize: vertical; min-height: 64px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font: inherit; font-size: .92rem;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form .btn { align-self: flex-end; }
.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; }
.comment-head strong { font-size: .92rem; }
.comment-head .muted { font-size: .78rem; }
.comment-body p { margin: 0; line-height: 1.55; color: #d5d5e0; overflow-wrap: break-word; font-size: .92rem; }
.comment-del button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .9rem; padding: 4px 6px; }
.comment-del button:hover { color: var(--danger); }

/* Avatar com foto */
.avatar-img { object-fit: cover; }

/* Admin: gerenciar animes */
.admin-search { display: flex; gap: 8px; margin: 12px 0 4px; max-width: 420px; }
.admin-search input[type="search"] {
    flex: 1; padding: 9px 12px; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit;
}
.admin-search input[type="search"]:focus { outline: none; border-color: var(--accent); }

/* Paginação */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 26px 0 10px; flex-wrap: wrap; }
.pagination a, .pagination .current {
    padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: .9rem;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* Aba Editar perfil: grade de configurações */
.settings-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.settings-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.settings-grid .form-card { max-width: none; margin-bottom: 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.btn-row .btn { margin-top: 0; }
.avatar-preview { margin: 4px 0 10px; }
.field input:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 900px) {
    .settings-grid { grid-template-columns: 1fr; }
}

/* Continuar assistindo */
.continue-badge {
    position: absolute; left: 8px; bottom: 8px;
    background: rgba(0, 0, 0, .78); color: #fff;
    font-size: .68rem; font-weight: 700; letter-spacing: .03em;
    padding: 5px 9px; border-radius: 6px;
}
.progress { display: block; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 7px 0 3px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #ff6b1a, #ff9a3c); border-radius: 3px; }

/* Autocomplete da busca */
.search-suggest {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; margin-top: 6px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.search-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--text); }
.search-suggest a:hover { background: var(--surface-2); text-decoration: none; }
.search-suggest img, .search-suggest .noimg {
    width: 36px; height: 48px; object-fit: cover; border-radius: 6px;
    background: var(--surface-2); flex-shrink: 0;
}
.search-suggest a span:last-child { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ranking */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.rank-pos { font-size: 1.3rem; font-weight: 800; color: var(--muted); min-width: 34px; text-align: center; }
.rank-row.top1 .rank-pos { color: #ffd54a; }
.rank-row.top2 .rank-pos { color: #cfd6e4; }
.rank-row.top3 .rank-pos { color: #e09a5a; }
.rank-thumb img { width: 46px; height: 62px; object-fit: cover; border-radius: 6px; display: block; }
.rank-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rank-info a { color: var(--text); }
.rank-info a:hover { color: var(--accent); text-decoration: none; }
.rank-info .muted { font-size: .82rem; }

/* Compartilhar */
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.share-label { font-size: .85rem; color: var(--muted); }
.share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: 20px; font-size: .82rem;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    cursor: pointer; font-family: inherit;
}
.share-btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

/* ---------- Google AdSense ---------- */
.ad-slot { margin: 1.4rem auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot:empty { display: none; }

/* Continuar assistindo — botão ✕ remover */
.continue-wrap { position: relative; }
.continue-remove { position: absolute; top: 6px; right: 6px; z-index: 2; margin: 0; }
.continue-remove button {
    width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--border); background: rgba(10,10,14,.78);
    color: #fff; font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.continue-remove button:hover { border-color: #e5484d; color: #e5484d; }
