/**
 * Xgane Gaming Platform - Core Stylesheet
 * All classes use v4ef- prefix for namespace isolation
 * Mobile-first design, max-width 430px viewport
 * Color palette: #006400 (dark green) | #0D1117 (dark bg) | #228B22 (accent green)
 */

/* Root variables */
:root {
  --v4ef-primary: #228B22;
  --v4ef-primary-dark: #006400;
  --v4ef-bg: #0D1117;
  --v4ef-bg-light: #161B22;
  --v4ef-bg-card: #1C2333;
  --v4ef-text: #E6EDF3;
  --v4ef-text-muted: #8B949E;
  --v4ef-accent: #2EA043;
  --v4ef-gold: #FFD700;
  --v4ef-border: #30363D;
  --v4ef-radius: 8px;
  --v4ef-radius-lg: 12px;
  --v4ef-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --v4ef-header-h: 56px;
  --v4ef-bottom-h: 60px;
  --v4ef-transition: all 0.3s ease;
}

/* Reset & Base */
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--v4ef-bg);
  color: var(--v4ef-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

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

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

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

/* Container & Layout */
.v4ef-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
  max-width: 100%;
}

.v4ef-wrapper {
  min-height: 100vh;
  padding-top: var(--v4ef-header-h);
  max-width: 100%;
  overflow-x: hidden;
}

.v4ef-grid {
  display: grid;
  gap: 1rem;
}

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

.v4ef-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

/* Header */
.v4ef-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--v4ef-header-h);
  background: var(--v4ef-bg);
  border-bottom: 1px solid var(--v4ef-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  max-width: 100vw;
  overflow-x: hidden;
}

.v4ef-logo-area {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.v4ef-logo-area img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.v4ef-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v4ef-primary);
  letter-spacing: 0.5px;
}

.v4ef-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.v4ef-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: var(--v4ef-radius);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--v4ef-transition);
  min-height: 36px;
  text-align: center;
}

.v4ef-btn-register {
  background: var(--v4ef-primary);
  color: #fff;
}

.v4ef-btn-register:hover {
  background: var(--v4ef-primary-dark);
  transform: scale(1.03);
}

.v4ef-btn-login {
  background: transparent;
  color: var(--v4ef-primary);
  border: 1px solid var(--v4ef-primary);
}

.v4ef-btn-login:hover {
  background: rgba(34, 139, 34, 0.15);
}

.v4ef-menu-btn {
  background: none;
  border: none;
  color: var(--v4ef-text);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.v4ef-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--v4ef-bg-light);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.v4ef-menu-active {
  right: 0;
}

.v4ef-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--v4ef-transition);
}

.v4ef-overlay-active {
  opacity: 1;
  visibility: visible;
}

.v4ef-menu-close {
  background: none;
  border: none;
  color: var(--v4ef-text);
  font-size: 2.4rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.v4ef-menu-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--v4ef-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--v4ef-border);
}

.v4ef-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.v4ef-menu-list li {
  margin-bottom: 0.5rem;
}

.v4ef-menu-list a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  color: var(--v4ef-text);
  font-size: 1.4rem;
  border-radius: var(--v4ef-radius);
  transition: var(--v4ef-transition);
}

.v4ef-menu-list a:hover {
  background: rgba(34, 139, 34, 0.15);
  color: var(--v4ef-primary);
}

.v4ef-menu-list .v4ef-menu-icon {
  font-size: 2rem;
  width: 24px;
  text-align: center;
}

/* Carousel */
.v4ef-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--v4ef-radius-lg);
  margin: 1rem 0;
}

.v4ef-slide {
  display: none;
  width: 100%;
  cursor: pointer;
  position: relative;
}

.v4ef-slide-active {
  display: block;
}

.v4ef-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--v4ef-radius-lg);
}

.v4ef-slide-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.v4ef-slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: var(--v4ef-transition);
}

.v4ef-dot-active {
  background: var(--v4ef-primary);
  transform: scale(1.3);
}

/* Cards */
.v4ef-card {
  background: var(--v4ef-bg-card);
  border-radius: var(--v4ef-radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--v4ef-border);
  transition: var(--v4ef-transition);
}

.v4ef-card:hover {
  border-color: var(--v4ef-primary);
  box-shadow: var(--v4ef-shadow);
}

.v4ef-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--v4ef-text);
  margin-bottom: 0.8rem;
}

/* Game Grid */
.v4ef-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.6rem;
  border-radius: var(--v4ef-radius);
  transition: var(--v4ef-transition);
}

.v4ef-game-item:hover {
  background: rgba(34, 139, 34, 0.1);
  transform: translateY(-2px);
}

.v4ef-game-img {
  width: 64px;
  height: 64px;
  border-radius: var(--v4ef-radius);
  object-fit: cover;
  margin-bottom: 0.4rem;
}

.v4ef-game-name {
  font-size: 1.1rem;
  color: var(--v4ef-text-muted);
  text-align: center;
  line-height: 1.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72px;
}

/* Section Styles */
.v4ef-section {
  padding: 1.5rem 0;
}

.v4ef-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--v4ef-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--v4ef-primary);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.v4ef-section-title .v4ef-title-icon {
  color: var(--v4ef-primary);
  font-size: 2rem;
}

/* Promo Link Styles */
.v4ef-promo-link {
  color: var(--v4ef-gold);
  font-weight: 700;
  cursor: pointer;
  transition: var(--v4ef-transition);
  border-bottom: 1px dashed var(--v4ef-gold);
}

.v4ef-promo-link:hover {
  color: #FFA500;
  border-bottom-color: #FFA500;
}

.v4ef-promo-btn {
  display: block;
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--v4ef-primary-dark), var(--v4ef-primary));
  color: #fff;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  border: none;
  border-radius: var(--v4ef-radius-lg);
  cursor: pointer;
  transition: var(--v4ef-transition);
}

.v4ef-promo-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(34, 139, 34, 0.4);
}

/* Footer */
.v4ef-footer {
  background: var(--v4ef-bg-light);
  border-top: 1px solid var(--v4ef-border);
  padding: 2rem 0;
  margin-top: 2rem;
}

.v4ef-footer-brand {
  font-size: 1.3rem;
  color: var(--v4ef-text-muted);
  line-height: 2rem;
  margin-bottom: 1.5rem;
}

.v4ef-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.v4ef-footer-links a {
  padding: 0.5rem 1rem;
  background: var(--v4ef-bg-card);
  border-radius: var(--v4ef-radius);
  font-size: 1.2rem;
  color: var(--v4ef-text-muted);
  border: 1px solid var(--v4ef-border);
  transition: var(--v4ef-transition);
}

.v4ef-footer-links a:hover {
  color: var(--v4ef-primary);
  border-color: var(--v4ef-primary);
}

.v4ef-footer-copy {
  font-size: 1.2rem;
  color: var(--v4ef-text-muted);
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--v4ef-border);
}

/* Bottom Navigation */
.v4ef-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--v4ef-bottom-h);
  background: var(--v4ef-bg);
  border-top: 1px solid var(--v4ef-border);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
  max-width: 100vw;
  overflow-x: hidden;
}

.v4ef-bottom-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--v4ef-text-muted);
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  min-width: 60px;
  min-height: 50px;
  transition: var(--v4ef-transition);
  border-radius: var(--v4ef-radius);
  position: relative;
}

.v4ef-bottom-btn:hover,
.v4ef-bottom-active {
  color: var(--v4ef-primary);
  transform: scale(1.08);
}

.v4ef-bottom-btn:active {
  transform: scale(0.95);
}

.v4ef-bottom-active::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--v4ef-primary);
  border-radius: 2px;
}

.v4ef-bottom-icon {
  font-size: 2.2rem;
  margin-bottom: 2px;
}

.v4ef-bottom-label {
  font-size: 1rem;
  line-height: 1.2rem;
  font-weight: 500;
}

/* Utility Classes */
.v4ef-text-center { text-align: center; }
.v4ef-text-gold { color: var(--v4ef-gold); }
.v4ef-text-green { color: var(--v4ef-primary); }
.v4ef-text-muted { color: var(--v4ef-text-muted); }
.v4ef-mt-1 { margin-top: 1rem; }
.v4ef-mt-2 { margin-top: 2rem; }
.v4ef-mb-1 { margin-bottom: 1rem; }
.v4ef-mb-2 { margin-bottom: 2rem; }
.v4ef-p-1 { padding: 1rem; }

.v4ef-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--v4ef-primary);
  color: #fff;
  font-size: 1rem;
  border-radius: 4px;
  font-weight: 600;
}

.v4ef-divider {
  height: 1px;
  background: var(--v4ef-border);
  margin: 1.5rem 0;
}

/* Responsive */
@media (min-width: 769px) {
  .v4ef-bottom-nav {
    display: none;
  }
  .v4ef-container {
    max-width: 430px;
  }
}

@media (max-width: 768px) {
  .v4ef-wrapper {
    padding-bottom: calc(var(--v4ef-bottom-h) + 2rem);
  }
}

/* Animation keyframes */
@keyframes v4ef-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.v4ef-animate-in {
  animation: v4ef-fadeIn 0.4s ease forwards;
}

/* Winner ticker */
.v4ef-winner-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.v4ef-winner-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--v4ef-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v4ef-gold);
  font-size: 1.2rem;
  font-weight: 700;
}

.v4ef-winner-info {
  flex: 1;
}

.v4ef-winner-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--v4ef-text);
}

.v4ef-winner-game {
  font-size: 1rem;
  color: var(--v4ef-text-muted);
}

.v4ef-winner-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--v4ef-gold);
}

/* RTP stats compact */
.v4ef-rtp-bar {
  height: 6px;
  background: var(--v4ef-border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.v4ef-rtp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--v4ef-primary-dark), var(--v4ef-primary));
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Payment icons row */
.v4ef-payment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.v4ef-payment-item {
  padding: 0.5rem 1rem;
  background: var(--v4ef-bg-card);
  border: 1px solid var(--v4ef-border);
  border-radius: var(--v4ef-radius);
  font-size: 1.2rem;
  color: var(--v4ef-text-muted);
}

/* Overflow prevention */
table { max-width: 100%; display: block; overflow-x: auto; }
pre, code { max-width: 100%; overflow-x: auto; }
.v4ef-section { max-width: 100%; overflow-x: hidden; }
.v4ef-card { max-width: 100%; overflow-x: hidden; }
