/**
 * megabet.cfd - Theme Stylesheet
 * Prefix: g127-
 * Color Palette: Gold (#CD853F) | Brown (#A0522D) | Dark (#262626)
 */

:root {
  --g127-primary: #CD853F;
  --g127-secondary: #A0522D;
  --g127-bg: #262626;
  --g127-bg-light: #1e1e1e;
  --g127-bg-card: #333333;
  --g127-text: #f0e6d3;
  --g127-text-muted: #b8a88a;
  --g127-accent: #e8b04a;
  --g127-border: #4a3f35;
  --g127-gradient-start: #CD853F;
  --g127-gradient-end: #A0522D;
  --g127-shadow: rgba(205, 133, 63, 0.15);
  --g127-radius: 10px;
  --g127-radius-sm: 6px;
  --g127-radius-lg: 16px;
  --g127-max-width: 430px;
  --g127-header-h: 56px;
  --g127-bnav-h: 60px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  background: var(--g127-bg);
  color: var(--g127-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: var(--g127-max-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}
a { color: var(--g127-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--g127-accent); }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.g127-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--g127-max-width);
  height: var(--g127-header-h);
  background: linear-gradient(180deg, #1a1a1a 0%, #262626 100%);
  border-bottom: 1px solid var(--g127-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 1000;
  backdrop-filter: blur(10px);
}
.g127-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.g127-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--g127-primary), var(--g127-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #1a1a1a;
}
.g127-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--g127-primary);
  letter-spacing: 1px;
}
.g127-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.g127-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: none;
  border-radius: var(--g127-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.g127-btn-register {
  background: linear-gradient(135deg, var(--g127-primary), var(--g127-secondary));
  color: #1a1a1a;
}
.g127-btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--g127-shadow);
}
.g127-btn-login {
  background: transparent;
  color: var(--g127-primary);
  border: 1.5px solid var(--g127-primary);
}
.g127-btn-login:hover {
  background: rgba(205, 133, 63, 0.1);
}
.g127-menu-toggle {
  background: none;
  border: none;
  color: var(--g127-primary);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* Mobile Menu */
.g127-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: #1a1a1a;
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}
.g127-menu-active { right: 0; }
.g127-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  display: none;
}
.g127-overlay-active { display: block; }
.g127-menu-close {
  background: none;
  border: none;
  color: var(--g127-text);
  font-size: 24px;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 16px;
}
.g127-menu-links {
  list-style: none;
  margin-top: 50px;
}
.g127-menu-links li {
  border-bottom: 1px solid var(--g127-border);
}
.g127-menu-links a {
  display: block;
  padding: 14px 0;
  color: var(--g127-text);
  font-size: 15px;
  transition: color 0.2s;
}
.g127-menu-links a:hover { color: var(--g127-primary); }

/* Main Content */
.g127-main {
  padding-top: calc(var(--g127-header-h) + 4px);
  min-height: 100vh;
}

/* Carousel */
.g127-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 var(--g127-radius) var(--g127-radius);
}
.g127-slide {
  display: none;
  width: 100%;
  cursor: pointer;
}
.g127-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.g127-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.g127-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
}
.g127-dot-active {
  background: var(--g127-primary);
  width: 20px;
  border-radius: 4px;
}

/* Section */
.g127-section {
  padding: 20px 12px;
}
.g127-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--g127-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.g127-section-title i,
.g127-section-title .material-icons {
  font-size: 22px;
}

/* Game Grid */
.g127-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.g127-game-card {
  background: var(--g127-bg-card);
  border-radius: var(--g127-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}
.g127-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  border-color: var(--g127-primary);
}
.g127-game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.g127-game-name {
  padding: 6px 4px;
  font-size: 11px;
  text-align: center;
  color: var(--g127-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Category Tabs */
.g127-cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.g127-cat-tabs::-webkit-scrollbar { display: none; }
.g127-cat-tab {
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--g127-bg-card);
  color: var(--g127-text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.g127-cat-tab:hover,
.g127-cat-tab-active {
  background: linear-gradient(135deg, var(--g127-primary), var(--g127-secondary));
  color: #1a1a1a;
  border-color: transparent;
}

/* Content Blocks */
.g127-content-block {
  background: var(--g127-bg-card);
  border-radius: var(--g127-radius);
  padding: 16px;
  margin: 16px 12px;
  border-left: 3px solid var(--g127-primary);
}
.g127-content-block h2 {
  font-size: 17px;
  color: var(--g127-primary);
  margin-bottom: 10px;
}
.g127-content-block p {
  font-size: 14px;
  color: var(--g127-text-muted);
  line-height: 1.7;
}

/* Promo Banner */
.g127-promo-banner {
  background: linear-gradient(135deg, var(--g127-secondary) 0%, var(--g127-primary) 100%);
  border-radius: var(--g127-radius);
  padding: 20px 16px;
  margin: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.g127-promo-banner:hover { transform: scale(1.02); }
.g127-promo-banner h3 {
  font-size: 20px;
  color: #1a1a1a;
  margin-bottom: 6px;
}
.g127-promo-banner p {
  font-size: 14px;
  color: #2a1f10;
}

/* CTA Button */
.g127-cta {
  display: block;
  width: calc(100% - 24px);
  margin: 12px auto;
  padding: 14px;
  background: linear-gradient(135deg, var(--g127-primary), var(--g127-secondary));
  color: #1a1a1a;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--g127-radius);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.25s;
}
.g127-cta:hover {
  box-shadow: 0 6px 25px var(--g127-shadow);
  transform: translateY(-2px);
}

/* Footer */
.g127-footer {
  background: #1a1a1a;
  padding: 30px 12px 20px;
  border-top: 1px solid var(--g127-border);
}
.g127-footer-brand {
  text-align: center;
  margin-bottom: 20px;
}
.g127-footer-brand h3 {
  color: var(--g127-primary);
  font-size: 20px;
  margin-bottom: 6px;
}
.g127-footer-brand p {
  color: var(--g127-text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.g127-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.g127-footer-links a {
  color: var(--g127-text-muted);
  font-size: 13px;
  padding: 4px 8px;
}
.g127-footer-links a:hover { color: var(--g127-primary); }
.g127-partners {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.g127-partners img {
  height: 28px;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.g127-partners img:hover { opacity: 1; }
.g127-copyright {
  text-align: center;
  color: var(--g127-text-muted);
  font-size: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--g127-border);
}

/* Bottom Navigation */
.g127-bnav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--g127-max-width);
  height: var(--g127-bnav-h);
  background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
  border-top: 1px solid var(--g127-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 4px;
}
.g127-bnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 50px;
  background: none;
  border: none;
  color: var(--g127-text-muted);
  cursor: pointer;
  transition: all 0.25s;
  padding: 4px 0;
  position: relative;
}
.g127-bnav-btn i,
.g127-bnav-btn .material-icons {
  font-size: 22px;
  margin-bottom: 2px;
}
.g127-bnav-btn span {
  font-size: 10px;
  font-weight: 500;
}
.g127-bnav-btn:hover,
.g127-bnav-active {
  color: var(--g127-primary);
}
.g127-bnav-active::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--g127-primary);
  border-radius: 2px;
}

/* Help Page Styles */
.g127-help-section {
  padding: 16px 12px;
}
.g127-help-section h1 {
  font-size: 22px;
  color: var(--g127-primary);
  margin-bottom: 16px;
  text-align: center;
}
.g127-help-section h2 {
  font-size: 17px;
  color: var(--g127-accent);
  margin: 20px 0 10px;
}
.g127-help-section p,
.g127-help-section li {
  font-size: 14px;
  color: var(--g127-text-muted);
  line-height: 1.7;
}
.g127-help-section ul,
.g127-help-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}
.g127-faq-item {
  background: var(--g127-bg-card);
  border-radius: var(--g127-radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  border-left: 3px solid var(--g127-primary);
}
.g127-faq-item h3 {
  font-size: 15px;
  color: var(--g127-primary);
  margin-bottom: 6px;
}
.g127-faq-item p {
  font-size: 13px;
  color: var(--g127-text-muted);
  line-height: 1.6;
}

/* Inline Promo Link */
.g127-promo-link {
  color: var(--g127-accent);
  cursor: pointer;
  font-weight: 600;
  border-bottom: 1px dashed var(--g127-accent);
}
.g127-promo-link:hover { color: var(--g127-primary); }

/* Responsive - Desktop */
@media (min-width: 769px) {
  .g127-bnav { display: none; }
  .g127-menu-toggle { display: none; }
  body { max-width: 100%; }
}
@media (max-width: 768px) {
  .g127-main { padding-bottom: calc(var(--g127-bnav-h) + 20px); }
}
