/* Bouncing Ball CSS Design - Part 1 Foundation */
/* All classes use ge29- prefix for namespace isolation */

/* CSS Variables - Bouncing Ball Brand Colors */
:root {
  --ge29-primary: #DDA0DD;
  --ge29-secondary: #8B008B;
  --ge29-dark: #2D2D2D;
  --ge29-light: #ADB5BD;
  --ge29-white: #FFFFFF;
  --ge29-black: #000000;
  --ge29-success: #28a745;
  --ge29-warning: #ffc107;
  --ge29-danger: #dc3545;
  --ge29-info: #17a2b8;
  --ge29-gradient: linear-gradient(135deg, #DDA0DD 0%, #8B008B 100%);
  --ge29-shadow: 0 2px 10px rgba(139, 0, 139, 0.3);
  --ge29-shadow-hover: 0 4px 20px rgba(139, 0, 139, 0.4);
  --ge29-radius: 8px;
  --ge29-radius-lg: 12px;
  --ge29-transition: all 0.3s ease;
}

/* 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: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--ge29-white);
  background-color: var(--ge29-dark);
  overflow-x: hidden;
}

/* Typography */
.ge29-h1, .ge29-h2, .ge29-h3, .ge29-h4, .ge29-h5, .ge29-h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.ge29-h1 { font-size: 2.8rem; }
.ge29-h2 { font-size: 2.4rem; }
.ge29-h3 { font-size: 2rem; }
.ge29-h4 { font-size: 1.8rem; }
.ge29-h5 { font-size: 1.6rem; }
.ge29-h6 { font-size: 1.4rem; }

.ge29-text { font-size: 1.6rem; line-height: 1.5; }
.ge29-text-sm { font-size: 1.4rem; line-height: 1.4; }
.ge29-text-lg { font-size: 1.8rem; line-height: 1.6; }

/* Layout */
.ge29-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ge29-wrapper {
  min-height: 100vh;
  padding-bottom: 8rem; /* Space for bottom nav on mobile */
}

.ge29-grid {
  display: grid;
  gap: 1.5rem;
}

.ge29-flex {
  display: flex;
  align-items: center;
}

.ge29-flex-col {
  display: flex;
  flex-direction: column;
}

.ge29-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ge29-space-between {
  justify-content: space-between;
}

.ge29-text-center { text-align: center; }
.ge29-text-left { text-align: left; }
.ge29-text-right { text-align: right; }

/* Header */
.ge29-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--ge29-gradient);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--ge29-shadow);
}

.ge29-header-content {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ge29-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ge29-white);
}

.ge29-logo-icon {
  width: 2.8rem;
  height: 2.8rem;
  background: var(--ge29-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--ge29-secondary);
}

.ge29-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ge29-white);
}

.ge29-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ge29-btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: var(--ge29-radius);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ge29-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem; /* Touch-friendly minimum */
  min-width: 4.4rem;
}

.ge29-btn-primary {
  background: var(--ge29-white);
  color: var(--ge29-secondary);
}

.ge29-btn-primary:hover {
  background: var(--ge29-light);
  transform: translateY(-1px);
  box-shadow: var(--ge29-shadow-hover);
}

.ge29-btn-outline {
  background: transparent;
  color: var(--ge29-white);
  border: 2px solid var(--ge29-white);
}

.ge29-btn-outline:hover {
  background: var(--ge29-white);
  color: var(--ge29-secondary);
}

.ge29-menu-button {
  background: none;
  border: none;
  color: var(--ge29-white);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--ge29-radius);
  transition: var(--ge29-transition);
}

.ge29-menu-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu */
.ge29-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--ge29-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.ge29-mobile-menu.active {
  right: 0;
}

.ge29-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ge29-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ge29-menu-header {
  padding: 1.5rem;
  background: var(--ge29-gradient);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ge29-menu-close {
  background: none;
  border: none;
  color: var(--ge29-white);
  font-size: 2.4rem;
  cursor: pointer;
}

.ge29-menu-nav {
  padding: 1.5rem 0;
}

.ge29-menu-item {
  display: block;
  padding: 1.2rem 1.5rem;
  color: var(--ge29-white);
  text-decoration: none;
  font-size: 1.6rem;
  transition: var(--ge29-transition);
  border-left: 3px solid transparent;
}

.ge29-menu-item:hover {
  background: rgba(221, 160, 221, 0.1);
  border-left-color: var(--ge29-primary);
}

/* Main Content */
.ge29-main {
  padding-top: 7rem; /* Account for fixed header */
  min-height: calc(100vh - 7rem);
}

/* Carousel */
.ge29-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--ge29-radius-lg);
  margin-bottom: 2rem;
}

.ge29-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.ge29-carousel-slide.active {
  opacity: 1;
}

.ge29-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ge29-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.ge29-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--ge29-transition);
}

.ge29-carousel-indicator.active {
  background: var(--ge29-white);
  width: 24px;
  border-radius: 4px;
}

/* Cards */
.ge29-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--ge29-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--ge29-transition);
}

.ge29-card:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--ge29-shadow);
}

/* Games Grid */
.ge29-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.ge29-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--ge29-radius);
  cursor: pointer;
  transition: var(--ge29-transition);
  text-decoration: none;
  color: var(--ge29-white);
  min-height: 100px;
}

.ge29-game-item:hover {
  background: rgba(221, 160, 221, 0.2);
  transform: translateY(-2px);
}

.ge29-game-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.5rem;
  border-radius: var(--ge29-radius);
  overflow: hidden;
}

.ge29-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ge29-game-name {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* Bottom Navigation */
.ge29-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ge29-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  padding: 0.5rem 0;
  backdrop-filter: blur(10px);
}

.ge29-bottom-nav-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
}

.ge29-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  color: var(--ge29-light);
  text-decoration: none;
  transition: var(--ge29-transition);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1rem;
}

.ge29-bottom-nav-item:hover,
.ge29-bottom-nav-item.active {
  color: var(--ge29-primary);
  transform: scale(1.05);
}

.ge29-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
}

.ge29-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.ge29-footer {
  background: var(--ge29-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0 8rem; /* Extra padding for bottom nav */
}

.ge29-footer-content {
  margin-bottom: 2rem;
}

.ge29-footer-section {
  margin-bottom: 2rem;
}

.ge29-footer-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--ge29-primary);
}

.ge29-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.ge29-footer-link {
  color: var(--ge29-light);
  text-decoration: none;
  font-size: 1.4rem;
  transition: var(--ge29-transition);
}

.ge29-footer-link:hover {
  color: var(--ge29-primary);
}

.ge29-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.ge29-partner-logo {
  width: 40px;
  height: 40px;
  opacity: 0.7;
  transition: var(--ge29-transition);
}

.ge29-partner-logo:hover {
  opacity: 1;
}

.ge29-partner-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ge29-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--ge29-light);
  opacity: 0.7;
  margin-top: 2rem;
}

/* Utility Classes */
.ge29-mb-1 { margin-bottom: 1rem; }
.ge29-mb-2 { margin-bottom: 2rem; }
.ge29-mb-3 { margin-bottom: 3rem; }
.ge29-mt-1 { margin-top: 1rem; }
.ge29-mt-2 { margin-top: 2rem; }
.ge29-mt-3 { margin-top: 3rem; }

.ge29-p-1 { padding: 1rem; }
.ge29-p-2 { padding: 2rem; }
.ge29-p-3 { padding: 3rem; }

.ge29-w-100 { width: 100%; }
.ge29-h-100 { height: 100%; }

.ge29-d-none { display: none; }
.ge29-d-block { display: block; }
.ge29-d-flex { display: flex; }

/* Responsive Design */
@media (max-width: 768px) {
  .ge29-wrapper {
    padding-bottom: 8rem; /* Ensure content clears bottom nav */
  }

  .ge29-bottom-nav {
    display: block; /* Show bottom nav on mobile */
  }
}

@media (min-width: 769px) {
  .ge29-bottom-nav {
    display: none; /* Hide bottom nav on desktop */
  }

  .ge29-container {
    max-width: 1200px;
  }

  .ge29-games-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
  }

  .ge29-game-item {
    min-height: 120px;
  }
}

/* Animations */
@keyframes ge29-fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ge29-fade-in {
  animation: ge29-fadeIn 0.5s ease forwards;
}

/* Loading States */
.ge29-loading {
  position: relative;
  pointer-events: none;
}

.ge29-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 2px solid var(--ge29-primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}