/* Base Styles & Reset */
:root {
  --primary-bg: #1e0935;
  --secondary-bg: #140524;
  --header-bg: #631ab5;
  --card-bg: rgba(45, 12, 80, 0.7);
  --text-main: #ffffff;
  --text-muted: #d3bceb;
  --gold-primary: #ffcc00;
  --gold-hover: #ffea00;
  --gold-gradient: linear-gradient(to bottom, #fff178, #f0b500);
  --cyan-accent: #00e5ff;
  --tg-blue: #0088cc;
  --border-color: rgba(255, 204, 0, 0.25);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-main);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

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

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

/* Utilities */
.text-gold {
  color: var(--gold-primary);
}

/* Background Particles */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Site Header */
.site-header {
  background: var(--header-bg);
  border-bottom: 2px solid var(--cyan-accent);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

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

.logo-wrap {
  display: flex;
  align-items: center;
}

.header-logo-img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Lang Switcher */
.lang-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.1);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #ccc;
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 15px;
  cursor: pointer;
  transition: 0.3s;
}

.lang-btn.active, .lang-btn:hover {
  background: var(--gold-gradient);
  color: #000;
  font-weight: bold;
}

/* Nav Buttons */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: 0.3s;
}

.nav-btn-tg {
  background-color: var(--tg-blue);
  color: #fff;
}
.nav-btn-tg:hover { background-color: #0077b3; }

.nav-btn-primary {
  background: var(--gold-gradient);
  color: #000;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 20px 0 10px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 204, 0, 0.1);
  color: var(--gold-primary);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #2ecc71;
  border-radius: 50%;
  box-shadow: 0 0 10px #2ecc71;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.hero-title {
  font-size: 32px;
  margin-bottom: 8px;
  font-weight: 800;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 700px;
  margin: 0 auto;
}

/* Section Common */
.section-title-wrap {
  text-align: center;
  margin-bottom: 15px;
}
.section-title {
  font-size: 22px;
  margin-bottom: 4px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 13px;
}

/* Grid Sections */
.region-section, .contact-section, .features-section, .steps-section, .games-section {
  padding: 15px 0;
}

/* Region Cards */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.region-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.region-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-primary);
  box-shadow: 0 5px 15px rgba(255, 204, 0, 0.1);
}

.region-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  gap: 12px;
}

.flag-icon {
  font-size: 28px;
  margin: 0;
}

.region-info {
  text-align: left;
}

.region-name {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
}

.region-lang {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
}

.ping-badge {
  display: inline-block;
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  margin: 0;
  white-space: nowrap;
}

.enter-link-btn {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 204, 0, 0.3);
  color: var(--gold-primary);
  padding: 10px;
  border-radius: 6px;
  font-weight: 700;
  text-align: center;
  transition: 0.3s;
}

.region-card:hover .enter-link-btn {
  background: rgba(255, 204, 0, 0.1);
  border-color: var(--gold-primary);
}

/* Contact Cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
}

.card-icon-wrap {
  font-size: 36px;
  color: var(--gold-primary);
  margin-bottom: 15px;
}

.card-title {
  font-size: 18px;
  margin-bottom: 10px;
}

.card-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
  min-height: 40px;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  width: 100%;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}

.btn-tg { background-color: var(--tg-blue); color: #fff; }
.btn-gold { background: var(--gold-gradient); color: #000; }
.btn-outline { border: 1px solid var(--gold-primary); color: var(--gold-primary); }
.btn-outline:hover { background: var(--gold-primary); color: #000; }

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-box {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-icon {
  font-size: 28px;
  color: var(--gold-primary);
  margin-bottom: 10px;
}

.feature-h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

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

/* Steps Timeline */
.steps-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--gold-gradient);
  color: #000;
  font-size: 20px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

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

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

/* Games Categories */
.games-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.game-badge-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 204, 0, 0.3);
  padding: 12px 15px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.3s;
  color: #fff;
}

.game-badge-card:hover {
  background: rgba(255, 204, 0, 0.1);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.game-badge-icon {
  font-size: 20px;
}
.game-badge-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  text-align: center;
  background: var(--secondary-bg);
}

.footer-seo {
  max-width: 800px;
  margin: 0 auto 20px;
}

.footer-seo h2 {
  font-size: 16px;
  color: var(--gold-primary);
  margin-bottom: 10px;
}

.footer-seo p {
  color: var(--text-muted);
  font-size: 12px;
}

.footer-bottom {
  color: #666;
  font-size: 12px;
  border-top: 1px solid #222;
  padding-top: 20px;
}

/* Responsive */
@media (max-width: 992px) {
  .games-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 768px) {
  /* Header Mobile Optimization - Single Line */
  .header-inner { 
    height: 60px; 
    padding: 0 10px; 
    flex-direction: row;
    gap: 5px; 
    justify-content: space-between;
  }
  .header-logo-img { max-height: 32px; }
  .header-nav { 
    width: auto; 
    justify-content: flex-end; 
    flex-wrap: nowrap;
    display: flex; 
    gap: 5px;
  }
  .lang-group { padding: 2px; }
  .lang-btn { font-size: 11px; padding: 4px 6px; }
  
  /* Make TG button a perfect circle */
  .nav-btn-tg span { display: none; }
  .nav-btn-tg {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  
  /* Primary Button */
  .nav-btn-primary { font-size: 12px; padding: 6px 10px; }
  
  /* Hero */
  .hero-section { padding: 25px 0; }
  .hero-title { font-size: 20px; }
  .hero-subtitle { font-size: 13px; padding: 0 5px; }
  .badge-live { font-size: 11px; padding: 5px 10px; margin-bottom: 15px; }
  
  /* Section Spacing */
  .region-section, .contact-section, .features-section, .steps-section, .games-section {
    padding: 25px 0;
  }
  .section-title { font-size: 20px; }
  .section-sub { font-size: 13px; }

  /* Region cards: 2 columns on mobile */
  .region-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  /* Make the 1st card (Cambodia) span full width as the main line */
  .region-card:first-child {
    grid-column: 1 / -1;
  }
  .region-card { padding: 12px 10px; }
  .region-top { gap: 8px; margin-bottom: 12px; }
  .flag-icon { font-size: 20px; }
  .region-name { font-size: 13px; }
  .region-lang { font-size: 11px; }
  .ping-badge { font-size: 10px; padding: 3px 6px; }
  .enter-link-btn { font-size: 12px; padding: 8px; }

  /* Other grids stack to 1 column */
  .contact-grid, .features-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Games grid & Steps grid into 2 columns on phones */
  .games-grid, .steps-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .step-card { padding: 15px 10px; }
}

@media (max-width: 400px) {
  .header-logo-img { max-height: 28px; }
  .lang-btn { font-size: 10px; padding: 2px 4px; }
  .nav-btn-primary { padding: 6px 8px; font-size: 11px; }
}
