/*
Theme Name: Spectrum Bet TH
Theme URI: https://example.com/spectrum-bet-th
Author: ThemeDev
Description: A trendy modern WordPress theme with rainbow gradient accents and glass-morphism design for Thai gaming sites.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: spectrum-bet-th
*/

:root {
  --bg: #1a1a2e;
  --bg-light: #16213e;
  --bg-card: rgba(255,255,255,0.05);
  --text: #ffffff;
  --text-muted: #b8c5d6;
  --gradient: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c, #fda085);
  --gradient-btn: linear-gradient(135deg, #667eea, #764ba2);
  --gradient-accent: linear-gradient(90deg, #00d2ff, #7b2ff7, #f093fb, #ff6b6b, #fda085);
  --glass: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.15);
}

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

body {
  font-family: 'Prompt', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: #a78bfa; text-decoration: none; transition: all 0.3s; }
a:hover { color: #c4b5fd; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.site-header {
  background: rgba(26,26,46,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 15px 0;
}

.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}

.site-logo {
  font-size: 1.8rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav ul { display: flex; list-style: none; gap: 20px; }
.main-nav a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; padding: 8px 14px; border-radius: 8px; transition: all 0.3s; }
.main-nav a:hover { color: #fff; background: var(--glass); }

.mobile-toggle { display: none; background: none; border: none; color: #a78bfa; font-size: 1.5rem; cursor: pointer; }

.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 20px 80px;
  position: relative;
  background: radial-gradient(ellipse at top, #1a1a4e 0%, var(--bg) 70%);
}

.hero::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 600px; height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(118,75,162,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: 3.5rem; font-weight: 900; margin-bottom: 20px; line-height: 1.2; }
.hero h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.hero p { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 30px; }

.btn-primary {
  display: inline-block;
  background: var(--gradient-btn);
  color: #fff; padding: 15px 40px;
  font-size: 1.1rem; font-weight: 700;
  border-radius: 50px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(102,126,234,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(102,126,234,0.6); color: #fff; }

.features { padding: 80px 20px; background: var(--bg-light); }
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 50px; }
.section-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }

.feature-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px; text-align: center;
  transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-5px); border-color: rgba(167,139,250,0.5); }
.feature-icon { font-size: 3rem; margin-bottom: 15px; }
.feature-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: #c4b5fd; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

.games { padding: 80px 20px; background: var(--bg); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; max-width: 1200px; margin: 0 auto; }

.game-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden; transition: all 0.3s;
  position: relative;
}
.game-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-accent);
}
.game-card:hover { transform: translateY(-5px); border-color: rgba(167,139,250,0.4); }
.game-card-img { height: 180px; background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.game-card-body { padding: 20px; }
.game-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.game-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 15px; }

.btn-secondary {
  display: inline-block; padding: 8px 20px;
  border-radius: 50px; font-weight: 600; font-size: 0.9rem;
  background: var(--gradient-btn);
  color: #fff; transition: all 0.3s;
}
.btn-secondary:hover { box-shadow: 0 4px 15px rgba(102,126,234,0.4); color: #fff; }

.promotions { padding: 80px 20px; background: var(--bg-light); }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.promo-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px; position: relative; overflow: hidden;
}
.promo-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-accent); }
.promo-badge {
  display: inline-block;
  background: var(--gradient-btn);
  color: #fff; padding: 4px 14px;
  font-size: 0.8rem; font-weight: 700;
  border-radius: 50px; margin-bottom: 15px;
}
.promo-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.promo-card p { color: var(--text-muted); font-size: 0.95rem; }

.why-us { padding: 80px 20px; background: var(--bg); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.why-item { text-align: center; padding: 30px; }
.why-number {
  font-size: 3rem; font-weight: 900; display: block; margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.why-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.why-item p { color: var(--text-muted); font-size: 0.9rem; }

.site-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--glass-border);
  padding: 60px 20px 30px;
  position: relative;
}
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gradient-accent); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.footer-col h4 { color: #c4b5fd; font-size: 1.1rem; margin-bottom: 15px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: #c4b5fd; }
.footer-bottom { text-align: center; padding-top: 30px; margin-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 768px) {
  .main-nav ul { display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(26,26,46,0.98); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--glass-border); }
  .main-nav ul.active { display: flex; }
  .mobile-toggle { display: block; }
  .hero h1 { font-size: 2.2rem; }
  .section-title { font-size: 1.8rem; }
}

/* === Category/Archive Page Styles === */
.page-hero {
  padding: 140px 20px 60px;
  text-align: center;
  background: radial-gradient(ellipse at top, #1a1a4e 0%, var(--bg) 70%);
}
.page-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-desc { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.archive-content { padding: 60px 20px; background: var(--bg); }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }

.post-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
}
.post-card:hover { transform: translateY(-5px); border-color: rgba(167,139,250,0.5); }

.post-card-img { display: block; height: 200px; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-img-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)); font-size: 3rem; }

.post-card-body { padding: 25px; }
.post-date { color: #a78bfa; font-size: 0.85rem; font-weight: 500; }
.post-card-title { font-size: 1.3rem; margin: 10px 0; font-weight: 700; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: #c4b5fd; }
.post-excerpt { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 15px; line-height: 1.7; }
.read-more { color: #a78bfa; font-weight: 600; font-size: 0.9rem; }
.read-more:hover { color: #c4b5fd; }

.pagination { text-align: center; margin-top: 50px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-block; padding: 10px 16px; border-radius: 8px; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-muted); font-weight: 500; transition: all 0.3s; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--gradient-btn); color: #fff; border-color: transparent; }

.no-posts { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 1.1rem; }

/* === Single Post Styles === */
.single-content { padding: 0 20px 80px; background: var(--bg); }
.featured-image { max-width: 900px; margin: 0 auto 40px; border-radius: 16px; overflow: hidden; }
.featured-image img { width: 100%; height: auto; display: block; }

.article-body {
  max-width: 800px; margin: 0 auto;
  font-size: 1.05rem; line-height: 1.8; color: var(--text-muted);
}
.article-body h2, .article-body h3, .article-body h4 { color: var(--text); margin: 30px 0 15px; }
.article-body p { margin-bottom: 20px; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 20px 0; }
.article-body a { color: #a78bfa; text-decoration: underline; }

.post-meta { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 15px; }
.post-meta span { color: var(--text-muted); font-size: 0.9rem; }

.post-navigation {
  max-width: 800px; margin: 50px auto;
  display: flex; justify-content: space-between; gap: 20px;
  padding: 30px 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border);
}
.nav-prev, .nav-next { max-width: 45%; }
.nav-next { text-align: right; }
.nav-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 5px; }
.post-navigation a { color: #a78bfa; font-weight: 600; }
.post-navigation a:hover { color: #c4b5fd; }

.related-posts { max-width: 1000px; margin: 60px auto 0; }
.related-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 30px; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.related-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}
.related-card:hover { transform: translateY(-3px); border-color: rgba(167,139,250,0.4); }
.related-card-img { display: block; height: 160px; overflow: hidden; }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-img-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)); font-size: 2.5rem; }
.related-card-body { padding: 20px; }
.related-card-body h4 { font-size: 1.05rem; margin-top: 8px; }
.related-card-body h4 a { color: var(--text); }
.related-card-body h4 a:hover { color: #c4b5fd; }

/* === Latest News Section (Index) === */
.latest-news { padding: 80px 20px; background: var(--bg-light); }
.section-header { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto 40px; }
.section-header .section-title { margin-bottom: 0; text-align: left; }
.view-all { color: #a78bfa; font-weight: 600; font-size: 1rem; border: 1px solid rgba(167,139,250,0.4); padding: 8px 20px; border-radius: 50px; transition: all 0.3s; }
.view-all:hover { background: var(--gradient-btn); color: #fff; border-color: transparent; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; max-width: 1200px; margin: 0 auto; }
.news-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}
.news-card:hover { transform: translateY(-3px); border-color: rgba(167,139,250,0.4); }
.news-card-img { display: block; height: 160px; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-img-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)); font-size: 2.5rem; }
.news-card-body { padding: 18px; }
.news-date { color: #a78bfa; font-size: 0.8rem; font-weight: 500; }
.news-title { font-size: 1rem; margin: 8px 0; font-weight: 600; }
.news-title a { color: var(--text); }
.news-title a:hover { color: #c4b5fd; }
.news-excerpt { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

@media (max-width: 768px) {
  .page-title { font-size: 2rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 15px; text-align: center; }
  .post-navigation { flex-direction: column; }
  .nav-prev, .nav-next { max-width: 100%; text-align: left; }
  .related-grid { grid-template-columns: 1fr; }
}
