/* AniVerse Global Styles — system fonts, zero external dependencies */
:root {
  --bg: #0a0a0f;
  --bg-soft: #13131a;
  --bg-soft-2: #1a1a24;
  --bg-card: #16161f;
  --text: #e8e8ed;
  --text-soft: #a0a0b0;
  --text-muted: #6b6b80;
  --accent: #7c5cff;
  --accent-2: #ff6b9d;
  --accent-glow: rgba(124, 92, 255, 0.15);
  --border: rgba(255,255,255,0.06);
  --border-soft: rgba(255,255,255,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.av-container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.av-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.av-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.av-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
}
.av-logo-text { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.av-logo-text em { font-style: normal; color: var(--accent); }
.av-nav { display: flex; gap: 4px; }
.av-nav-link {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-soft); transition: all 0.2s;
}
.av-nav-link:hover { color: #fff; background: var(--bg-soft-2); }
.av-search {
  margin-left: auto; display: flex; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 12px; height: 38px; width: 260px;
  transition: border-color 0.2s;
}
.av-search:focus-within { border-color: var(--accent); }
.av-search input { flex: 1; background: none; border: none; color: var(--text); font-size: 14px; font-family: var(--font); outline: none; }
.av-search input::placeholder { color: var(--text-muted); }
.av-search button { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; display: flex; }
.av-search button:hover { color: var(--accent); }

/* ===== Hero ===== */
.av-hero { position: relative; min-height: 520px; display: flex; align-items: flex-end; padding-bottom: 48px; overflow: hidden; }
.av-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center top; filter: blur(2px) brightness(0.4); transform: scale(1.05); }
.av-hero-gradient { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,15,0.3) 0%, rgba(10,10,15,0.7) 50%, rgba(10,10,15,1) 100%); }
.av-hero-content { position: relative; z-index: 2; display: flex; gap: 32px; align-items: flex-end; }
.av-hero-poster { width: 200px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
.av-hero-poster img { aspect-ratio: 2/3; width: 100%; object-fit: cover; }
.av-hero-info { flex: 1; min-width: 0; }
.av-hero-badge {
  display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 12px; font-weight: 700; padding: 4px 14px;
  border-radius: 999px; margin-bottom: 12px;
}
.av-hero-title { font-size: 36px; font-weight: 800; line-height: 1.15; margin-bottom: 12px; letter-spacing: -0.5px; }
.av-hero-synopsis { font-size: 15px; color: var(--text-soft); line-height: 1.6; margin-bottom: 16px; max-width: 600px; }
.av-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.av-meta-pill {
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 999px; background: var(--bg-soft-2); color: var(--text-soft); border: 1px solid var(--border);
}
.av-meta-pill.rating { background: var(--accent-glow); color: var(--accent); border-color: rgba(124, 92, 255, 0.3); }
.av-hero-actions { display: flex; gap: 12px; }
.av-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), #9b7cff); color: #fff;
  font-weight: 600; font-size: 15px; padding: 12px 28px; border-radius: var(--radius-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.av-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35); }
.av-btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-soft-2); color: var(--text); font-weight: 600; font-size: 15px;
  padding: 12px 28px; border-radius: var(--radius-sm); border: 1px solid var(--border); transition: border-color 0.2s;
}
.av-btn-secondary:hover { border-color: var(--accent); }

/* ===== Sections ===== */
.av-section { padding: 32px 0; }
.av-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.av-section-title { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.av-title-icon { font-size: 20px; }
.av-see-all { font-size: 14px; font-weight: 500; color: var(--accent); transition: opacity 0.2s; }
.av-see-all:hover { opacity: 0.8; }

/* ===== Scroll Row ===== */
.av-scroll-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 8px; }
.av-scroll-row::-webkit-scrollbar { display: none; }
.av-scroll-item { flex: 0 0 170px; scroll-snap-align: start; }

/* ===== Grid ===== */
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }

/* ===== Cards ===== */
.av-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s; text-decoration: none; color: inherit;
}
.av-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 12px 40px rgba(124, 92, 255, 0.12); }
.av-card-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; background: linear-gradient(135deg, var(--bg-soft-2) 0%, var(--bg-soft) 50%, var(--bg-soft-2) 100%); }
.av-card-poster img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.av-card:hover .av-card-poster img { transform: scale(1.08); }
.av-card-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-soft-2), var(--bg-soft)); font-size: 48px; font-weight: 800; color: var(--text-muted);
}
.av-card-overlay { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; }
.av-card-rating { background: rgba(124, 92, 255, 0.9); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.av-card-eps { background: rgba(0, 0, 0, 0.7); color: var(--text-soft); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.av-card-format { position: absolute; top: 8px; right: 8px; background: rgba(255, 107, 157, 0.85); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.av-card-info { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.av-card-title { font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.av-card-genres { display: flex; gap: 4px; flex-wrap: wrap; }
.av-genre-tag { font-size: 10px; color: var(--text-muted); background: var(--bg-soft-2); padding: 2px 6px; border-radius: 4px; }

/* ===== Footer ===== */
.av-footer { margin-top: 80px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; padding: 48px 20px 32px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; max-width: 360px; line-height: 1.6; }
.footer-badges { display: flex; gap: 8px; margin-top: 16px; }
.f-badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(124, 92, 255, 0.2); }
.footer-links { display: flex; gap: 60px; }
.footer-links h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-soft); margin-bottom: 16px; }
.footer-links a { display: block; font-size: 14px; color: var(--text-muted); padding: 4px 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px; text-align: center; }
.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .av-hero { min-height: 400px; padding-bottom: 32px; }
  .av-hero-content { flex-direction: column; align-items: center; text-align: center; }
  .av-hero-poster { width: 140px; }
  .av-hero-title { font-size: 24px; }
  .av-hero-synopsis { font-size: 14px; }
  .av-hero-actions { justify-content: center; }
  .av-hero-meta { justify-content: center; }
  .av-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .av-scroll-item { flex: 0 0 140px; }
  .av-nav { display: none; }
  .av-search { width: 180px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { gap: 32px; }
}

/* Screen-reader only — visible to crawlers, hidden visually */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
