:root {
  --bg-cream: #fff7f2;
  --rose-pink: #f27a8d;
  --deep-pink: #c94b62;
  --champagne: #d9a441;
  --ink: #2f2229;
  --ink-light: #6e5f66;
  --white: #ffffff;
  --shadow-soft: 0 10px 30px rgba(242, 122, 141, 0.12);
  --shadow-hover: 0 16px 40px rgba(242, 122, 141, 0.2);
  --radius-lg: 30px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100vw;
}
.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 247, 242, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  z-index: -1;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--deep-pink);
  text-decoration: none;
}
.brand-logo img { height: 32px; width: auto; border-radius: 8px; }

/* Desktop Nav */
.desktop-nav {
  display: flex;
  background: var(--white);
  padding: 4px;
  border-radius: 40px;
  box-shadow: var(--shadow-soft);
}
.desktop-nav a {
  text-decoration: none;
  color: var(--ink-light);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 30px;
  transition: all 0.3s ease;
}
.desktop-nav a:hover { color: var(--deep-pink); }
.desktop-nav a.active {
  background: var(--rose-pink);
  color: var(--white);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: var(--white);
  border: none;
  padding: 10px 16px;
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  font-size: 15px;
  font-weight: 600;
  color: var(--deep-pink);
  cursor: pointer;
}
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  flex-direction: column;
  padding: 10px 0;
}
.mobile-menu a {
  text-decoration: none;
  color: var(--ink);
  padding: 14px 24px;
  font-size: 16px;
  border-bottom: 1px solid #f0e5e0;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: flex; }

/* Common Layout */
main { padding-bottom: 60px; }
section {
  padding: 40px 24px;
  scroll-margin-top: 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-title small {
  font-size: 15px;
  color: var(--champagne);
  font-weight: 600;
}

/* 1) Hero */
.hero-card {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  height: 460px;
  background: #333;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.hero-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 40px;
  z-index: 2;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.3);
}
.hero-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}
.hero-desc {
  font-size: 18px;
  max-width: 600px;
  margin-bottom: 24px;
  opacity: 0.9;
}
.hero-btns { display: flex; gap: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--rose-pink); color: var(--white); }
.btn-primary:hover { background: var(--deep-pink); }
.btn-outline { background: rgba(255,255,255,0.1); color: var(--white); border: 1px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.2); }

/* 2) Newly Added */
.grid-scroll {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.poster-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.poster-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
}
.badge-sub { background: rgba(0,0,0,0.6); color: #fff; backdrop-filter: blur(4px); }
.badge-raw { background: #e53935; color: #fff; }
.poster-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3) Ranking */
.ranking-list { display: flex; flex-direction: column; gap: 12px; }
.rank-item {
  display: flex;
  align-items: center;
  background: var(--white);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s;
}
.rank-item:hover { transform: translateY(-2px); }
.rank-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--rose-pink);
  width: 40px;
  font-style: italic;
}
.rank-img {
  width: 44px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 20px;
}
.rank-title { flex: 1; font-size: 16px; font-weight: 600; }
.rank-percent { font-size: 15px; color: var(--champagne); font-weight: 700; }

/* 4) Zones & Topics */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.zone-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s;
}
.zone-card:hover { transform: translateY(-4px); }
.zone-card img { width: 100%; height: 100%; object-fit: cover; }
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.topic-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s;
}
.topic-card:hover { transform: translateY(-4px); }
.topic-card img { width: 100%; height: 100%; object-fit: cover; }
.topic-text {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  padding: 40px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
}

/* 5) CP Gallery */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cp-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s;
}
.cp-card:hover { transform: translateY(-4px); }
.cp-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.cp-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cp-info { padding: 20px; }
.cp-name { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.cp-desc { font-size: 14px; color: var(--ink-light); margin-bottom: 12px; }
.cp-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.cp-stars { color: var(--champagne); letter-spacing: 2px; }

/* 6) Guide */
.guide-wrap {
  display: flex;
  gap: 40px;
  align-items: center;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.phone-mockup {
  width: 260px;
  flex-shrink: 0;
  border-radius: 36px;
  border: 8px solid var(--ink);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.phone-mockup img { width: 100%; display: block; }
.steps-list { display: flex; flex-direction: column; gap: 20px; }
.step-item {
  display: flex;
  gap: 16px;
}
.step-num {
  width: 32px;
  height: 32px;
  background: var(--rose-pink);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.step-content h4 { font-size: 16px; margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--ink-light); }
.step-note { font-size: 13px; color: var(--deep-pink); margin-top: 4px; }

/* 7) FAQ */
.faq-group { margin-bottom: 30px; }
.faq-group-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--deep-pink);
  display: flex; align-items: center; gap: 8px;
}
.faq-group-title::before {
  content: "";
  display: block;
  width: 4px; height: 16px;
  background: var(--rose-pink);
  border-radius: 2px;
}
.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.faq-q { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.faq-a { font-size: 14px; color: var(--ink-light); }
.faq-img { margin-top: 16px; border-radius: 12px; overflow: hidden; max-width: 400px; }
.faq-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.faq-table th, .faq-table td { border: 1px solid #eee; padding: 10px; text-align: left; }
.faq-table th { background: #fafafa; color: var(--ink); }

/* 8) Download */
.download-section {
  text-align: center;
}
.download-box {
  background: linear-gradient(135deg, #fff0f0 0%, #fce4ec 100%);
  padding: 60px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.download-box h2 { font-size: 32px; margin-bottom: 16px; }
.download-box p { font-size: 16px; color: var(--ink-light); margin-bottom: 32px; }

/* Skin Capsule */
.skin-capsule {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--white);
  padding: 6px;
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  display: flex;
  gap: 4px;
  z-index: 999;
}
.skin-btn {
  border: none;
  background: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.2s;
}
.skin-btn.active { background: var(--ink); color: var(--white); }
.skin-btn:hover:not(.active) { background: #f5f5f5; }

/* Skins Overlay */
.skin-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s;
}
.skin-overlay.active { opacity: 1; }

/* Songkran */
.songkran-overlay {
  background: linear-gradient(180deg, rgba(135,206,250,0.15) 0%, rgba(255,182,193,0.15) 100%);
}
.songkran-tip {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #87cefa, #ffb6c1);
  color: #fff;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  z-index: 10000;
  display: none;
}

/* Loi Krathong */
.loi-overlay {
  background: radial-gradient(circle at 50% 80%, rgba(255,165,0,0.1) 0%, transparent 60%);
  animation: breathe 4s infinite alternate;
}
.loi-tip {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  color: #fff;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  z-index: 10000;
  display: none;
}
@keyframes breathe {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  font-size: 13px;
  color: var(--ink-light);
  border-top: 1px solid #f0e5e0;
}
footer p { margin-bottom: 8px; }
footer a { color: var(--ink-light); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .grid-scroll { grid-template-columns: repeat(3, 1fr); }
  .zone-grid { grid-template-columns: repeat(2, 1fr); }
  .cp-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 38px; }
  .desktop-nav { display: none; }
  .mobile-toggle { display: block; }
}

@media (max-width: 768px) {
  .grid-scroll { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .zone-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .cp-grid { grid-template-columns: 1fr; }
  .guide-wrap { flex-direction: column; padding: 24px; text-align: center; }
  .steps-list { text-align: left; width: 100%; }
  .hero-card { height: 400px; }
  .hero-content { bottom: 20px; left: 20px; right: 20px; }
  .hero-title { font-size: 28px; }
  .hero-desc { font-size: 15px; }
  .hero-btns { flex-direction: column; gap: 10px; }
  .btn { width: 100%; }
  .section-title { font-size: 22px; }
  .rank-item { padding: 12px; }
  .skin-capsule { bottom: 20px; left: 20px; transform: scale(0.9); transform-origin: bottom left; }
  .songkran-tip, .loi-tip { width: 90%; text-align: center; top: 80px; font-size: 13px; }
}