/* ============================================
   fun88-dragon-tiger — Rich Red/Gold Casino Theme
   Font: Sarabun (Thai subset)
   Style: Shadow variant (deep shadow, premium feel)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700;800&display=swap&subset=thai');

/* --- CSS Variables --- */
:root {
  --bg: #1a0a0a;
  --bg-alt: #2d1515;
  --primary: #dc2626;
  --secondary: #f59e0b;
  --accent: #fbbf24;
  --text: #fef2f2;
  --text-muted: #d4a0a0;
  --border: #4a2020;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(220, 38, 38, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Sarabun', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary);
}

ul, ol {
  list-style-position: inside;
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Sarabun', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #b91c1c);
  color: #fff;
  box-shadow: var(--shadow), 0 0 20px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ef4444, var(--primary));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #d97706);
  color: #1a0a0a;
  box-shadow: var(--shadow), 0 0 20px rgba(245, 158, 11, 0.25);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: #1a0a0a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(245, 158, 11, 0.35);
}

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

.btn-outline:hover {
  background: var(--accent);
  color: #1a0a0a;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.95rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.15rem;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
}

.navbar-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(220, 38, 38, 0.15);
}

.nav-cta {
  margin-left: 8px;
}

.nav-cta .btn {
  padding: 10px 22px;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: var(--transition);
}

/* --- Hero Section (Split Layout) --- */
.hero {
  padding: 120px 0 60px;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
    var(--bg);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-badge .badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.9;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: left;
}

.hero-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

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

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08), transparent 70%);
  border-radius: var(--radius);
  z-index: -1;
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

/* --- Cards (Shadow Variant) --- */
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(220, 38, 38, 0.15);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Feature Icons --- */
.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(245, 158, 11, 0.1));
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* --- Content Split Section --- */
.content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.content-split.reverse {
  direction: rtl;
}

.content-split.reverse > * {
  direction: ltr;
}

.content-split-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-split-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.content-split-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.85;
}

/* --- Steps/How-It-Works --- */
.step-number {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), #b91c1c);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), #7f1d1d);
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08), transparent 50%);
}

.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.cta-banner p {
  font-size: 1.1rem;
  color: rgba(254, 242, 242, 0.85);
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-banner .btn {
  position: relative;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
}

.stat-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

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

/* --- Blog Cards --- */
.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card .card-img {
  height: 180px;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* --- Footer --- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Page Header (inner pages) --- */
.page-header {
  padding: 120px 0 48px;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(220, 38, 38, 0.06), transparent 60%),
    var(--bg);
  text-align: center;
}

.page-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  color: var(--border);
}

/* --- Article Content --- */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.article-content h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text);
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text);
}

.article-content p {
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.9;
}

.article-content ul,
.article-content ol {
  color: var(--text-muted);
  margin-bottom: 18px;
  padding-left: 8px;
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(245, 158, 11, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-content img {
  border-radius: var(--radius);
  margin: 24px 0;
  box-shadow: var(--shadow);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.article-content th,
.article-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article-content th {
  background: rgba(220, 38, 38, 0.15);
  font-weight: 700;
  color: var(--text);
}

.article-content td {
  color: var(--text-muted);
}

/* --- Table (for comparison, odds etc.) --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.data-table th {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(245, 158, 11, 0.1));
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(220, 38, 38, 0.05);
}

/* --- Promotions --- */
.promo-card {
  position: relative;
}

.promo-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--primary), #b91c1c);
  color: #fff;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* --- How-to Steps --- */
.step-card {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--primary);
}

.step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    max-width: 400px;
    margin: 0 auto;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .content-split.reverse {
    direction: ltr;
  }

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

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 10, 10, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 12px 24px;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .hero {
    min-height: auto;
    padding: 100px 0 40px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .cta-banner {
    padding: 36px 20px;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-lg {
    width: 100%;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}
