:root {
  --aw-bg: #08090d;
  --aw-panel: #11131a;
  --aw-panel-2: #191c25;
  --aw-text: #f6f7fb;
  --aw-muted: #aeb4c3;
  --aw-line: rgba(255, 255, 255, .12);
  --aw-red: #e50914;
  --aw-red-2: #ff3b45;
  --aw-radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.aniwev-theme {
  margin: 0;
  background: var(--aw-bg);
  color: var(--aw-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.aniwev-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  z-index: 10000;
  background: var(--aw-red);
  transition: width .25s ease, opacity .25s ease;
}
.aniwev-progress.is-loading { width: 70%; opacity: 1; }
.aniwev-progress.is-done { width: 100%; opacity: 0; }

.aniwev-header {
  position: fixed;
  inset: 0 0 auto;
  height: 68px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 clamp(18px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(0,0,0,.78), rgba(0,0,0,.18));
  transition: background .2s ease, box-shadow .2s ease;
}
.aniwev-header.is-solid {
  background: rgba(8, 9, 13, .96);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.aniwev-brand { display: flex; align-items: center; min-width: max-content; font-size: 24px; font-weight: 800; color: var(--aw-red-2); }
.aniwev-brand img { max-height: 46px; width: auto; }
.aniwev-nav { display: flex; align-items: center; gap: 20px; flex: 1; }
.aniwev-nav a { color: #e7e9f0; font-size: 14px; }
.aniwev-nav a:hover { color: #fff; }
.aniwev-header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.aniwev-icon-btn, .aniwev-profile-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}
.aniwev-icon-btn:hover, .aniwev-profile-button:hover { background: rgba(255,255,255,.16); }
.aniwev-search-icon { display: block; width: 15px; height: 15px; margin: auto; border: 2px solid currentColor; border-radius: 50%; position: relative; }
.aniwev-search-icon::after { content: ""; position: absolute; width: 8px; height: 2px; right: -7px; bottom: -4px; background: currentColor; transform: rotate(45deg); }
.aniwev-avatar { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 8px; background: #2a3040; font-weight: 700; }
.aniwev-profile { position: relative; }
.aniwev-profile-menu {
  position: absolute;
  right: 0;
  top: 48px;
  min-width: 210px;
  display: none;
  padding: 8px;
  background: rgba(16,18,24,.98);
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius);
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
}
.aniwev-profile.is-open .aniwev-profile-menu { display: grid; }
.aniwev-profile-menu a { padding: 10px 12px; color: #e6e8ee; border-radius: 6px; }
.aniwev-profile-menu a:hover { background: rgba(255,255,255,.08); }
.aniwev-mobile-toggle { display: none; }
.aniwev-mobile-toggle span { display: block; width: 17px; height: 2px; margin: 4px auto; background: #fff; }

.aniwev-main { min-height: 70vh; }
.aniwev-hero, .aniwev-detail-hero {
  min-height: 76vh;
  display: flex;
  align-items: flex-end;
  padding: 112px clamp(18px, 5vw, 70px) 84px;
  background-image: linear-gradient(90deg, rgba(8,9,13,.96) 0%, rgba(8,9,13,.66) 42%, rgba(8,9,13,.18) 72%), linear-gradient(0deg, var(--aw-bg), transparent 32%), var(--hero-bg);
  background-size: cover;
  background-position: center;
}
.aniwev-hero-content, .aniwev-detail-info { max-width: 700px; }
.aniwev-kicker { display: inline-block; margin-bottom: 12px; color: #fff; font-size: 13px; text-transform: uppercase; font-weight: 800; }
.aniwev-hero h1, .aniwev-detail-info h1 { margin: 0 0 14px; font-size: clamp(42px, 6vw, 78px); line-height: 1; letter-spacing: 0; }
.aniwev-hero p, .aniwev-detail-info p { max-width: 660px; color: #e4e7f0; font-size: 17px; line-height: 1.55; }
.aniwev-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.aniwev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,.16);
  color: #fff;
  cursor: pointer;
}
.aniwev-btn:hover, .aniwev-btn.is-active { background: rgba(255,255,255,.26); }
.aniwev-btn-primary { background: #fff; color: #07080c; font-weight: 800; }
.aniwev-btn-primary:hover { background: #e8e8e8; }

.aniwev-section { padding: 22px clamp(18px, 4vw, 56px); }
.aniwev-section-pad { padding-top: 110px; }
.aniwev-section-head, .aniwev-archive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.aniwev-section h2, .aniwev-section h1 { margin: 0; }
.aniwev-row-controls { display: flex; gap: 6px; }
.aniwev-row-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--aw-line);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
}
.aniwev-row-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 13vw);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.aniwev-row-scroll::-webkit-scrollbar { display: none; }
.aniwev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px;
}
.aniwev-card {
  min-width: 0;
  background: var(--aw-panel);
  border: 1px solid transparent;
  border-radius: var(--aw-radius);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.aniwev-card:hover { transform: translateY(-4px); border-color: var(--aw-line); background: var(--aw-panel-2); }
.aniwev-card > a { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; background: #141720; }
.aniwev-card img { width: 100%; height: 100%; object-fit: cover; }
.aniwev-card-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: rgba(229,9,20,.92);
  opacity: 0;
  transform: scale(.88);
  transition: opacity .18s ease, transform .18s ease;
}
.aniwev-card:hover .aniwev-card-play { opacity: 1; transform: scale(1); }
.aniwev-card-body { padding: 11px; }
.aniwev-card h3 { margin: 0 0 7px; font-size: 15px; line-height: 1.25; }
.aniwev-card p { display: flex; gap: 8px; margin: 0 0 10px; color: var(--aw-muted); font-size: 12px; }
.aniwev-list-button {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--aw-line);
  border-radius: 6px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}
.aniwev-list-button.is-active { border-color: var(--aw-red); background: rgba(229,9,20,.18); }

.aniwev-detail-hero { align-items: center; gap: clamp(20px, 4vw, 54px); }
.aniwev-detail-poster { width: min(260px, 32vw); flex: 0 0 auto; border-radius: var(--aw-radius); overflow: hidden; box-shadow: 0 26px 60px rgba(0,0,0,.45); }
.aniwev-meta-line { display: flex; flex-wrap: wrap; gap: 14px; color: var(--aw-muted); }
.aniwev-detail-copy { max-width: 920px; line-height: 1.7; color: #e8eaf1; }

.aniwev-player-shell { background: #000; border-radius: var(--aw-radius); overflow: hidden; border: 1px solid var(--aw-line); }
.aniwev-player-stage { aspect-ratio: 16 / 9; background: #000; }
.aniwev-player-stage video, .aniwev-player-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.aniwev-player-empty { display: grid; place-content: center; height: 100%; text-align: center; color: var(--aw-muted); }
.aniwev-source-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; background: #111; }
.aniwev-source-bar span { color: var(--aw-muted); margin-right: 6px; }
.aniwev-source-bar button {
  border: 1px solid var(--aw-line);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 7px 12px;
  cursor: pointer;
}
.aniwev-source-bar button.is-active { background: var(--aw-red); border-color: var(--aw-red); }
.aniwev-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: #f3f4f8;
}
.aniwev-stars { display: flex; gap: 2px; }
.aniwev-stars button {
  border: 0;
  background: transparent;
  color: #6d7280;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.aniwev-stars button.is-active,
.aniwev-stars button:hover { color: #ffd166; }
.aniwev-rating small { color: var(--aw-muted); }
.aniwev-report-box {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.72);
}
.aniwev-report-box.is-open { display: grid; }
.aniwev-report-box > div {
  width: min(460px, 100%);
  background: var(--aw-panel);
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius);
  padding: 18px;
  position: relative;
}
.aniwev-report-box [data-report-close] {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.12);
  color: #fff;
}
.aniwev-report-box select,
.aniwev-report-box textarea,
.aniwev-request-form input,
.aniwev-request-form select,
.aniwev-request-form textarea {
  width: 100%;
  border: 1px solid var(--aw-line);
  border-radius: 6px;
  background: #10131b;
  color: #fff;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.aniwev-request-layout {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(260px, 1fr);
  gap: 24px;
  align-items: start;
}
.aniwev-request-form,
.aniwev-request-note {
  background: var(--aw-panel);
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius);
  padding: 18px;
}
.aniwev-request-form label { display: block; color: var(--aw-muted); margin-bottom: 10px; }
.aniwev-watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; padding-top: 92px; }
.aniwev-watch-title h1 { margin: 6px 0; }
.aniwev-watch-title p, .aniwev-watch-title a { color: var(--aw-muted); }
.aniwev-episode-nav { display: flex; gap: 10px; margin: 14px 0; }
.aniwev-watch-sidebar { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: var(--aw-radius); padding: 12px; max-height: calc(100vh - 112px); overflow: auto; }
.aniwev-side-episode, .aniwev-episode-row, .aniwev-history-list a {
  display: grid;
  grid-template-columns: 110px 32px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--aw-line);
}
.aniwev-side-episode { grid-template-columns: 76px 1fr; }
.aniwev-side-episode img, .aniwev-episode-row img, .aniwev-history-list img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.aniwev-side-episode.is-active, .aniwev-episode-row:hover { background: rgba(255,255,255,.07); }
.aniwev-episode-row small { color: var(--aw-muted); }
.aniwev-season-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.aniwev-season-tabs button {
  border: 1px solid var(--aw-line);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 9px 14px;
  cursor: pointer;
}
.aniwev-season-tabs button.is-active { background: #fff; color: #08090d; }
.aniwev-episode-list { display: none; background: var(--aw-panel); border-radius: var(--aw-radius); border: 1px solid var(--aw-line); overflow: hidden; }
.aniwev-episode-list.is-active { display: block; }

.aniwev-search-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10001;
  background: rgba(4,5,8,.92);
  padding: 90px clamp(18px, 5vw, 72px);
}
.aniwev-search-overlay.is-open { display: block; }
.aniwev-search-panel { max-width: 980px; margin: 0 auto; position: relative; }
.aniwev-close { position: absolute; right: 0; top: -48px; width: 38px; height: 38px; border: 0; border-radius: 8px; color: #fff; background: rgba(255,255,255,.14); cursor: pointer; }
.aniwev-search-panel input {
  width: 100%;
  height: 58px;
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius);
  background: #11131a;
  color: #fff;
  padding: 0 18px;
  font-size: 20px;
}
.aniwev-search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 18px; }
.aniwev-search-hit { background: var(--aw-panel); border-radius: var(--aw-radius); overflow: hidden; }
.aniwev-search-hit img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.aniwev-search-hit span { display: block; padding: 9px; font-size: 13px; }

.aniwev-search-form { display: flex; gap: 8px; }
.aniwev-search-form input { min-height: 40px; border: 1px solid var(--aw-line); border-radius: 6px; background: #10131b; color: #fff; padding: 0 12px; }
.aniwev-search-form button { border: 0; border-radius: 6px; padding: 0 14px; background: #fff; color: #090a0f; font-weight: 700; }
.aniwev-footer { display: flex; justify-content: space-between; gap: 24px; padding: 36px clamp(18px, 4vw, 56px); color: var(--aw-muted); border-top: 1px solid var(--aw-line); margin-top: 40px; }
.aniwev-footer-menu { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.aniwev-continue-card { position: relative; overflow: hidden; min-height: 130px; border-radius: var(--aw-radius); background: var(--aw-panel); }
.aniwev-continue-card img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .8; }
.aniwev-continue-card span { position: absolute; left: 10px; right: 10px; bottom: 12px; font-weight: 800; }
.aniwev-continue-card b { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--aw-red); }
.aniwev-genre-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.aniwev-genre-cloud a { padding: 10px 14px; background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 6px; }

@media (max-width: 860px) {
  .aniwev-header { height: 62px; padding: 0 14px; }
  .aniwev-mobile-toggle { display: block; order: -1; }
  .aniwev-nav {
    position: fixed;
    inset: 62px 0 auto;
    display: none;
    padding: 16px;
    background: rgba(8,9,13,.98);
    border-top: 1px solid var(--aw-line);
  }
  .aniwev-nav.is-open { display: grid; }
  .aniwev-hero, .aniwev-detail-hero { min-height: 70vh; padding: 92px 18px 48px; }
  .aniwev-detail-hero { display: block; }
  .aniwev-detail-poster { width: 150px; margin-bottom: 18px; }
  .aniwev-hero h1, .aniwev-detail-info h1 { font-size: 42px; }
  .aniwev-row-scroll { grid-auto-columns: 42vw; }
  .aniwev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .aniwev-watch-layout { grid-template-columns: 1fr; padding-top: 76px; }
  .aniwev-request-layout { grid-template-columns: 1fr; }
  .aniwev-watch-sidebar { max-height: none; }
  .aniwev-side-episode, .aniwev-episode-row, .aniwev-history-list a { grid-template-columns: 92px 26px 1fr; }
  .aniwev-footer { display: block; }
}
