/* AiDramaCPS 1.6.0 — OLED cinema discovery */
:root {
  --bg: #07070C;
  --bg-elevated: #0C0C12;
  --bg-muted: #14141C;
  --surface-border: oklch(0.35 0.04 285 / 0.45);
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --accent: #E11D48;
  --accent-hover: #BE123C;
  --on-accent: #FFFFFF;
  --focus-ring: #F8FAFC;
  --shadow: 0 12px 40px oklch(0.2 0.06 350 / 0.45);
  --radius: 14px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-ui: "Manrope", system-ui, sans-serif;
  /* legacy aliases */
  --ad-bg: var(--bg);
  --ad-fg: var(--text);
  --ad-card: var(--bg-elevated);
  --ad-primary: var(--accent);
  --ad-primary-fg: var(--on-accent);
  --ad-accent: var(--bg-muted);
  --ad-accent-fg: var(--text);
  --ad-muted: var(--text-muted);
  --ad-border: var(--surface-border);
  --ad-radius: var(--radius);
  --ad-shadow: var(--shadow);
  --ad-font: var(--font-ui);
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.aidrama-skin,
body.home,
body.page {
  font-family: var(--font-ui) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
}

body.home .wp-site-blocks,
body.page .wp-site-blocks,
body.home .entry-content,
body.page .entry-content,
body.aidrama-skin .wp-site-blocks,
body.aidrama-skin .entry-content {
  background: var(--bg) !important;
  color: var(--text);
}

/* Sticky shell nav */
.aidrama-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}
.aidrama-topnav.is-solid {
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  border-bottom-color: var(--surface-border);
  box-shadow: 0 8px 24px oklch(0.15 0.04 350 / 0.35);
  backdrop-filter: blur(10px);
}
.aidrama-topnav .aidrama-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.aidrama-topnav nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}
.aidrama-topnav nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.aidrama-topnav nav a:hover,
.aidrama-topnav nav a:focus-visible {
  color: var(--text);
}
.aidrama-topnav .aidrama-nav-soft {
  color: var(--text-muted);
  font-weight: 500;
}
.aidrama-topnav .aidrama-nav-cta {
  background: var(--accent);
  color: var(--on-accent) !important;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  min-height: 40px;
}
.aidrama-topnav .aidrama-nav-cta:hover {
  background: var(--accent-hover);
  color: var(--on-accent) !important;
}

.aidrama-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

/* Hero — full-bleed OLED */
.aidrama-hero {
  position: relative;
  max-width: none;
  margin: 0 0 2rem;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem clamp(2.25rem, 5vw, 3.5rem);
  border-radius: 0;
  border: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, oklch(0.35 0.12 15 / 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, oklch(0.28 0.06 285 / 0.18), transparent 50%),
    var(--bg);
  box-shadow: none;
}
.aidrama-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.aidrama-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 860px) {
  .aidrama-hero-inner { grid-template-columns: 1fr; }
}

.aidrama-hero h1,
h1.wp-block-heading {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: clamp(1.85rem, 4.2vw, 2.85rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem !important;
  color: var(--text) !important;
}

.aidrama-hero p,
.aidrama-subhead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted) !important;
  max-width: 36rem;
  margin: 0 0 1rem !important;
  font-weight: 400;
}

.aidrama-hero-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  max-width: 360px;
  margin-left: auto;
}
.aidrama-hero-collage img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow);
  background: var(--bg-muted);
}
.aidrama-hero-collage img:nth-child(2),
.aidrama-hero-collage img:nth-child(4) {
  transform: translateY(12px);
}
@media (prefers-reduced-motion: reduce) {
  .aidrama-hero-collage img:nth-child(2),
  .aidrama-hero-collage img:nth-child(4) { transform: none; }
}

/* Buttons */
.wp-block-button__link,
.aidrama-cta .button,
.aidrama-form button,
.aidrama-btn {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 0.7rem 1.15rem !important;
  font-weight: 600 !important;
  font-family: var(--font-ui) !important;
  text-decoration: none !important;
  box-shadow: 0 8px 22px oklch(0.4 0.14 15 / 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wp-block-button__link:hover,
.aidrama-cta .button:hover,
.aidrama-form button:hover,
.aidrama-btn:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px oklch(0.35 0.14 15 / 0.42);
}
.wp-block-button__link:focus-visible,
.aidrama-btn:focus-visible,
.ad-play:focus-visible,
.aidrama-chip:focus-visible,
.aidrama-topnav a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}
.wp-block-button.is-style-outline .wp-block-button__link,
.aidrama-cta-secondary .wp-block-button__link {
  background: transparent !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  border: 1px solid var(--surface-border) !important;
  font-weight: 500 !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.aidrama-cta-secondary .wp-block-button__link:hover {
  color: var(--text) !important;
  border-color: color-mix(in srgb, var(--text) 35%, transparent) !important;
  background: var(--bg-muted) !important;
}
.wp-block-buttons { gap: 0.75rem !important; margin-top: 1.15rem; }

h2.wp-block-heading {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem) !important;
  margin-top: 2.25rem !important;
  letter-spacing: -0.015em;
  color: var(--text) !important;
}

/* Genre chips */
.aidrama-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 0.5rem;
  padding: 0;
  list-style: none;
}
.aidrama-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text);
  border: 1px solid var(--surface-border);
  text-decoration: none;
  font-weight: 560;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.aidrama-chip:hover {
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-muted));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--text);
  transform: translateY(-2px);
}

/* Soft publisher band */
.aidrama-publisher-band {
  margin: 2.5rem auto 1rem;
  max-width: 1120px;
  padding: 1.35rem 1.35rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
}
.aidrama-publisher-band h2 {
  margin-top: 0 !important;
  font-size: 1.2rem !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
}
.aidrama-publisher-band p {
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
  max-width: 40rem;
  line-height: 1.55;
  font-size: 0.95rem;
}
.aidrama-publisher-band .aidrama-btn,
.aidrama-publisher-band .wp-block-button__link {
  background: transparent !important;
  color: var(--text) !important;
  border: 1px solid var(--surface-border) !important;
  box-shadow: none !important;
  font-weight: 560 !important;
}
.aidrama-publisher-band .aidrama-btn:hover,
.aidrama-publisher-band .wp-block-button__link:hover {
  background: var(--bg-muted) !important;
  border-color: color-mix(in srgb, var(--text) 30%, transparent) !important;
}

/* Trust / FAQ */
.aidrama-faq {
  max-width: 1120px;
  margin: 2rem auto 1rem;
  padding: 0 0 1rem;
}
.aidrama-faq details {
  border-bottom: 1px solid var(--surface-border);
  padding: 0.85rem 0;
}
.aidrama-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-display);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.aidrama-faq details p {
  color: var(--text-muted);
  margin: 0.5rem 0 0.25rem;
  line-height: 1.55;
  font-size: 0.95rem;
}

/* Offer cards */
.aidrama-offers {
  list-style: none !important;
  padding: 0 !important;
  margin: 1rem 0 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
}
.aidrama-offers > li,
.aidrama-offers .aidrama-card {
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.aidrama-offers .aidrama-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--surface-border));
}
@media (prefers-reduced-motion: reduce) {
  .aidrama-offers .aidrama-card:hover { transform: none; }
}
.aidrama-offers .aidrama-card--text {
  padding: 1rem;
  gap: 0.55rem;
  min-height: 168px;
}
.aidrama-offers .ad-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-muted);
  overflow: hidden;
}
.aidrama-offers .ad-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 32%;
  background: linear-gradient(to top, oklch(0.12 0.02 285 / 0.65), transparent);
  pointer-events: none;
  z-index: 1;
}
.aidrama-offers .ad-preview,
.aidrama-offers .ad-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg-muted);
}
.aidrama-offers .ad-preview { z-index: 2; }
.aidrama-offers .ad-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem 1rem;
  flex: 1;
}
.aidrama-offers .ad-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.aidrama-offers .ad-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.aidrama-offers .ad-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--surface-border);
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}
.aidrama-offers .ad-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--text);
  flex: 1;
  letter-spacing: -0.01em;
}
.aidrama-offers .ad-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.aidrama-offers .ad-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.aidrama-offers .ad-actions a {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.55rem 0.7rem !important;
  border-radius: 9px !important;
  min-height: 44px;
}
.aidrama-offers .ad-actions a.ad-secondary {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--surface-border) !important;
  box-shadow: none !important;
  flex: 0 1 auto;
  min-width: 42%;
  font-weight: 500 !important;
}
.aidrama-offers .ad-actions a.ad-secondary:hover {
  color: var(--text) !important;
  background: var(--bg-muted) !important;
}

.aidrama-form, .aidrama-dash {
  max-width: 560px;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  color: var(--text);
}
.aidrama-dash { max-width: 1120px; }
.aidrama-form input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-top: 0.3rem;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--bg-muted);
  color: var(--text);
}
.aidrama-form input:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--accent);
}
.aidrama-errors { color: #fb7185; }
.aidrama-dash ul { padding-left: 1.1rem; }
.aidrama-dash code {
  background: var(--bg-muted);
  color: var(--text);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--surface-border);
}

.wp-block-navigation a { color: var(--text-muted) !important; }
.wp-block-site-title a {
  color: var(--text) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
}

.aidrama-trust-footer {
  max-width: 1120px;
  margin: 2.5rem auto 1.5rem;
  padding: 1.25rem 1.25rem 2rem;
  border-top: 1px solid var(--surface-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  background: var(--bg);
}
.aidrama-trust-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.65rem;
}
.aidrama-trust-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 560;
}
.aidrama-trust-footer a:hover { color: var(--text); text-decoration: underline; }
.aidrama-trust-footer .aidrama-sep { color: color-mix(in srgb, var(--text-muted) 60%, transparent); }
.aidrama-trust-footer .aidrama-copy { margin: 0; color: var(--text-muted); font-size: 0.85rem; }

.aidrama-anchor { scroll-margin-top: 5.5rem; height: 0; overflow: hidden; }
#dramas, #genres, #publishers, #faq { scroll-margin-top: 5.5rem; }

.aidrama-empty { color: var(--text-muted); padding: 1rem 0; }

/* Lazy preview play */
.aidrama-offers .ad-media--lazy { position: relative; }
.aidrama-offers .ad-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  color: var(--on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px oklch(0.15 0.04 350 / 0.45);
  backdrop-filter: blur(2px);
  transition: transform 0.15s ease, background 0.15s ease;
  padding: 0;
}
.aidrama-offers .ad-play svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
  fill: currentColor;
}
.aidrama-offers .ad-play:hover,
.aidrama-offers .ad-play:focus-visible {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.06);
  outline: none;
}
.aidrama-offers .ad-media--playing .ad-play,
.aidrama-offers .ad-media--playing::after { display: none; }
.aidrama-offers .ad-cover--placeholder {
  background: linear-gradient(160deg, var(--bg-muted), var(--bg));
}

/* Scroll reveal (progressive) */
.aidrama-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.aidrama-reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .aidrama-reveal { opacity: 1; transform: none; transition: none; }
}

/* Theme chrome overrides for dark */
body.aidrama-skin .wp-block-group,
body.aidrama-skin p,
body.aidrama-skin li {
  color: inherit;
}
body.aidrama-skin a:not(.wp-block-button__link):not(.aidrama-btn):not(.aidrama-chip):not(.ad-secondary) {
  color: color-mix(in srgb, var(--accent) 75%, var(--text));
}

@media (max-width: 720px) {
  .aidrama-hero { padding: 1.75rem 1rem 2rem; }
  .aidrama-hero-collage { max-width: 280px; margin: 0 auto; }
  .aidrama-offers {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  .aidrama-topnav { padding: 0.7rem 1rem; }
  .aidrama-topnav nav { gap: 0.25rem 0.75rem; }
}
