h1 {
  font-weight: 800;
  font-size: 2.8rem;
  text-align: center;
  padding-bottom: 30px;
  background: linear-gradient(90deg, #2e7d32, #c0a040);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

.container, .header-links {
  max-width: 1600px;
  margin: 0 auto;
}

.header-links {
  max-width: 1200px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.header-links a {
  position: relative;
  color: #2e7d32;
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.header-links a:hover {
  border-color: #c0a040;
}

/* Tooltip container */
#preview-tooltip {
  position: absolute;
  background: #2e7d32;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
  max-width: 250px;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(46,125,50,0.8);
}

/* Grid container: 2 TikTok | divider | 2 Facebook */
.tiktok-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr) 4px repeat(2, 1fr);
  gap: 16px;
  align-items: stretch;
}

.tiktok-video, .facebook-post {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 350 / 420; /* ลดความสูงลงอีก */
  border: none;
  border-radius: 20px;
  background-color: white;
  box-shadow: 0 8px 30px rgba(46,125,50,0.25);
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto;
}

.tiktok-video:hover, .facebook-post:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 50px rgba(192,160,64,0.4);
}

/* เส้นกั้นไล่สีตรงกลาง */
.divider {
  grid-column: 3; /* อยู่ในคอลัมน์ที่ 3 */
  width: 4px;
  background: linear-gradient(to bottom, #2e7d32, #c0a040);
  border-radius: 8px;
  height: 100%;
  justify-self: center;
  box-shadow: 0 0 8px rgba(192,160,64,0.6);
}

/* Responsive สำหรับจอเล็ก */
@media (max-width: 1024px) {
  .tiktok-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
  }
  .divider {
    display: none; /* ซ่อนเส้นกั้นในมือถือ */
  }
}

@media (max-width: 480px) {
  .tiktok-grid {
    grid-template-columns: 1fr;
  }
}
/* ================= DARK MODE ================= */
body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

/* h1 */
body.dark-mode h1 {
  background: linear-gradient(90deg, #c0a040, #2e7d32);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header Links */
body.dark-mode .header-links a {
  color: #c0c0c0;
}
body.dark-mode .header-links a:hover {
  border-color: #c0a040;
  color: #c0a040;
}

/* Tooltip */
body.dark-mode #preview-tooltip {
  background: #333;
  color: #f1f1f1;
  box-shadow: 0 4px 12px rgba(192,160,64,0.5);
}

/* TikTok & Facebook video/post */
body.dark-mode .tiktok-video,
body.dark-mode .facebook-post {
  background: #1e1e1e;
  box-shadow: 0 8px 30px rgba(192,160,64,0.25);
}
body.dark-mode .tiktok-video:hover,
body.dark-mode .facebook-post:hover {
  box-shadow: 0 15px 50px rgba(192,160,64,0.45);
}

/* Divider */
body.dark-mode .divider {
  background: linear-gradient(to bottom, #c0a040, #2e7d32);
  box-shadow: 0 0 8px rgba(192,160,64,0.6);
}
