:root {
  --bg-dark: #0b0907;
  --bg-panel: #14110e;
  --gold: #d4af62;
  --gold-dim: #8c7040;
  --text-main: #f6efe2;
  --text-muted: #a39b8f;
  --border-gold: rgba(212, 175, 98, 0.2);
  --font-serif: "Songti SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: rgba(11, 9, 7, 0.95);
  border-bottom: 1px solid var(--border-gold);
  z-index: -1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-main);
  font-family: var(--font-serif);
  letter-spacing: 1px;
}

.brand img {
  height: 32px;
  width: auto;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  padding: 8px 0;
  transition: color 0.3s;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--gold);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  width: 100vw;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-gold);
  flex-direction: column;
  padding: 16px 24px;
}

.mobile-nav a {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 16px;
}

.mobile-nav.active {
  display: flex;
}

/* Sections */
section {
  scroll-margin-top: 80px;
  padding: 64px 0;
}

.section-header {
  margin-bottom: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: normal;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* Hero */
.hero {
  position: relative;
  height: 92vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(11, 9, 7, 0.9) 0%, rgba(11, 9, 7, 0.6) 50%, rgba(11, 9, 7, 0.2) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 56px;
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: normal;
}

.hero-tags {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero-tags span {
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border-gold);
  padding: 4px 12px;
  border-radius: 4px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.8;
}

.btn-group {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--bg-dark);
  border: 1px solid var(--gold);
}

.btn-primary:hover {
  background-color: #e6c27a;
}

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

.btn-outline:hover {
  background-color: rgba(212, 175, 98, 0.1);
}

/* Posters Grid */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.poster-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-panel);
  transition: transform 0.3s;
}

.poster-card:hover {
  transform: translateY(-4px);
}

.poster-img-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.poster-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 2px;
  z-index: 10;
}

.badge-sub {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

.badge-raw {
  background: #e53935;
  color: #fff;
}

.poster-title {
  padding: 12px;
  font-size: 14px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* New Section */
.new-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.new-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  transition: transform 0.3s;
}

.new-card:hover {
  transform: translateY(-4px);
}

.new-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.new-card:hover img {
  transform: scale(1.05);
}

.new-card .poster-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  padding: 30px 12px 12px;
}

/* Rank List */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg-panel);
  border-radius: 4px;
  border: 1px solid transparent;
  transition: border-color 0.3s;
}

.rank-item:hover {
  border-color: var(--border-gold);
}

.rank-num {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--gold);
  width: 30px;
  text-align: center;
}

.rank-thumb {
  width: 48px;
  height: 64px;
  border-radius: 2px;
  object-fit: cover;
}

.rank-info {
  flex: 1;
}

.rank-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.rank-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
  max-width: 400px;
}

.rank-bar {
  height: 100%;
  background: var(--gold);
}

.rank-percent {
  font-size: 14px;
  color: var(--gold);
  width: 40px;
  text-align: right;
}

/* Feature Section */
.feature-section {
  display: flex;
  align-items: center;
  gap: 48px;
}

.feature-img {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
}

.feature-img img {
  width: 100%;
  height: auto;
  display: block;
}

.feature-content {
  flex: 1;
}

.feature-content h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 24px;
  font-weight: normal;
  line-height: 1.4;
}

.feature-content p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.feature-stats {
  display: flex;
  gap: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Channels */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.channel-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: 500px;
}

.channel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.channel-card:hover img {
  transform: scale(1.05);
}

.channel-label {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-family: var(--font-serif);
  color: var(--gold);
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  z-index: 2;
}

/* Schedule */
.schedule-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-col {
  background: var(--bg-panel);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 16px 12px;
  text-align: center;
}

.day-col.today {
  border-color: var(--gold);
  background: rgba(212, 175, 98, 0.05);
}

.day-week {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.today .day-week {
  color: var(--gold);
}

.day-date {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 12px;
}

.show-name {
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 4px;
}

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

/* Guide */
.guide-section {
  display: flex;
  gap: 64px;
  align-items: center;
}

.phone-mockup {
  flex: 0 0 300px;
  aspect-ratio: 9 / 17;
  border-radius: 32px;
  border: 8px solid #333;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.phone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-item {
  display: flex;
  gap: 16px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 175, 98, 0.1);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 18px;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-muted);
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.faq-group {
  background: var(--bg-panel);
  border-radius: 4px;
  padding: 24px;
}

.faq-group h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: normal;
}

.faq-item {
  margin-bottom: 16px;
}

.faq-q {
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: 600;
}

.faq-a {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-img {
  margin-top: 16px;
  border-radius: 4px;
  overflow: hidden;
}

/* Download */
.download-section {
  text-align: center;
  padding: 80px 0;
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
}

.download-title {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--gold);
  margin-bottom: 32px;
  font-weight: normal;
}

/* Footer */
.site-footer {
  padding: 48px 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--text-muted);
}

.site-footer p {
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--text-muted);
  transition: color 0.3s;
}

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

/* Skin Decorations */
.skin-pills {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  gap: 8px;
  z-index: 999;
}

.skin-pill {
  background: rgba(11, 9, 7, 0.8);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.3s;
}

.skin-pill:hover {
  border-color: var(--gold);
}

.skin-pill.active {
  background: var(--gold);
  color: var(--bg-dark);
  border-color: var(--gold);
}

.skin-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 999;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.skin-notice.show {
  display: block;
}

.skin-songkran {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
  animation: breath 2s infinite alternate;
}

.skin-loykrathong {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  color: #333;
  animation: breath 2s infinite alternate;
}

@keyframes breath {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.02); opacity: 1; }
}

/* Overlays */
.overlay-songkran {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
  background: radial-gradient(circle at 50% 100%, rgba(79, 172, 254, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 50% 100%, rgba(0, 242, 254, 0.1) 0%, transparent 60%);
  display: none;
  animation: wave 4s infinite linear;
}

.overlay-songkran.show {
  display: block;
}

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

.overlay-loykrathong {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
  background: radial-gradient(circle at 10% 20%, rgba(253, 160, 133, 0.1) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(246, 211, 101, 0.1) 0%, transparent 40%);
  display: none;
}

.overlay-loykrathong.show {
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .poster-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .new-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .channel-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-title {
    font-size: 42px;
  }
  .feature-section {
    flex-direction: column;
  }
  .guide-section {
    flex-direction: column;
  }
  .phone-mockup {
    flex: none;
    width: 260px;
  }
  .schedule-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .poster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .new-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .channel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .schedule-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .feature-stats {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  .rank-bar-wrap {
    max-width: 200px;
  }
  .skin-pills {
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
  }
  .skin-notice {
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 90vw;
    text-align: center;
  }
}