:root {
  --bg-root: #090a0f;
  --bg-elevated: #12141e;
  --bg-card: #161926;
  --bg-card-hover: #1d2131;
  --bg-glass: rgba(12, 14, 22, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f4f3ef;
  --text-secondary: #a8adbf;
  --text-muted: #70778f;
  --accent-gold: #e5a93c;
  --accent-gold-hover: #f3bc54;
  --accent-crimson: #e11d48;
  --accent-teal: #2dd4bf;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.45);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(229, 169, 60, 0.09), transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(225, 29, 72, 0.08), transparent 32%),
    var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1280px, 100% - 32px);
  margin-inline: auto;
}

/* Telemetry Top Bar */
.telemetry-bar {
  background: #050609;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
}

.telemetry-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.telemetry-left,
.telemetry-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill,
.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
}

.status-pill.is-live .dot {
  background: var(--accent-teal);
  box-shadow: 0 0 10px var(--accent-teal);
}

.status-pill.is-error .dot {
  background: var(--accent-crimson);
  box-shadow: 0 0 10px var(--accent-crimson);
}

.cf-badge {
  color: #f9b86c;
  border-color: rgba(249, 184, 108, 0.22);
}

/* Buttons */
.btn-accent,
.btn-accent-sm,
.btn-ghost,
.btn-ghost-sm,
.btn-outline-full,
.btn-icon,
.chip-btn {
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
}

.btn-accent {
  background: var(--accent-gold);
  color: #111;
  font-weight: 600;
  padding: 10px 18px;
}

.btn-accent:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-1px);
}

.btn-accent-sm {
  background: rgba(229, 169, 60, 0.16);
  border-color: rgba(229, 169, 60, 0.4);
  color: var(--accent-gold-hover);
  font-weight: 600;
  padding: 5px 12px;
  font-size: 12px;
}

.btn-accent-sm:hover {
  background: var(--accent-gold);
  color: #111;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  padding: 10px 16px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost-sm {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 11px;
  font-size: 12px;
}

.btn-ghost-sm:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-danger-sm {
  background: rgba(225, 29, 72, 0.14);
  border: 1px solid rgba(225, 29, 72, 0.45);
  color: #fda4af;
  padding: 5px 11px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-sm:hover {
  background: var(--accent-crimson);
  color: #fff;
}

.btn-footer-auth {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-footer-auth:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.login-sheet {
  width: min(440px, 100%);
}

.btn-outline-full {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  background: transparent;
  border-color: rgba(229, 169, 60, 0.35);
  color: var(--accent-gold-hover);
  font-weight: 600;
}

.btn-outline-full:hover {
  background: rgba(229, 169, 60, 0.12);
}

.btn-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  font-size: 18px;
}

.btn-icon:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #111;
  background: linear-gradient(135deg, #f3bc54, #d97706);
  box-shadow: 0 6px 20px rgba(229, 169, 60, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.2px;
}

.brand-text small {
  font-size: 11px;
  color: var(--text-muted);
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 9px 16px 9px 38px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-wrap input:focus {
  border-color: var(--accent-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--accent-gold);
  color: #111;
}

.sort-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}

/* Category Navigation */
.category-nav {
  border-top: 1px solid var(--border-subtle);
}

.category-list {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.cat-pill.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #101014;
  font-weight: 600;
}

/* Notice Banner */
.notice-banner {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(229, 169, 60, 0.35);
  background: rgba(229, 169, 60, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.notice-banner.is-error {
  border-color: rgba(225, 29, 72, 0.45);
  background: rgba(225, 29, 72, 0.1);
}

.notice-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}

/* Main Layout */
.main-layout {
  padding: 26px 0 60px;
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  margin-bottom: 34px;
}

.hero-primary {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  min-height: 430px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.hero-primary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.55s ease;
}

.hero-primary:hover img {
  transform: scale(1.03);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background: linear-gradient(
    to top,
    rgba(7, 8, 13, 0.96) 8%,
    rgba(7, 8, 13, 0.72) 48%,
    rgba(7, 8, 13, 0.18) 100%
  );
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag-premiere {
  background: var(--accent-crimson);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.tag-rating {
  background: rgba(229, 169, 60, 0.18);
  border: 1px solid rgba(229, 169, 60, 0.5);
  color: var(--accent-gold-hover);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.tag-cf {
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--accent-teal);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
}

.hero-overlay h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.22;
}

.hero-overlay p {
  margin: 0 0 16px;
  color: #d6d9e4;
  font-size: 14px;
  max-width: 62ch;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 18, 28, 0.72);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-glass:hover {
  border-color: var(--accent-gold);
  background: rgba(229, 169, 60, 0.16);
  color: var(--accent-gold-hover);
}

.hero-secondary-stack {
  display: grid;
  gap: 16px;
}

.hero-side-card {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.hero-side-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(229, 169, 60, 0.4);
  transform: translateY(-2px);
}

.hero-side-thumb {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: #0d0f17;
}

.hero-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-side-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.hero-side-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hero-side-body h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-inline-link {
  background: rgba(229, 169, 60, 0.12);
  border: 1px solid rgba(229, 169, 60, 0.35);
  color: var(--accent-gold-hover);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-inline-link:hover {
  background: var(--accent-gold);
  color: #111;
}

/* Content Grid + Sidebar */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
}

.section-sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.count-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 169, 60, 0.42);
  background: var(--bg-card-hover);
}

.post-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0f17;
}

.post-thumb.frame-16-9 {
  aspect-ratio: 16 / 9;
}

.post-thumb.frame-4-3 {
  aspect-ratio: 4 / 3;
}

.post-thumb.frame-1-1 {
  aspect-ratio: 1 / 1;
}

.post-thumb.frame-3-4 {
  aspect-ratio: 3 / 4;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s ease;
}

.img-focus-top {
  object-position: center top !important;
}

.img-focus-bottom {
  object-position: center bottom !important;
}

.img-focus-center {
  object-position: center center !important;
}

.post-card:hover .post-thumb img {
  transform: scale(1.04);
}

.post-thumb-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.thumb-cat {
  background: rgba(9, 10, 15, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.thumb-score {
  background: rgba(229, 169, 60, 0.92);
  color: #111;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.post-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.post-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.38;
}

.post-body p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-card-primary {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(229, 169, 60, 0.45);
  background: rgba(229, 169, 60, 0.14);
  color: var(--accent-gold-hover);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-primary:hover {
  background: var(--accent-gold);
  color: #111;
}

.btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.09);
}

/* Sidebar */
.sidebar {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 126px;
}

.side-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.side-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-gold);
  background: rgba(229, 169, 60, 0.12);
  border: 1px solid rgba(229, 169, 60, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
}

.side-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.box-office-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.box-office-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.box-office-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rank-num {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.box-office-item:first-child .rank-num {
  background: var(--accent-gold);
  color: #111;
}

.bo-info strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.bo-info small {
  font-size: 11px;
  color: var(--text-muted);
}

.bo-rev {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-teal);
}

/* Mini Gallery */
.mini-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-gallery button {
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0b0d14;
  cursor: pointer;
}

.mini-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.mini-gallery button:hover img {
  transform: scale(1.08);
}

/* Spec List */
.spec-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.spec-list div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-list dt {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.spec-list dd {
  margin: 0;
  font-size: 13px;
  word-break: break-all;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 46px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-sheet {
  position: relative;
  width: min(860px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #12141e;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
}

.config-sheet {
  width: min(640px, 100%);
}

.modal-close {
  position: sticky;
  float: right;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(18, 20, 30, 0.9);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

.modal-close:hover {
  background: var(--accent-crimson);
  border-color: var(--accent-crimson);
}

/* Article Reader Content */
.article-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.24;
  margin: 10px 0 12px;
}

.article-shortlink-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px;
  margin: 8px 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(45, 212, 191, 0.28);
  background: rgba(45, 212, 191, 0.06);
}

.shortlink-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.shortlink-url {
  flex: 1;
  min-width: 180px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-teal);
  word-break: break-all;
}

.btn-shortlink-copy {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.14);
  color: var(--accent-teal);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-shortlink-copy:hover {
  background: var(--accent-teal);
  color: #090a0f;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.movie-specs-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  font-size: 13px;
}

.movie-specs-box span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.article-prose {
  font-size: 15.5px;
  line-height: 1.78;
  color: #e4e6ef;
}

.article-prose img {
  border-radius: var(--radius-md);
  margin: 18px 0;
  border: 1px solid var(--border-subtle);
  cursor: zoom-in;
}

.article-prose blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-gold);
  background: rgba(229, 169, 60, 0.07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 18px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.article-gallery-strip {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.article-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.article-gallery-grid button {
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0a0c12;
  cursor: zoom-in;
}

.article-gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Forms */
.modal-header h2 {
  margin: 8px 0 6px;
  font-family: var(--font-display);
}

.modal-header p {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.stack-form {
  display: grid;
  gap: 14px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-root);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent-gold);
}

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

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.quick-img-picks {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.chip-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  padding: 4px 10px;
  font-size: 12px;
}

.chip-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.test-result {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid var(--border-subtle);
}

.test-result.ok {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--accent-teal);
}

.test-result.err {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.45);
  color: #fda4af;
}

.config-snippet-box {
  margin-top: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #07080d;
  overflow: hidden;
}

.snippet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.config-snippet-box pre {
  margin: 0;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #cbd5e1;
  overflow-x: auto;
}

/* Lightbox */
.lightbox-wrap {
  position: relative;
  width: min(980px, 100%);
  background: #090b10;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
}

.lightbox-wrap img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-meta {
  padding: 12px 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lightbox-meta p {
  margin: 0;
  font-size: 14px;
}

.lightbox-meta code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-teal);
  word-break: break-all;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-secondary-stack {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1280px, 100% - 20px);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  .search-wrap {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }

  .hide-xs {
    display: none !important;
  }

  .hero-secondary-stack,
  .posts-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  /* Tối ưu khung ảnh Hero trên điện thoại: tách ảnh trên và chữ dưới để không bị cắt mặt/mất chữ */
  .hero-primary {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .hero-primary img {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .hero-primary.frame-4-3 img {
    aspect-ratio: 4 / 3;
  }

  .hero-primary.frame-1-1 img {
    aspect-ratio: 1 / 1;
  }

  .hero-primary.frame-3-4 img {
    aspect-ratio: 4 / 5;
  }

  .hero-overlay {
    padding: 16px;
    background: linear-gradient(to bottom, rgba(16, 18, 28, 0.92), #141724);
  }

  .hero-overlay h1 {
    font-size: 21px;
  }

  .hero-side-card {
    grid-template-columns: 112px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .hero-side-thumb {
    aspect-ratio: 4 / 3;
  }

  /* Khung ảnh thẻ tin trên điện thoại gọn & cân đối */
  .post-thumb {
    aspect-ratio: 16 / 10;
  }

  .post-thumb.frame-3-4 {
    aspect-ratio: 4 / 5;
  }

  .mini-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .mini-gallery button {
    aspect-ratio: 4 / 3;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-sheet {
    padding: 16px;
    max-height: 94vh;
    border-radius: 14px;
  }

  .article-hero-img {
    aspect-ratio: 16 / 10;
    margin-bottom: 14px;
  }

  .article-prose img {
    width: 100%;
    max-height: 55vh;
    object-fit: cover;
  }

  .lightbox-wrap {
    padding: 10px;
  }

  .lightbox-wrap img {
    max-height: 64vh;
  }
}

@media (max-width: 420px) {
  .brand-text small {
    display: none;
  }

  .hero-actions .btn-accent,
  .hero-actions .btn-glass {
    flex: 1;
    justify-content: center;
  }
}
