/* ================================================================
   MyAsiaTV — Professional Theme
   Modern Asian Drama Streaming Site
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0d1a;
  --bg2:       #12122a;
  --bg3:       #1a1a38;
  --card:      #181830;
  --border:    #242448;
  --gold:      #f5c518;
  --gold2:     #d4a017;
  --gold-dim:  rgba(245,197,24,.12);
  --text:      #e8e8f0;
  --text2:     #9999bb;
  --text3:     #6666aa;
  --accent:    #7c4dff;
  --red:       #e53935;
  --green:     #43a047;
  --radius:    8px;
  --radius-sm: 4px;
  --shadow:    0 4px 24px rgba(0,0,0,.5);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.35);
  --trans:     all .2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; transition: var(--trans); }
a:hover { color: #fff; }
img { border: 0; max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, button, textarea, select { font-family: inherit; }

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ══════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════ */
.site-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.site-content {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 24px;
  padding: 24px 0 40px;
}
.content-area { min-width: 0; }
#secondary.sidebar { min-width: 0; }

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.site-header {
  background: var(--bg2);
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,.6);
}

/* Top bar */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo */
.site-branding { flex-shrink: 0; }
.site-branding a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-text .brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.5px;
}
.logo-text .brand-sub {
  font-size: 9px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* Search */
.header-search { flex: 1; max-width: 500px; }
.search-form {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: var(--trans);
}
.search-form:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.search-form input {
  flex: 1;
  padding: 9px 16px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.search-form input::placeholder { color: var(--text3); }
.search-form button {
  padding: 0 16px;
  background: var(--gold);
  border: none;
  cursor: pointer;
  border-radius: 0 24px 24px 0;
  transition: var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-form button:hover { background: var(--gold2); }
.search-form button svg { width: 16px; height: 16px; fill: #111; }

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header-link {
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: var(--trans);
}
.header-link:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  gap: 5px;
  padding: 0;
}
.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: var(--trans);
}

/* A-Z Bar */
.az-bar {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.az-bar .site-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
}
.az-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 6px;
  white-space: nowrap;
}
.az-bar a {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: var(--trans);
}
.az-bar a:hover, .az-bar a.active {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

/* Main Navigation */
.main-navbar {
  background: var(--bg3);
  border-top: 1px solid var(--border);
}
.main-navbar .site-wrapper {
  display: flex;
  align-items: center;
  max-width: 1200px;
}
.main-menu {
  display: flex;
  align-items: center;
  gap: 0;
}
.main-menu > li { position: relative; }
.main-menu > li > a {
  display: block;
  padding: 11px 16px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  transition: var(--trans);
  border-bottom: 2px solid transparent;
}
.main-menu > li > a:hover,
.main-menu > li.active > a {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: var(--gold-dim);
}
.main-menu > li:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--trans);
}
.dropdown a {
  display: block;
  padding: 9px 16px;
  color: var(--text2);
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  transition: var(--trans);
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { color: var(--gold); background: var(--gold-dim); padding-left: 20px; }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: var(--trans);
}
.mobile-nav a:hover { color: var(--gold); background: var(--gold-dim); padding-left: 28px; }

/* ══════════════════════════════════════════════
   DRAMA CARDS
══════════════════════════════════════════════ */
.section-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.section-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  background: var(--gold);
  border-radius: 2px;
}
.section-more {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  padding: 4px 12px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: var(--trans);
}
.section-more:hover { background: var(--gold); color: #111; }

/* Tabs */
.tab-nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 18px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.tab-btn {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .5px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--trans);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text2); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-content .tab-pane { display: none; padding: 16px; }
.tab-content .tab-pane.active { display: block; }

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

/* Drama Card */
.drama-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: var(--trans);
  cursor: pointer;
}
.drama-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(245,197,24,.2);
}
.drama-card a { display: block; color: inherit; }
.drama-card a:hover { color: inherit; }

.card-thumb {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.drama-card:hover .card-thumb img { transform: scale(1.05); }

/* Card overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
  opacity: 0;
  transition: var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
}
.drama-card:hover .card-overlay { opacity: 1; }
.play-btn {
  width: 44px;
  height: 44px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.7);
  transition: var(--trans);
}
.drama-card:hover .play-btn { transform: scale(1); }
.play-btn svg { width: 18px; height: 18px; fill: #111; margin-left: 2px; }

/* Badges on card */
.card-badges {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 800;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.4;
}
.badge-sub   { background: var(--gold); color: #111; }
.badge-raw   { background: var(--accent); color: #fff; }
.badge-eng   { background: var(--green); color: #fff; }
.badge-ep    { background: rgba(0,0,0,.8); color: #fff; border: 1px solid rgba(255,255,255,.15); }
.badge-drama { background: #1e3a8a; color: #93c5fd; }
.badge-movie { background: #14532d; color: #86efac; }
.badge-kshow { background: #581c87; color: #d8b4fe; }
.badge-new   { background: var(--red); color: #fff; }
.badge-ongoing   { background: #15803d; color: #fff; }
.badge-completed { background: #374151; color: #d1d5db; }

.ep-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,.85);
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid rgba(245,197,24,.3);
}

/* Card info */
.card-info {
  padding: 8px 8px 10px;
}
.card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.card-meta {
  font-size: 10px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════ */
.sidebar-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.sidebar-title {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--gold);
  border-radius: 2px;
}
.sidebar-list { padding: 8px 0; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  transition: var(--trans);
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover { background: var(--gold-dim); }
.sidebar-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-thumb {
  width: 44px;
  height: 62px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.sidebar-info { min-width: 0; flex: 1; }
.sidebar-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sidebar-name a { color: inherit; }
.sidebar-name a:hover { color: var(--gold); }
.sidebar-sub {
  font-size: 10px;
  color: var(--text3);
}

/* Genre cloud */
.genre-cloud {
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.genre-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  transition: var(--trans);
}
.genre-tag:hover {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

/* Country list */
.country-list { padding: 8px 14px; }
.country-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: var(--trans);
}
.country-link:last-child { border-bottom: none; }
.country-link:hover { color: var(--gold); padding-left: 6px; }
.country-flag { font-size: 18px; }

/* ══════════════════════════════════════════════
   A-Z LIST PAGE
══════════════════════════════════════════════ */
.az-list-wrap { padding: 16px; }
.az-jump-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.az-jump-bar a {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--trans);
}
.az-jump-bar a:hover { background: var(--gold); color: #111; border-color: var(--gold); }

.az-letter-section { margin-bottom: 8px; }
.az-letter-heading {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  padding: 10px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.az-drama-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.az-drama-item {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: var(--trans);
}
.az-drama-item:hover { background: var(--gold-dim); }
.az-drama-item a { font-size: 12px; color: var(--text2); font-weight: 500; }
.az-drama-item a:hover { color: var(--gold); }

/* ══════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════ */
.pagination {
  padding: 20px;
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  background: var(--bg3);
  transition: var(--trans);
}
.pagination a:hover { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.pagination span.current { background: var(--gold); color: #111; border-color: var(--gold); }

/* ══════════════════════════════════════════════
   DRAMA DETAIL
══════════════════════════════════════════════ */
.drama-detail-wrap { padding: 20px; }
.drama-top { display: flex; gap: 20px; }
.drama-poster {
  flex-shrink: 0;
  width: 180px;
}
.drama-poster img {
  width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.drama-info { flex: 1; min-width: 0; }
.drama-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.drama-aka { font-size: 13px; color: var(--text3); margin-bottom: 14px; }
.drama-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.drama-meta-item { font-size: 12px; }
.meta-label { color: var(--text3); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.meta-value { color: var(--text); font-weight: 600; }
.drama-synopsis {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  margin-top: 12px;
}
.drama-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.drama-tag {
  padding: 4px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 11px;
  border-radius: 20px;
}

/* Episode list */
.ep-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.ep-list { max-height: 500px; overflow-y: auto; }
.ep-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  transition: var(--trans);
}
.ep-item:hover { background: var(--gold-dim); }
.ep-item.active { background: rgba(245,197,24,.08); }
.ep-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text3);
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}
.ep-info { flex: 1; min-width: 0; }
.ep-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.ep-title a { color: inherit; }
.ep-title a:hover { color: var(--gold); }
.ep-date { font-size: 10px; color: var(--text3); }
.ep-views { font-size: 10px; color: var(--text3); white-space: nowrap; }

/* ══════════════════════════════════════════════
   WATCH PAGE
══════════════════════════════════════════════ */
.video-wrap { background: #000; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.player-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}
.player-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.server-bar {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.server-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.srv-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg2);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--trans);
}
.srv-btn.active, .srv-btn:hover {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}
.ep-nav {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border-top: 1px solid var(--border);
}
.ep-nav-btn {
  padding: 8px 18px;
  background: var(--gold);
  color: #111;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  transition: var(--trans);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ep-nav-btn:hover { background: var(--gold2); color: #111; }
.ep-nav-btn.disabled { background: var(--bg3); color: var(--text3); cursor: default; pointer-events: none; }
.watch-title {
  padding: 16px 18px;
  background: var(--card);
}
.watch-title h1 { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.breadcrumb {
  font-size: 11px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--text2); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--text3); }

/* ══════════════════════════════════════════════
   SEARCH / BROWSE
══════════════════════════════════════════════ */
.browse-header {
  padding: 16px 18px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.browse-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-select {
  padding: 7px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--gold); outline: none; }
.empty-msg {
  padding: 40px;
  text-align: center;
  color: var(--text3);
  font-style: italic;
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer {
  background: var(--bg2);
  border-top: 2px solid var(--gold);
  margin-top: 40px;
}
.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 16px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand { }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  margin-bottom: 12px;
}
.footer-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.footer-logo-text { font-size: 18px; font-weight: 800; color: var(--gold); }
.footer-desc {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.7;
  margin-bottom: 16px;
}
.footer-social { display: flex; gap: 8px; }
.social-btn {
  width: 34px;
  height: 34px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: 14px;
  transition: var(--trans);
}
.social-btn:hover { background: var(--gold); color: #111; border-color: var(--gold); }

.footer-col-title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: 12px;
  color: var(--text3);
  transition: var(--trans);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: var(--gold); padding-left: 4px; }

.footer-bottom {
  background: #090912;
  border-top: 1px solid var(--border);
}
.footer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copy {
  font-size: 11px;
  color: var(--text3);
}
.footer-copy a { color: var(--text3); }
.footer-copy a:hover { color: var(--gold); }
.footer-dmca {
  font-size: 11px;
  color: var(--text3);
}
.footer-bottom-links {
  display: flex;
  gap: 16px;
}
.footer-bottom-links a {
  font-size: 11px;
  color: var(--text3);
}
.footer-bottom-links a:hover { color: var(--gold); }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .site-content { grid-template-columns: 1fr 260px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .site-content {
    grid-template-columns: 1fr;
  }
  #secondary.sidebar { order: 2; }

  /* Header mobile */
  .header-top { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .header-search { order: 3; width: 100%; max-width: 100%; }
  .mobile-toggle { display: flex; }
  .az-bar { display: none; }
  .main-navbar { display: none; }
  .logo-text .brand-name { font-size: 16px; }

  /* Cards smaller on mobile */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
  .tab-content .tab-pane { padding: 10px; }

  /* Drama detail */
  .drama-top { flex-direction: column; }
  .drama-poster { width: 140px; }
  .drama-meta-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-main { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }

  /* A-Z */
  .az-drama-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .card-info { padding: 5px 5px 7px; }
  .card-title { font-size: 10px; }
  .footer-main { grid-template-columns: 1fr; }
  .drama-meta-grid { grid-template-columns: 1fr; }
  .az-drama-list { grid-template-columns: 1fr; }

  /* Keep Recently Drama/Movie/K-Show tabs on a single line like desktop */
  .tab-nav {
    flex-wrap: nowrap;
    padding: 0 6px;
    justify-content: space-between;
  }
  .tab-btn {
    padding: 10px 4px;
    font-size: 9.5px;
    letter-spacing: 0;
    flex: 1 1 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 360px) {
  .tab-btn { font-size: 8.5px; padding: 9px 2px; }
}

/* ── Utilities ────────────────────────────── */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text3); }
.mt-0 { margin-top: 0; }
.views-count { color: var(--text3); font-size: 10px; }
.views-count::before { content: '▶ '; }
