@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800;900&family=Noto+Sans+Thai:wght@300;400;600;700;800;900&display=swap');

:root {
  --bg-main: #060911;
  --bg-card: rgba(10, 18, 34, 0.88);
  --primary-color: #38bdf8;
  --primary-hover: #0ea5e9;
  --text-color: #f0f9ff;
  --text-muted: #94a3b8;
  --border-color: rgba(56, 189, 248, 0.35);
  --danger-color: #f87171;
  --success-color: #4ade80;
}

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

html {
  height: 100%;
}

body {
  font-family: "Noto Sans Thai", "Kanit", sans-serif !important;
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: #000;
}

body h1, h2, h3, h4, h5, h6 { 
  font-family: "Noto Sans Thai", "Kanit", sans-serif !important; 
}

/* Video Background Fullscreen */
.video-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -10;
}

#bgVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85);
}

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

/* Navbar */
.navbar {
  background-color: rgba(8, 15, 28, 0.92);
  border-bottom: 2px solid var(--primary-color);
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 25px rgba(14, 165, 233, 0.25);
  flex-shrink: 0;
}

.nav-container { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  height: 70px; 
}

.logo { 
  font-size: 24px; 
  font-weight: 800; 
  color: #fff; 
  text-decoration: none; 
  letter-spacing: 1.5px; 
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.8); 
}

.logo span { color: var(--primary-color); }

nav a { 
  color: var(--text-color); 
  text-decoration: none; 
  margin-left: 20px; 
  font-size: 15px; 
  transition: 0.3s; 
  font-weight: 600; 
}

nav a:hover { 
  color: var(--primary-color); 
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.8); 
}

/* Hero */
.hero { 
  height: 280px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  text-align: center; 
  background: rgba(0, 0, 0, 0.3); 
  border-bottom: 1px solid var(--border-color); 
  flex-shrink: 0;
}

.hero h1 { 
  font-size: 38px; 
  color: var(--primary-color); 
  margin-bottom: 10px; 
  text-shadow: 0 0 18px rgba(14, 165, 233, 0.8); 
}

.hero p { color: var(--text-color); margin-bottom: 25px; font-size: 16px; }

/* Main Content (Flex Grow) */
.main-content { 
  margin-top: 30px; 
  margin-bottom: 60px; 
  position: relative; 
  z-index: 2; 
  flex: 1 0 auto;
}

/* Cards */
.card { 
  background-color: var(--bg-card); 
  border: 1px solid var(--border-color); 
  border-radius: 12px; 
  margin-bottom: 30px; 
  overflow: hidden; 
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6); 
  backdrop-filter: blur(12px); 
  transition: transform 0.3s ease, border-color 0.3s ease; 
}

.card:hover { 
  border-color: rgba(56, 189, 248, 0.7); 
  box-shadow: 0 15px 40px rgba(56, 189, 248, 0.25); 
}

.card-header { 
  background: linear-gradient(135deg, rgba(10, 18, 34, 0.98), rgba(18, 33, 74, 0.95)); 
  padding: 18px 24px; 
  border-bottom: 1px solid var(--border-color); 
}

.card-header h2 { 
  font-size: 19px; 
  color: var(--primary-color); 
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5); 
}

.card-body { padding: 28px; }
.form-card { max-width: 650px; margin: 0 auto; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.full-width { grid-column: span 2; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--text-muted); }
.form-group input, .form-group select { 
  width: 100%; 
  padding: 12px 15px; 
  background-color: rgba(6, 9, 17, 0.85); 
  border: 1px solid var(--border-color); 
  border-radius: 8px; 
  color: #fff; 
  outline: none; 
  font-size: 14px; 
  transition: border-color 0.2s ease; 
}
.form-group input:focus, .form-group select:focus { 
  border-color: var(--primary-color); 
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); 
}

/* Buttons */
.btn { 
  display: inline-block; 
  padding: 12px 24px; 
  border-radius: 8px; 
  text-decoration: none; 
  font-weight: 700; 
  cursor: pointer; 
  border: none; 
  transition: 0.3s; 
}

.btn-primary { background-color: var(--primary-color); color: #060911; }
.btn-primary:hover { background-color: var(--primary-hover); box-shadow: 0 0 15px rgba(56, 189, 248, 0.5); }
.btn-secondary { background-color: #1e293b; color: #fff; margin-left: 10px; }
.btn-submit { background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: #060911; width: 100%; font-size: 16px; box-shadow: 0 4px 18px rgba(56, 189, 248, 0.4); }

/* Downloads */
.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.download-item { background: rgba(6, 9, 17, 0.85); padding: 28px; border-radius: 10px; border: 1px solid var(--border-color); text-align: center; }
.dl-icon { font-size: 45px; color: var(--primary-color); margin-bottom: 12px; filter: drop-shadow(0 0 8px var(--primary-color)); }
.download-item h3 { color: #fff; margin-bottom: 10px; }
.download-item p { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.dl-btns { display: flex; justify-content: center; gap: 12px; }
.btn-download { background-color: #1e293b; color: #fff; font-size: 13px; padding: 10px 18px; }
.btn-download:hover { background-color: var(--primary-color); color: #060911; }

/* Alerts, Tables & Topup */
.alert { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; }
.alert-error { background-color: rgba(248, 113, 113, 0.2); border: 1px solid var(--danger-color); color: #fca5a5; }
.alert-error ul { margin-top: 8px; padding-left: 20px; }
.alert-success { background-color: rgba(74, 222, 128, 0.2); border: 1px solid var(--success-color); color: #86efac; }

.news-list { list-style: none; }
.news-list li { padding: 12px 0; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 12px; }
.badge { padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; color: #fff; }
.badge.news { background-color: #0284c7; }
.badge.event { background-color: #d97706; }
.badge.update { background-color: #7c3aed; }
.date { margin-left: auto; font-size: 12px; color: var(--text-muted); }

.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 14px; text-align: left; border-bottom: 1px solid var(--border-color); }
.info-table th { color: var(--primary-color); width: 35%; }

.topup-rates { background: rgba(6, 9, 17, 0.7); padding: 18px; border-radius: 8px; border-left: 4px solid var(--primary-color); margin-bottom: 22px; }
.topup-rates h3 { font-size: 16px; color: var(--primary-color); margin-bottom: 10px; }
.topup-rates ul { list-style: none; padding-left: 5px; font-size: 14px; color: var(--text-muted); }

/* Footer Lock Bottom */
footer { 
  text-align: center; 
  padding: 32px 0; 
  color: var(--text-muted); 
  font-size: 13px; 
  border-top: 1px solid var(--border-color); 
  background-color: rgba(4, 6, 11, 0.95); 
  position: relative; 
  z-index: 2; 
  margin-top: auto;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .form-grid, .download-grid { grid-template-columns: 1fr; }
  .full-width { grid-column: span 1; }
  .hero h1 { font-size: 28px; }
  .nav-container { flex-direction: column; height: auto; padding: 15px 0; }
  nav a { margin: 5px 10px; }
}