/*
Theme Name: MangaTube
Theme URI:  https://hentaianimetube.com
Author:      HentaiAnimeTube
Author URI:  https://hentaianimetube.com
Description: A cinematic dark theme for hentai anime: glass panels, lime accent, soft glows and large rounded artwork.
Version:     2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mangatube
Tags:        video, hentai, anime, dark, grid, custom-menu, featured-images, translation-ready
*/

:root {
  --bg:        #07080b;
  --bg-2:      #0b0d12;
  --panel:     rgba(255, 255, 255, .045);
  --panel-2:   rgba(255, 255, 255, .075);
  --line:      rgba(255, 255, 255, .10);
  --line-2:    rgba(255, 255, 255, .18);
  --text:      #f1f3f7;
  --muted:     #98a0ae;
  --lime:      #c8ff3d;
  --lime-dk:   #a4d921;
  --blue:      #6ea8ff;
  --display:   "Sora", "Segoe UI", system-ui, sans-serif;
  --body:      "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:      "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --max:       1420px;
  --pad:       clamp(16px, 3vw, 36px);
  --r-card:    18px;
  --r-hero:    26px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 520px at 78% -12%, rgba(200, 255, 61, .10), transparent 60%),
    radial-gradient(900px 500px at 8% 6%, rgba(110, 168, 255, .07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
::selection { background: var(--lime); color: #0a0b0d; }

/* ============================================================ header */
.top {
  position: sticky; top: 0; z-index: 90;
  background: rgba(7, 8, 11, .72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: var(--max); margin: 0 auto; padding: 12px var(--pad);
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); min-height: 74px;
}

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-badge {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--lime), #86c412 70%);
  color: #0a0b0d; font-family: var(--display); font-size: 13px; font-weight: 800; letter-spacing: -.02em;
  box-shadow: 0 6px 22px rgba(200, 255, 61, .28);
}
.brand-name {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(17px, 2vw, 21px); line-height: 1; letter-spacing: -.03em;
  text-transform: uppercase;
}
.brand-name em { font-style: normal; color: var(--lime); }
.brand-sub {
  display: block; font-family: var(--mono); font-size: 8.5px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 4px;
}

.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  display: inline-block; padding: 8px 13px; border-radius: 999px;
  font-family: var(--body); font-size: 12.5px; font-weight: 600; letter-spacing: -.01em;
  color: var(--muted); transition: color .15s, background .15s;
}
.nav a:hover, .nav .current-menu-item > a { color: var(--text); background: var(--panel-2); }

.search-form { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.search-form input[type="search"] {
  width: clamp(150px, 15vw, 210px);
  background: var(--panel); border: 1px solid var(--line); border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 10px 15px; color: var(--text);
  font-family: var(--body); font-size: 12.5px;
}
.search-form input[type="search"]::placeholder { color: var(--muted); }
.search-form input[type="search"]:focus { outline: none; border-color: var(--line-2); background: rgba(255,255,255,.07); }
.search-form .search-submit, .search-form button {
  background: var(--lime); border: 1px solid var(--lime); color: #0a0b0d;
  border-radius: 0 999px 999px 0; padding: 10px 18px; cursor: pointer;
  font-family: var(--body); font-size: 12px; font-weight: 700;
  transition: filter .15s;
}
.search-form .search-submit:hover, .search-form button:hover { filter: brightness(1.08); }

/* ticker */
.ticker { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.ticker-inner {
  max-width: var(--max); margin: 0 auto; padding: 9px var(--pad);
  display: flex; align-items: center; gap: 12px; overflow: hidden;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.ticker-label {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  color: var(--lime); font-weight: 700;
}
.ticker-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.ticker a { color: var(--muted); }
.ticker a:hover { color: var(--text); }
.ticker-dot { color: rgba(255,255,255,.22); flex-shrink: 0; }

/* ============================================================ hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(28px, 4.4vw, 62px) var(--pad) 0;
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(24px, 3.6vw, 60px); align-items: center;
}
.hero-copy { min-width: 0; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--lime);
  border: 1px solid rgba(200,255,61,.35); background: rgba(200,255,61,.07);
  border-radius: 999px; padding: 6px 12px; margin: 0 0 20px;
}
.hero-kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.5rem, 6.2vw, 4.9rem);
  line-height: .94; letter-spacing: -.045em; margin: 0 0 18px; max-width: 16ch;
  background: linear-gradient(180deg, #fff 40%, #c6ccd6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, var(--lime) 10%, #93c718 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy p { color: var(--muted); max-width: 50ch; margin: 0 0 24px; font-size: clamp(.95rem, 1.45vw, 1.04rem); }

.hero-stats {
  display: flex; gap: clamp(18px, 3vw, 38px); list-style: none;
  margin: 26px 0 0; padding: 0;
}
.hero-stats li { display: flex; flex-direction: column; position: relative; padding-left: 16px; }
.hero-stats li::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
  border-radius: 2px; background: linear-gradient(180deg, var(--lime), transparent);
}
.hero-stats strong { font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1; letter-spacing: -.03em; }
.hero-stats span { margin-top: 6px; font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* featured */
.tape {
  position: relative; display: block; border-radius: var(--r-hero);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--line-2);
  padding: 10px; isolation: isolate;
  box-shadow: 0 34px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tape::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit;
  background: radial-gradient(60% 60% at 70% 0%, rgba(200,255,61,.25), transparent 70%);
  opacity: .55; filter: blur(18px);
}
.tape:hover { transform: translateY(-4px); border-color: rgba(200,255,61,.45); box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 40px rgba(200,255,61,.12); }
.tape-label {
  position: absolute; top: 22px; left: 22px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(7,8,11,.72); backdrop-filter: blur(6px);
  border: 1px solid rgba(200,255,61,.45); color: var(--lime);
  border-radius: 999px; padding: 5px 11px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.tape-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.tape-frame { position: relative; display: block; overflow: hidden; aspect-ratio: 16/9; border-radius: 18px; background: #05060a; }
.tape-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tape:hover .tape-frame img { transform: scale(1.035); }
.tape-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(5,6,10,.85), rgba(5,6,10,.05) 55%);
}
.tape-play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; }
.tape-play svg {
  width: 40px; height: 40px; padding: 14px; box-sizing: content-box;
  color: #0a0b0d; background: rgba(200,255,61,.94);
  border-radius: 50%; backdrop-filter: blur(4px);
  box-shadow: 0 10px 34px rgba(200,255,61,.35), 0 0 0 8px rgba(200,255,61,.10);
  transition: transform .2s ease;
}
.tape:hover .tape-play svg { transform: scale(1.07); }
.tape-body { display: block; padding: 14px 8px 8px; }
.tape-cat {
  display: inline-block; font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--lime);
  background: rgba(200,255,61,.10); border: 1px solid rgba(200,255,61,.25);
  border-radius: 999px; padding: 3px 9px; margin-bottom: 9px;
}
.tape-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-family: var(--display); font-weight: 600; font-size: clamp(.95rem, 1.4vw, 1.1rem);
  line-height: 1.32; letter-spacing: -.02em; color: var(--text);
}
.tape-meta { display: block; margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.tape-meta .sep { margin: 0 7px; color: rgba(255,255,255,.25); }

/* ============================================================ sections */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 38px 0 18px;
}
.section-head h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -.035em; margin: 0;
}
.section-head h2 span { color: var(--lime); }
.section-count { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 7px 13px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--muted);
  transition: all .15s;
}
.chip:hover { color: #0a0b0d; background: var(--lime); border-color: var(--lime); }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(200,255,61,.40);
  box-shadow: 0 20px 46px rgba(0,0,0,.5), 0 0 0 1px rgba(200,255,61,.15);
}

.thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 16/9; background: #05060a; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(5,6,10,.55), transparent 50%);
}

.badge {
  position: absolute; right: 9px; bottom: 9px; z-index: 3;
  background: rgba(7,8,11,.78); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); color: var(--text);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 999px;
}
.badge-hd {
  position: absolute; left: 9px; top: 9px; z-index: 3;
  background: rgba(200,255,61,.92); color: #0a0b0d;
  font-family: var(--mono); font-size: 8.5px; font-weight: 800; letter-spacing: .12em;
  padding: 2px 7px; border-radius: 999px;
}

.body { padding: 13px 14px 15px; }
.card-cat {
  display: block; font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--lime); margin-bottom: 6px;
}
.card-title {
  margin: 0; font-family: var(--body); font-weight: 650; font-size: clamp(.88rem, 1.15vw, .96rem);
  line-height: 1.38; letter-spacing: -.015em; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* pagination */
.pager { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; padding: 36px 0 8px; }
.pager .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--muted);
}
.pager .page-numbers:hover, .pager .page-numbers.current { background: var(--lime); border-color: var(--lime); color: #0a0b0d; }

/* ============================================================ single */
.clip { max-width: var(--max); margin: 0 auto; padding: 22px var(--pad) 0; }
.crumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 16px;
}
.crumbs a:hover { color: var(--lime); }

.player-frame {
  position: relative; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line-2); background: #040508;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(200,255,61,.06);
}
.player-frame::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); border-radius: inherit;
}
.player-frame video { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }

.clip-head { padding: 26px 0 0; }
.clip-cats { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.clip-cats a {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--lime); background: rgba(200,255,61,.08); border: 1px solid rgba(200,255,61,.28);
  border-radius: 999px; padding: 4px 10px;
}
.clip-cats a:hover { background: var(--lime); color: #0a0b0d; }
.clip-title {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.02; letter-spacing: -.04em; margin: 0 0 18px; max-width: 26ch;
}

.meta-row {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 0 0 6px; margin: 0 0 22px;
}
.meta-row div {
  display: flex; align-items: baseline; gap: 7px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px;
}
.meta-row dt { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meta-row dd { margin: 0; font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--text); }

.clip-desc { color: var(--muted); font-size: .97rem; line-height: 1.8; max-width: 78ch; }
.clip-desc p { margin: 0 0 1em; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; padding: 20px 0 8px; }
.tags a {
  font-family: var(--body); font-size: 12px; font-weight: 500;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px;
}
.tags a:hover { color: var(--text); border-color: var(--line-2); background: var(--panel-2); }

.rule {
  display: flex; align-items: center; gap: 14px; margin: 44px 0 4px;
  font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  letter-spacing: -.03em;
}
.rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

/* ============================================================ pages / 404 */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 40px var(--pad) 80px; }
.page-wrap h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  letter-spacing: -.04em; margin: 0 0 22px;
}
.entry-content { color: var(--muted); font-size: .97rem; line-height: 1.8; }
.entry-content h2, .entry-content h3 { font-family: var(--display); font-weight: 700; color: var(--text); letter-spacing: -.03em; margin: 1.7em 0 .5em; }
.entry-content h2 { font-size: 1.3rem; }
.entry-content a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.entry-content code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-family: var(--mono); font-size: .85em; color: var(--lime); }
.entry-content blockquote { border-left: 3px solid var(--lime); margin: 1.4em 0; padding-left: 16px; }

.empty { padding: 80px var(--pad); text-align: center; }
.empty h2 { font-family: var(--display); font-weight: 800; margin: 0 0 8px; }
.empty p { color: var(--muted); margin: 0 0 22px; }
.btn {
  display: inline-block; background: var(--lime); color: #0a0b0d;
  border-radius: 999px; font-family: var(--body); font-size: 13px; font-weight: 700;
  padding: 11px 20px; box-shadow: 0 10px 30px rgba(200,255,61,.2);
}
.btn:hover { filter: brightness(1.07); }

.err { max-width: var(--max); margin: 0 auto; padding: 70px var(--pad) 100px; }
.err-num { font-family: var(--display); font-weight: 800; font-size: clamp(5rem, 15vw, 10rem); line-height: .85; margin: 0; letter-spacing: -.06em; }
.err-num span { color: var(--lime); }
.err p { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 26px; }

/* ============================================================ footer */
.footer { border-top: 1px solid var(--line); margin-top: 60px; background: linear-gradient(180deg, rgba(255,255,255,.02), transparent); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 44px var(--pad) 46px; }
.footer-mark {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 6.4vw, 4.2rem);
  line-height: .92; letter-spacing: -.05em; margin: 0 0 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.15));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-mark em {
  font-style: normal;
  background: linear-gradient(180deg, var(--lime), rgba(200,255,61,.35));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-grid h4 { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: rgba(241,243,247,.7); font-size: .88rem; }
.footer-grid a:hover { color: var(--lime); }
.footer-note { color: var(--muted); font-size: .78rem; line-height: 1.75; margin: 0; }
.age-badge {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--lime);
}

/* ============================================================ responsive */
@media (max-width: 980px) {
  .top-inner { flex-wrap: wrap; row-gap: 10px; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav ul::-webkit-scrollbar { display: none; }
  .search-form { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .tape { max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .search-form { width: 100%; order: 4; }
  .search-form input[type="search"] { width: 100%; flex: 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hero h1 { font-size: clamp(2.05rem, 11vw, 3.1rem); }
  .body { padding: 10px 11px 13px; }
  .card-title { font-size: .8rem; }
  .card-meta { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .meta-row div { padding: 5px 10px; }
}
@media (min-width: 1600px) { :root { --max: 1560px; } }
