/**
 * BigBunny VIP - Mobile-First Gaming Platform Styles
 * Optimized for touch interactions and mobile performance
 * @version 1.0.0
 * @prefix sb1e-
 */

/* Root Variables and Base Setup */
:root {
  font-size: 62.5%; /* 1rem = 10px for easier calculations */
  --sb1e-primary: #90EE90;
  --sb1e-dark: #0D1117;
  --sb1e-light: #D3D3D3;
  --sb1e-accent: #CD853F;
  --sb1e-secondary: #FA8072;
  --sb1e-tertiary: #D2691E;
  
  --sb1e-gradient-primary: linear-gradient(135deg, var(--sb1e-primary), var(--sb1e-accent));
  --sb1e-gradient-dark: linear-gradient(135deg, var(--sb1e-dark), var(--sb1e-tertiary));
  --sb1e-gradient-warm: linear-gradient(135deg, var(--sb1e-secondary), var(--sb1e-tertiary));
  
  --sb1e-shadow-sm: 0 2px 4px rgba(13, 17, 23, 0.1);
  --sb1e-shadow-md: 0 4px 8px rgba(13, 17, 23, 0.15);
  --sb1e-shadow-lg: 0 8px 16px rgba(13, 17, 23, 0.2);
  --sb1e-shadow-xl: 0 16px 32px rgba(13, 17, 23, 0.25);
  
  --sb1e-radius-sm: 0.4rem;
  --sb1e-radius-md: 0.8rem;
  --sb1e-radius-lg: 1.2rem;
  --sb1e-radius-xl: 1.6rem;
  
  --sb1e-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sb1e-transition-fast: all 0.15s ease-out;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--sb1e-dark);
  background: var(--sb1e-light);
  overflow-x: hidden;
}

/* Layout Components */
.sb1e-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 430px;
  margin: 0 auto;
  background: #fff;
  box-shadow: var(--sb1e-shadow-lg);
}

.sb1e-container {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header Styles */
.sb1e-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(144, 238, 144, 0.2);
  z-index: 1000;
  padding: 1.2rem 0;
}

.sb1e-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.4rem;
}

.sb1e-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--sb1e-dark);
  font-weight: 700;
  font-size: 2rem;
  gap: 1rem;
}

.sb1e-logo-img {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: var(--sb1e-radius-md);
}

.sb1e-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Button Styles */
.sb1e-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--sb1e-radius-lg);
  transition: var(--sb1e-transition);
  border: none;
  cursor: pointer;
  min-height: 4.4rem;
  gap: 0.8rem;
  touch-action: manipulation;
  user-select: none;
}

.sb1e-btn-primary {
  background: var(--sb1e-gradient-primary);
  color: var(--sb1e-dark);
  box-shadow: var(--sb1e-shadow-md);
}

.sb1e-btn-primary:hover,
.sb1e-btn-primary:active {
  transform: translateY(-2px);
  box-shadow: var(--sb1e-shadow-lg);
}

.sb1e-btn-secondary {
  background: var(--sb1e-gradient-warm);
  color: white;
  box-shadow: var(--sb1e-shadow-md);
}

.sb1e-btn-outline {
  background: transparent;
  color: var(--sb1e-primary);
  border: 2px solid var(--sb1e-primary);
}

.sb1e-btn-sm {
  padding: 0.8rem 1.6rem;
  font-size: 1.3rem;
  min-height: 3.6rem;
}

.sb1e-btn-lg {
  padding: 1.4rem 2.8rem;
  font-size: 1.6rem;
  min-height: 5.2rem;
}

/* Hamburger Menu */
.sb1e-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 2.4rem;
  height: 1.8rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.sb1e-hamburger span {
  width: 100%;
  height: 2px;
  background: var(--sb1e-dark);
  transition: var(--sb1e-transition);
  transform-origin: center;
}

.sb1e-hamburger.sb1e-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.sb1e-hamburger.sb1e-active span:nth-child(2) {
  opacity: 0;
}

.sb1e-hamburger.sb1e-active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.sb1e-mobile-menu {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateX(-100%);
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: white;
  z-index: 999;
  padding: 8rem 0 2rem 0;
  transition: var(--sb1e-transition);
  overflow-y: auto;
}

.sb1e-mobile-menu.sb1e-active {
  transform: translateX(-50%) translateX(0);
}

.sb1e-menu-list {
  list-style: none;
  padding: 0 2rem;
}

.sb1e-menu-item {
  border-bottom: 1px solid rgba(144, 238, 144, 0.1);
}

.sb1e-nav-link {
  display: flex;
  align-items: center;
  padding: 1.8rem 0;
  color: var(--sb1e-dark);
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  gap: 1.2rem;
  transition: var(--sb1e-transition-fast);
  min-height: 4.4rem;
}

.sb1e-nav-link:hover,
.sb1e-nav-link:active {
  color: var(--sb1e-primary);
  padding-left: 1rem;
}

.sb1e-nav-link i {
  width: 2rem;
  font-size: 1.8rem;
  color: var(--sb1e-accent);
}

/* Menu Overlay */
.sb1e-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--sb1e-transition);
}

.sb1e-menu-overlay.sb1e-active {
  opacity: 1;
  visibility: visible;
}

/* Main Content */
.sb1e-main {
  flex: 1;
  padding-bottom: 10rem;
}

/* Card Components */
.sb1e-card {
  background: white;
  border-radius: var(--sb1e-radius-xl);
  box-shadow: var(--sb1e-shadow-md);
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid rgba(144, 238, 144, 0.1);
}

.sb1e-card-header {
  background: var(--sb1e-gradient-primary);
  padding: 2rem;
  color: var(--sb1e-dark);
}

.sb1e-card-body {
  padding: 2rem;
}

/* Typography */
.sb1e-h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.6rem;
  color: var(--sb1e-dark);
}

.sb1e-h2 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  color: var(--sb1e-dark);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sb1e-h3 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--sb1e-dark);
}

.sb1e-h4 {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  color: var(--sb1e-dark);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Grid System */
.sb1e-grid {
  display: grid;
  gap: 2rem;
}

.sb1e-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.sb1e-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.sb1e-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 380px) {
  .sb1e-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sb1e-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Carousel Styles */
.sb1e-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--sb1e-radius-xl);
  margin-bottom: 2rem;
  height: 20rem;
  background: var(--sb1e-gradient-dark);
}

.sb1e-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: var(--sb1e-transition);
}

.sb1e-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 17, 23, 0.4);
  z-index: 1;
}

.sb1e-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 2rem;
}

.sb1e-slide-content h2 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.sb1e-slide-content p {
  font-size: 1.6rem;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.sb1e-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 3;
}

.sb1e-dot {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--sb1e-transition-fast);
}

.sb1e-dot.sb1e-active {
  background: var(--sb1e-primary);
  transform: scale(1.2);
}

/* Games Grid */
.sb1e-game-category {
  margin-bottom: 3rem;
}

.sb1e-category-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1.2rem;
  padding: 0 2rem;
}

.sb1e-category-icon {
  font-size: 2.8rem;
  color: var(--sb1e-accent);
}

.sb1e-category-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--sb1e-dark);
}

.sb1e-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 1.5rem;
  padding: 0 2rem;
}

.sb1e-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--sb1e-dark);
  transition: var(--sb1e-transition);
  min-height: 4.4rem;
}

.sb1e-game-item:hover,
.sb1e-game-item:active {
  transform: translateY(-4px);
}

.sb1e-game-img {
  width: 7rem;
  height: 7rem;
  border-radius: var(--sb1e-radius-lg);
  object-fit: cover;
  box-shadow: var(--sb1e-shadow-md);
  margin-bottom: 0.8rem;
  transition: var(--sb1e-transition);
}

.sb1e-game-item:hover .sb1e-game-img {
  box-shadow: var(--sb1e-shadow-lg);
}

.sb1e-game-name {
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

/* Bottom Navigation */
.sb1e-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(144, 238, 144, 0.2);
  z-index: 1000;
  padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom));
}

.sb1e-bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 390px;
  margin: 0 auto;
  padding: 0 2rem;
}

.sb1e-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--sb1e-light);
  transition: var(--sb1e-transition-fast);
  padding: 0.8rem;
  border-radius: var(--sb1e-radius-md);
  min-width: 4.4rem;
  min-height: 4.4rem;
  justify-content: center;
}

.sb1e-bottom-nav-item:hover,
.sb1e-bottom-nav-item:active,
.sb1e-bottom-nav-item.sb1e-active {
  color: var(--sb1e-primary);
  background: rgba(144, 238, 144, 0.1);
}

.sb1e-bottom-nav-item i,
.sb1e-bottom-nav-item ion-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.sb1e-bottom-nav-text {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Footer */
.sb1e-footer {
  background: var(--sb1e-gradient-dark);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.sb1e-footer-content {
  padding: 0 2rem;
}

.sb1e-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.6rem;
  margin-bottom: 2rem;
}

.sb1e-footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1.3rem;
  transition: var(--sb1e-transition-fast);
}

.sb1e-footer-link:hover,
.sb1e-footer-link:active {
  color: var(--sb1e-primary);
}

.sb1e-partners {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.sb1e-partner-img {
  width: 4rem;
  height: 4rem;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: var(--sb1e-transition-fast);
}

.sb1e-partner-img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.sb1e-copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
}

/* Utility Classes */
.sb1e-text-center {
  text-align: center;
}

.sb1e-text-left {
  text-align: left;
}

.sb1e-text-right {
  text-align: right;
}

.sb1e-mb-sm {
  margin-bottom: 1rem;
}

.sb1e-mb-md {
  margin-bottom: 2rem;
}

.sb1e-mb-lg {
  margin-bottom: 3rem;
}

.sb1e-mt-sm {
  margin-top: 1rem;
}

.sb1e-mt-md {
  margin-top: 2rem;
}

.sb1e-mt-lg {
  margin-top: 3rem;
}

/* Animation Classes */
.sb1e-animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--sb1e-transition);
}

.sb1e-animate-on-scroll.sb1e-animated {
  opacity: 1;
  transform: translateY(0);
}

.sb1e-lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.sb1e-lazy[src] {
  opacity: 1;
}

/* Loading States */
.sb1e-loading {
  position: relative;
  overflow: hidden;
}

.sb1e-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(144, 238, 144, 0.2),
    transparent
  );
  animation: sb1e-shimmer 1.5s infinite;
}

@keyframes sb1e-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
  .sb1e-btn:hover {
    transform: none;
  }
  
  .sb1e-game-item:hover {
    transform: none;
  }
  
  .sb1e-nav-link:hover {
    padding-left: 0;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --sb1e-primary: #4CAF50;
    --sb1e-dark: #000000;
    --sb1e-light: #FFFFFF;
  }
  
  .sb1e-card {
    border: 2px solid var(--sb1e-dark);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .sb1e-carousel {
    animation: none;
  }
}

/* Print styles */
@media print {
  .sb1e-header,
  .sb1e-bottom-nav,
  .sb1e-mobile-menu,
  .sb1e-hamburger {
    display: none !important;
  }
  
  .sb1e-main {
    margin-top: 0 !important;
    padding-bottom: 0 !important;
  }
  
  .sb1e-card {
    box-shadow: none;
    border: 1px solid #000;
  }
}