/* Jilibay Gaming Platform - Mobile-First CSS Framework */
/* All classes use v5fd- prefix to avoid conflicts */

/* CSS Variables */
:root {
  --v5fd-primary: #00FF00;
  --v5fd-secondary: #7FFF00;
  --v5fd-accent: #90EE90;
  --v5fd-dark: #2C2C2C;
  --v5fd-light: #FFFFFF;
  --v5fd-gray: #666666;
  --v5fd-shadow: rgba(0, 255, 0, 0.2);
  --v5fd-border: rgba(127, 255, 0, 0.3);
  --v5fd-bg-overlay: rgba(44, 44, 44, 0.95);
  
  /* Typography */
  --v5fd-font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --v5fd-font-size-base: 1.4rem;
  --v5fd-line-height: 1.5;
  
  /* Spacing */
  --v5fd-spacing-xs: 0.5rem;
  --v5fd-spacing-sm: 1rem;
  --v5fd-spacing-md: 1.5rem;
  --v5fd-spacing-lg: 2rem;
  --v5fd-spacing-xl: 3rem;
  
  /* Border radius */
  --v5fd-radius-sm: 0.4rem;
  --v5fd-radius-md: 0.8rem;
  --v5fd-radius-lg: 1.2rem;
  
  /* Transitions */
  --v5fd-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --v5fd-transition-fast: all 0.15s ease-out;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: var(--v5fd-font-primary);
  font-size: var(--v5fd-font-size-base);
  line-height: var(--v5fd-line-height);
  color: var(--v5fd-light);
  background: linear-gradient(135deg, var(--v5fd-dark) 0%, #1a1a1a 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Touch Device Optimizations */
.v5fd-touch-device {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.v5fd-touch-device input,
.v5fd-touch-device textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* Layout Components */
.v5fd-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 7rem; /* Space for bottom nav */
}

.v5fd-container {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 var(--v5fd-spacing-sm);
  flex: 1;
}

.v5fd-grid {
  display: grid;
  gap: var(--v5fd-spacing-md);
  grid-template-columns: 1fr;
}

.v5fd-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--v5fd-spacing-sm);
}

/* Header Styles */
.v5fd-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--v5fd-bg-overlay);
  backdrop-filter: blur(10px);
  z-index: 1001;
  border-bottom: 1px solid var(--v5fd-border);
}

.v5fd-nav {
  max-width: 43rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--v5fd-spacing-sm);
  min-height: 5.6rem;
  position: relative;
  z-index: 1002;
  visibility: visible;
  opacity: 1;
}

.v5fd-logo {
  display: flex;
  align-items: center;
  gap: var(--v5fd-spacing-xs);
  text-decoration: none;
  color: var(--v5fd-light);
  font-weight: 600;
  font-size: 1.8rem;
  position: relative;
  z-index: 1002;
  visibility: visible;
  opacity: 1;
}

.v5fd-logo-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--v5fd-radius-sm);
}

.v5fd-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--v5fd-spacing-xs);
  position: relative;
  z-index: 1002;
  visibility: visible;
  opacity: 1;
}

.v5fd-hamburger {
  display: block;
  background: none;
  border: none;
  color: var(--v5fd-primary);
  font-size: 2rem;
  padding: var(--v5fd-spacing-xs);
  cursor: pointer;
  border-radius: var(--v5fd-radius-sm);
  transition: var(--v5fd-transition-fast);
  min-width: 4.4rem;
  min-height: 4.4rem;
}

.v5fd-hamburger:hover {
  background: rgba(0, 255, 0, 0.1);
  transform: scale(1.05);
}

/* Mobile Menu */
.v5fd-mobile-menu {
  position: fixed;
  top: 5.6rem;
  left: 0;
  right: 0;
  background: var(--v5fd-bg-overlay);
  backdrop-filter: blur(10px);
  max-height: calc(100vh - 5.6rem);
  overflow-y: auto;
  transform: translateY(-100%);
  transition: var(--v5fd-transition);
  z-index: 1000;
  visibility: hidden;
  pointer-events: none;
}

.v5fd-menu-open {
  transform: translateY(0);
  box-shadow: 0 5px 25px var(--v5fd-shadow);
  visibility: visible;
  pointer-events: auto;
}

.v5fd-menu-closed {
  transform: translateY(-100%);
  visibility: hidden;
  pointer-events: none;
}

.v5fd-menu-list {
  list-style: none;
  padding: var(--v5fd-spacing-md);
}

.v5fd-menu-item {
  margin-bottom: var(--v5fd-spacing-sm);
}

.v5fd-menu-link {
  display: block;
  padding: var(--v5fd-spacing-md);
  color: var(--v5fd-light);
  text-decoration: none;
  border-radius: var(--v5fd-radius-md);
  transition: var(--v5fd-transition-fast);
  font-size: 1.6rem;
  border: 1px solid transparent;
}

.v5fd-menu-link:hover {
  background: rgba(0, 255, 0, 0.1);
  border-color: var(--v5fd-primary);
  color: var(--v5fd-primary);
  transform: translateX(0.5rem);
}

/* Button Styles */
.v5fd-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--v5fd-radius-md);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--v5fd-transition);
  min-height: 4.4rem;
  min-width: 4.4rem;
  position: relative;
  overflow: hidden;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1003;
}

.v5fd-btn-primary {
  background: linear-gradient(135deg, var(--v5fd-primary) 0%, var(--v5fd-secondary) 100%);
  color: var(--v5fd-dark);
  box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
}

.v5fd-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 0, 0.4);
}

.v5fd-btn-secondary {
  background: transparent;
  color: var(--v5fd-primary);
  border: 2px solid var(--v5fd-primary);
}

.v5fd-btn-secondary:hover {
  background: var(--v5fd-primary);
  color: var(--v5fd-dark);
  transform: translateY(-2px);
}

.v5fd-promo-btn {
  background: linear-gradient(135deg, var(--v5fd-secondary) 0%, var(--v5fd-primary) 100%);
  color: var(--v5fd-dark);
  padding: 1.5rem 3rem;
  font-size: 1.6rem;
  font-weight: 700;
  border-radius: var(--v5fd-radius-lg);
  box-shadow: 0 6px 20px rgba(127, 255, 0, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--v5fd-transition);
  margin: var(--v5fd-spacing-md) 0;
  animation: v5fd-pulse 2s infinite;
}

.v5fd-promo-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(127, 255, 0, 0.5);
}

@keyframes v5fd-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(127, 255, 0, 0.4); }
  50% { box-shadow: 0 8px 25px rgba(127, 255, 0, 0.6); }
}

/* Carousel Styles */
.v5fd-carousel {
  position: relative;
  height: 20rem;
  margin: var(--v5fd-spacing-lg) 0;
  border-radius: var(--v5fd-radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.v5fd-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--v5fd-transition);
}

.v5fd-slide.v5fd-active {
  opacity: 1;
}

.v5fd-slide-content {
  text-align: center;
  padding: var(--v5fd-spacing-lg);
  background: rgba(44, 44, 44, 0.8);
  border-radius: var(--v5fd-radius-md);
  backdrop-filter: blur(5px);
}

.v5fd-slide-content h2 {
  font-size: 2.4rem;
  margin-bottom: var(--v5fd-spacing-sm);
  color: var(--v5fd-primary);
}

.v5fd-slide-content p {
  font-size: 1.4rem;
  color: var(--v5fd-accent);
}

.v5fd-dots {
  position: absolute;
  bottom: var(--v5fd-spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--v5fd-spacing-xs);
}

.v5fd-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--v5fd-transition-fast);
}

.v5fd-dot.v5fd-active {
  background: var(--v5fd-primary);
  transform: scale(1.2);
}

/* Content Sections */
.v5fd-content-section {
  margin: var(--v5fd-spacing-xl) 0;
  padding: var(--v5fd-spacing-lg);
  background: linear-gradient(135deg, rgba(0, 255, 0, 0.05) 0%, rgba(127, 255, 0, 0.05) 100%);
  border-radius: var(--v5fd-radius-lg);
  border: 1px solid var(--v5fd-border);
}

.v5fd-content-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--v5fd-primary);
  margin-bottom: var(--v5fd-spacing-md);
  text-align: center;
}

.v5fd-content-text {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--v5fd-light);
  margin-bottom: var(--v5fd-spacing-md);
}

.v5fd-content-text p {
  margin-bottom: var(--v5fd-spacing-md);
}

.v5fd-content-text strong {
  color: var(--v5fd-accent);
  font-weight: 600;
}

.v5fd-content-text a {
  color: var(--v5fd-primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--v5fd-primary);
  transition: var(--v5fd-transition-fast);
}

.v5fd-content-text a:hover {
  color: var(--v5fd-secondary);
  border-bottom-color: var(--v5fd-secondary);
}

/* Game Grid */
.v5fd-game-section {
  margin: var(--v5fd-spacing-xl) 0;
}

.v5fd-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--v5fd-primary);
  text-align: center;
  margin-bottom: var(--v5fd-spacing-lg);
}

.v5fd-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--v5fd-spacing-sm);
  margin-bottom: var(--v5fd-spacing-lg);
}

.v5fd-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--v5fd-spacing-sm);
  background: rgba(0, 255, 0, 0.05);
  border-radius: var(--v5fd-radius-md);
  cursor: pointer;
  transition: var(--v5fd-transition);
  border: 1px solid transparent;
  min-height: 4.4rem;
}

.v5fd-game-item:hover {
  background: rgba(0, 255, 0, 0.1);
  border-color: var(--v5fd-primary);
  transform: translateY(-2px);
}

.v5fd-game-image {
  width: 4rem;
  height: 4rem;
  border-radius: var(--v5fd-radius-sm);
  object-fit: cover;
  margin-bottom: var(--v5fd-spacing-xs);
  opacity: 0;
  transition: var(--v5fd-transition);
}

.v5fd-game-image.v5fd-loaded {
  opacity: 1;
}

.v5fd-game-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--v5fd-light);
  text-align: center;
  line-height: 1.2;
}

/* Feature List */
.v5fd-feature-list {
  list-style: none;
  margin: var(--v5fd-spacing-lg) 0;
}

.v5fd-feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--v5fd-spacing-sm);
  padding: var(--v5fd-spacing-md);
  background: rgba(0, 255, 0, 0.03);
  border-radius: var(--v5fd-radius-md);
  margin-bottom: var(--v5fd-spacing-sm);
  border-left: 3px solid var(--v5fd-primary);
}

.v5fd-feature-icon {
  color: var(--v5fd-primary);
  font-size: 2rem;
  min-width: 2rem;
  margin-top: 0.2rem;
}

.v5fd-feature-item div {
  color: var(--v5fd-light);
  font-size: 1.4rem;
}

.v5fd-feature-item strong {
  color: var(--v5fd-accent);
  display: block;
  margin-bottom: 0.5rem;
}

/* Bottom Navigation */
.v5fd-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--v5fd-bg-overlay);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-top: 1px solid var(--v5fd-border);
}

.v5fd-bottom-nav-container {
  max-width: 43rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  padding: var(--v5fd-spacing-xs) 0;
}

.v5fd-bottom-nav-item {
  flex: 1;
  text-align: center;
}

.v5fd-bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--v5fd-spacing-xs);
  text-decoration: none;
  color: var(--v5fd-gray);
  transition: var(--v5fd-transition-fast);
  border-radius: var(--v5fd-radius-sm);
  min-height: 5.6rem;
}

.v5fd-bottom-nav-item.v5fd-active .v5fd-bottom-nav-link {
  color: var(--v5fd-primary);
  background: rgba(0, 255, 0, 0.1);
}

.v5fd-bottom-nav-link:hover {
  color: var(--v5fd-primary);
  transform: scale(1.05);
}

.v5fd-bottom-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
}

.v5fd-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.v5fd-footer {
  margin-top: var(--v5fd-spacing-xl);
  padding: var(--v5fd-spacing-xl) var(--v5fd-spacing-md);
  background: var(--v5fd-dark);
  border-top: 1px solid var(--v5fd-border);
}

.v5fd-footer-content {
  max-width: 43rem;
  margin: 0 auto;
  text-align: center;
}

.v5fd-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v5fd-spacing-md);
  margin-bottom: var(--v5fd-spacing-lg);
}

.v5fd-footer-link {
  color: var(--v5fd-light);
  text-decoration: none;
  font-size: 1.3rem;
  transition: var(--v5fd-transition-fast);
}

.v5fd-footer-link:hover {
  color: var(--v5fd-primary);
}

.v5fd-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v5fd-spacing-sm);
  margin: var(--v5fd-spacing-lg) 0;
}

.v5fd-partner-icon {
  width: 3rem;
  height: 3rem;
  opacity: 0.7;
  transition: var(--v5fd-transition-fast);
  border-radius: var(--v5fd-radius-sm);
}

.v5fd-partner-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.v5fd-copyright {
  margin-top: var(--v5fd-spacing-lg);
  padding-top: var(--v5fd-spacing-lg);
  border-top: 1px solid var(--v5fd-border);
  color: var(--v5fd-gray);
  font-size: 1.2rem;
}

/* Utility Classes */
.v5fd-text-center {
  text-align: center;
}

.v5fd-text-primary {
  color: var(--v5fd-primary);
}

.v5fd-text-accent {
  color: var(--v5fd-accent);
}

.v5fd-mb-sm {
  margin-bottom: var(--v5fd-spacing-sm);
}

.v5fd-mb-md {
  margin-bottom: var(--v5fd-spacing-md);
}

.v5fd-mb-lg {
  margin-bottom: var(--v5fd-spacing-lg);
}

/* Navigation Display Fix - Ensures navigation elements are always visible */
.v5fd-header .v5fd-nav,
.v5fd-header .v5fd-logo,
.v5fd-header .v5fd-nav-actions,
.v5fd-header .v5fd-btn {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.v5fd-logo-icon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure mobile menu doesn't interfere when closed */
.v5fd-mobile-menu.v5fd-menu-closed {
  display: none !important;
}

/* Responsive Design */
@media (min-width: 48rem) {
  .v5fd-container {
    max-width: 48rem;
  }
  
  .v5fd-game-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .v5fd-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 30rem) {
  .v5fd-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .v5fd-nav-actions .v5fd-btn {
    font-size: 1.2rem;
    padding: 0.8rem 1.2rem;
  }
  
  .v5fd-content-title {
    font-size: 2rem;
  }
}