/*
Theme Name: Duball Stream Lite
Theme URI: https://duball.click/
Author: Movie Auto Hub
Author URI: https://duball.click/
Description: Lightweight Thai movie catalog theme for Classic Editor, Rank Math Pro, and central iframe embeds.
Version: 0.1.1
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: duball-stream-lite
Tags: blog, entertainment, custom-logo, custom-menu, featured-images, one-column, two-columns, threaded-comments
*/

:root {
  --dsl-bg: #f6f7f9;
  --dsl-panel: #ffffff;
  --dsl-ink: #171717;
  --dsl-muted: #646b76;
  --dsl-line: #dfe4ea;
  --dsl-soft: #eef2f6;
  --dsl-accent: #008f7a;
  --dsl-accent-2: #c2412d;
  --dsl-warm: #b7791f;
  --dsl-dark: #111111;
  --dsl-radius: 8px;
  --dsl-shadow: 0 10px 28px rgba(17, 17, 17, 0.08);
  --dsl-max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dsl-ink);
  background: var(--dsl-bg);
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

img,
iframe,
video {
  max-width: 100%;
}

img {
  height: auto;
}

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 10px 12px;
  border-radius: var(--dsl-radius);
  color: #ffffff;
  background: var(--dsl-dark);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.adult-notice {
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  color: #ffffff;
  background: #171717;
}

.adult-notice__inner {
  width: min(var(--dsl-max), calc(100% - 32px));
  min-height: 42px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.35;
}

.adult-notice strong {
  min-width: 38px;
  border-radius: var(--dsl-radius);
  padding: 3px 7px;
  color: #ffffff;
  background: var(--dsl-accent-2);
  text-align: center;
}

.site-header__inner,
.site-footer__inner,
.wrap {
  width: min(var(--dsl-max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--dsl-accent);
  font-weight: 900;
}

.brand__text strong,
.brand__text span {
  display: block;
}

.brand__text strong {
  font-size: 16px;
  line-height: 1.15;
}

.brand__text span {
  color: var(--dsl-muted);
  font-size: 12px;
}

.primary-nav ul {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--dsl-radius);
  padding: 0 12px;
  color: var(--dsl-muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--dsl-ink);
  background: var(--dsl-soft);
}

.header-search {
  width: min(260px, 24vw);
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--dsl-line);
  border-radius: var(--dsl-radius);
  padding: 0 12px;
  color: var(--dsl-ink);
  background: #ffffff;
  font: inherit;
}

.search-submit,
.button,
.nav-links a,
.page-numbers {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dsl-line);
  border-radius: var(--dsl-radius);
  padding: 0 13px;
  color: var(--dsl-ink);
  background: #ffffff;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.search-submit,
.button--primary {
  border-color: var(--dsl-accent);
  color: #ffffff;
  background: var(--dsl-accent);
}

.hero {
  background: #151515;
  color: #ffffff;
}

.hero__inner {
  width: min(var(--dsl-max), calc(100% - 32px));
  min-height: 300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 34px;
  align-items: center;
  padding: 36px 0 34px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 4.8vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 17px;
}

.hero__search {
  max-width: 620px;
  margin-top: 24px;
}

.hero__search .search-field {
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.18);
}

.hero__search .search-submit {
  min-height: 48px;
}

.hero__panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--dsl-radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.hero__panel strong,
.hero__panel span {
  display: block;
}

.hero__panel strong {
  font-size: 18px;
}

.hero__panel span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.hero__stats div {
  border-radius: var(--dsl-radius);
  padding: 12px 10px;
  background: #ffffff;
  color: var(--dsl-ink);
}

.hero__stats b,
.hero__stats small {
  display: block;
}

.hero__stats b {
  font-size: 21px;
  line-height: 1.1;
}

.hero__stats small {
  color: var(--dsl-muted);
  font-size: 12px;
}

.main {
  padding: 30px 0 52px;
}

.section-head,
.archive-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2,
.archive-head h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.16;
}

.section-head p,
.archive-head p {
  margin: 5px 0 0;
  color: var(--dsl-muted);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.movie-card {
  min-width: 0;
  border: 1px solid var(--dsl-line);
  border-radius: var(--dsl-radius);
  background: var(--dsl-panel);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.03);
}

.movie-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #d9dee5;
  text-decoration: none;
}

.movie-card__cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.movie-card:hover img {
  transform: scale(1.025);
}

.movie-card__code {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--dsl-radius);
  padding: 0 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.movie-card__body {
  padding: 13px;
}

.movie-card h2,
.movie-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.movie-card h2 a,
.movie-card h3 a {
  text-decoration: none;
}

.movie-card p {
  display: -webkit-box;
  min-height: 43px;
  margin: 8px 0 0;
  color: var(--dsl-muted);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--dsl-muted);
  background: var(--dsl-soft);
  font-size: 12px;
  font-weight: 800;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.post-panel,
.sidebar-panel {
  border: 1px solid var(--dsl-line);
  border-radius: var(--dsl-radius);
  background: var(--dsl-panel);
}

.post-panel {
  padding: clamp(18px, 3vw, 30px);
}

.entry-title {
  margin: 0;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.entry-summary {
  margin: 14px 0 0;
  color: var(--dsl-muted);
  font-size: 17px;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.player-shell {
  margin: 22px 0;
  border-radius: var(--dsl-radius);
  background: #000000;
  overflow: hidden;
}

.player-shell iframe,
.entry-content iframe,
.wp-block-embed iframe {
  width: 100%;
  min-height: min(730px, 72vh);
  border: 0;
  display: block;
  background: #000000;
}

.movie-cover {
  margin: 18px 0;
}

.movie-cover img {
  width: 100%;
  border-radius: var(--dsl-radius);
  border: 1px solid var(--dsl-line);
  display: block;
}

.entry-content {
  color: #272727;
}

.entry-content h2,
.entry-content h3 {
  margin: 28px 0 10px;
  line-height: 1.2;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin: 0 0 16px;
}

.entry-content ul {
  padding-left: 22px;
}

.entry-content a {
  color: var(--dsl-accent);
  font-weight: 800;
}

.sidebar-panel {
  position: sticky;
  top: 92px;
  padding: 16px;
}

.sidebar-panel h2,
.sidebar-panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.info-list div {
  border-radius: var(--dsl-radius);
  padding: 10px;
  background: var(--dsl-soft);
}

.info-list dt {
  color: var(--dsl-muted);
  font-size: 12px;
  font-weight: 800;
}

.info-list dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 900;
}

.nav-links,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.page-numbers.current {
  border-color: var(--dsl-accent);
  color: #ffffff;
  background: var(--dsl-accent);
}

.not-found {
  max-width: 760px;
  margin: 0;
}

.empty-catalog {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.empty-catalog__mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: var(--dsl-radius);
  color: #ffffff;
  background: var(--dsl-accent);
  font-size: 24px;
  font-weight: 900;
}

.empty-catalog h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.16;
}

.empty-catalog p {
  margin: 8px 0 0;
  color: var(--dsl-muted);
}

.empty-catalog .search-form {
  max-width: 620px;
  margin-top: 18px;
}

.admin-note {
  border-left: 4px solid var(--dsl-accent);
  padding-left: 12px;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--dsl-line);
  color: var(--dsl-muted);
  background: #ffffff;
}

.site-footer__inner {
  min-height: 88px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}

@media (max-width: 980px) {
  .site-header__inner,
  .hero__inner,
  .single-layout {
    grid-template-columns: 1fr;
  }

  .primary-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .header-search {
    width: 100%;
  }

  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: static;
  }

  .home .header-search {
    display: none;
  }

  .hero__inner {
    min-height: 0;
    padding: 28px 0;
  }

  .hero__stats,
  .movie-grid,
  .empty-catalog {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 34px;
  }

  .search-form {
    display: grid;
  }

  .section-head,
  .archive-head,
  .site-footer__inner {
    display: grid;
  }
}
