/* Fourhua brand: red + teal from channel art */
:root,
[data-theme="dark"] {
  --bg: #0a0c10;
  --bg-alt: #111620;
  --surface: #181e2a;
  --border: #2a3344;
  --text: #e8eaed;
  --text-muted: #8f9bb0;
  --accent: #e63946;
  --accent-alt: #2ec4b6;
  --accent-hover: #ff4d5a;
  --accent-glow: rgba(230, 57, 70, 0.28);
  --accent-alt-glow: rgba(46, 196, 182, 0.2);
  --gradient: linear-gradient(135deg, var(--accent) 0%, #c1121f 50%, var(--accent-alt) 100%);
  --header-bg: rgba(10, 12, 16, 0.88);
  --hero-overlay-end: var(--bg);
  --youtube: #ff0033;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg: #f4f6f9;
  --bg-alt: #e8ecf2;
  --surface: #ffffff;
  --border: #d0d7e2;
  --text: #1a1f28;
  --text-muted: #5c6678;
  --accent-glow: rgba(230, 57, 70, 0.15);
  --accent-alt-glow: rgba(46, 196, 182, 0.12);
  --header-bg: rgba(244, 246, 249, 0.92);
  --hero-overlay-end: var(--bg);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

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

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

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* Motion */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 4px 20px var(--accent-glow); }
  50% { box-shadow: 0 4px 28px var(--accent-glow), 0 0 0 4px var(--accent-alt-glow); }
}

@keyframes floatGlow {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.05); }
}

.hero-enter {
  animation: heroEnter 0.7s ease-out both;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 0.75rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  z-index: 102;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active,
.nav-drawer-links a.active {
  color: var(--accent-alt);
}

.nav-links a.active {
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 102;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  color: var(--accent-alt);
  border-color: var(--accent-alt);
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 110;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 85vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 120;
  padding: 5rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.nav-drawer.open {
  transform: translateX(0);
}

.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.nav-drawer-links a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav-drawer-links a:hover { color: var(--accent); }

.nav-drawer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  animation: pulseGlow 3s ease-in-out infinite;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-alt);
  color: var(--accent-alt);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

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

.btn-youtube {
  background: var(--youtube);
  color: #fff;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn-youtube:hover { background: #e0002d; }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.badge-pinned {
  background: var(--accent-alt-glow);
  color: var(--accent-alt);
  border: 1px solid var(--accent-alt);
}

/* Page hero (inner pages) */
.page-hero {
  padding-top: 60px;
}

.page-hero-banner {
  position: relative;
  height: clamp(100px, 16vw, 160px);
  overflow: hidden;
}

.page-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.page-hero-content {
  padding-bottom: 0.5rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  letter-spacing: 0.05em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-main {
  min-height: 50vh;
}

/* Hero */
.hero {
  position: relative;
  padding-top: 60px;
  margin-bottom: 1rem;
}

.hero-banner {
  position: relative;
  height: clamp(180px, 28vw, 320px);
  overflow: hidden;
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 15%,
    rgba(10, 12, 16, 0.55) 65%,
    var(--hero-overlay-end) 100%
  );
}

.hero-glow {
  position: absolute;
  width: 40%;
  height: 80%;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: floatGlow 6s ease-in-out infinite;
}

.hero-glow-red {
  top: 10%;
  left: 5%;
  background: var(--accent);
}

.hero-glow-teal {
  top: 5%;
  right: 5%;
  background: var(--accent-alt);
  animation-delay: -3s;
}

.hero-content {
  position: relative;
  text-align: center;
  margin-top: -72px;
  padding: 0 1rem 1.5rem;
}

.hero-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 4px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--gradient) border-box;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 4.5rem);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 0.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Featured player */
.featured-header {
  margin-bottom: 1.25rem;
}

.featured-player {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #000;
}

.featured-embed-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.featured-embed-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.2s;
}

.featured-embed-wrap:hover .featured-play-btn {
  background: rgba(0, 0, 0, 0.55);
}

.featured-play-btn svg {
  width: 72px;
  height: 72px;
  fill: #fff;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s;
}

.featured-embed-wrap:hover .featured-play-btn svg {
  transform: scale(1.08);
}

.featured-play-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  max-width: 80%;
  text-align: center;
}

.featured-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.featured-meta {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.featured-meta h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.featured-meta p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.featured-skeleton {
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Sections */
.section { padding: 3.5rem 0; }

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.section-cta {
  text-align: center;
  margin-top: 2rem;
}

.section-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-row .section-subtitle {
  margin-bottom: 0;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

/* Explore cards (home) */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.explore-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.explore-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-alt);
  box-shadow: 0 12px 32px var(--accent-alt-glow);
}

.explore-card-accent {
  border-color: var(--accent);
  background: linear-gradient(145deg, var(--surface), rgba(230, 57, 70, 0.08));
}

.explore-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent-alt);
}

.explore-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.explore-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.home-featured-preview .featured-player {
  max-width: 900px;
}

.contact-social {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.contact-social p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.social-grid-centered {
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-alt);
  box-shadow: 0 12px 40px var(--accent-alt-glow);
}

.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.video-card:hover .video-thumb-wrap img { transform: scale(1.05); }

.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s;
}

.video-card:hover .video-play { opacity: 1; }

.video-play svg {
  width: 48px;
  height: 48px;
  fill: #fff;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.video-info { padding: 1rem 1.1rem 1.2rem; }

.video-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

.video-skeleton {
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

.video-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

/* Series */
.series-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.series-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border-left: 4px solid var(--accent-alt);
}

.series-block:nth-child(even) {
  border-left-color: var(--accent);
}

.series-block-header {
  margin-bottom: 1.25rem;
}

.series-block-header h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.series-block-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.series-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.series-skeleton {
  height: 200px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Social */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.social-link:hover {
  border-color: var(--accent-alt);
  color: var(--accent-alt);
  transform: translateY(-1px);
}

.social-icon,
.social-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: 1.5rem;
}

.tag-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-alt);
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-stat {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--accent-alt);
}

.stat-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.stat-icon-flag {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
}

.about-stat strong {
  display: block;
  font-size: 1rem;
}

.about-stat span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Contact */
.contact-box {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
}

.contact-box p {
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
}

.contact-email {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.contact-email:hover { border-color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 1rem;
}

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

.footer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  flex: 1;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-subscribe { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .site-footer p { order: 2; }

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