/* ============================================================
   Animeverse — Shared Layout Styles (shared/layout.css)
   ============================================================ */

:root {
  --av-bg: #0f0a1f;
  --av-surface: #1b1035;
  --av-accent: #6d28d9;
  --av-accent-2: #f94fc1;
  --av-spark: #ffc857;
  --av-text: #f4f2fa;
  --av-text-muted: #a89bc4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--av-bg);
  color: var(--av-text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

h1, h2, h3, .av-logo span {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  font-weight: 700;
}

.av-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--av-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.av-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--av-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.av-logo img {
  border-radius: 8px;
}

.av-search {
  display: flex;
  flex: 1 1 160px; /* always keeps at least 160px, grows to fill remaining space */
  min-width: 0;    /* lets the row wrap instead of forcing overflow */
  max-width: 420px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.av-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  color: var(--av-text);
  font-size: 0.9rem;
  outline: none;
}

.av-search button {
  background: transparent;
  border: none;
  padding: 0 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* The ad slot ALWAYS sits on its own full-width row, below the
   logo+search row — never squeezed inline with them. This is what
   was previously starving the search bar of space on phone screens
   (a fixed 300px-wide slot competing with logo+search in one row). */
.av-ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-basis: 100%;
  order: 3;
}

#ad-banner-slot {
  width: 300px;
  height: 100px;
}

.av-sponsored-badge {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--av-text-muted);
  margin-bottom: 0.2rem;
}

/* Desktop / wider screens: 300x250 */
@media (min-width: 601px) {
  #ad-banner-slot {
    width: 300px;
    height: 250px;
  }
}

.av-footer {
  background: var(--av-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--av-text-muted);
  font-size: 0.85rem;
}

.av-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.av-footer-links a {
  color: var(--av-text-muted);
  text-decoration: none;
}

.av-footer-links a:hover {
  color: var(--av-text);
}

.av-copyright {
  margin: 0;
}
