/* Bouncing Ball Main CSS - Mobile-First Design */
/* All classes use uifb- prefix to avoid conflicts */

/* CSS Variables */
:root {
  --uifb-primary: #FF1493;
  --uifb-secondary: #B2DFDB;
  --uifb-bg: #141414;
  --uifb-bg-light: #2a2a2a;
  --uifb-text: #00FFFF;
  --uifb-text-muted: #B2DFDB;
  --uifb-accent: #00E5FF;
  --uifb-border: #444;
  --uifb-shadow: rgba(255, 20, 147, 0.2);
  --uifb-gradient: linear-gradient(135deg, #FF1493, #00E5FF);
  --uifb-hover: rgba(0, 229, 255, 0.8);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--uifb-bg);
  color: var(--uifb-text);
  line-height: 1.5;
  font-size: 1.4rem;
  overflow-x: hidden;
}

/* Container */
.uifb-container {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.uifb-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.uifb-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  height: 6rem;
}

.uifb-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--uifb-text);
}

.uifb-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.6rem;
}

.uifb-logo-text {
  font-size: 2rem;
  font-weight: 700;
  color: var(--uifb-primary);
}

/* Navigation */
.uifb-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.uifb-menu-toggle {
  background: none;
  border: none;
  color: var(--uifb-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.4rem;
  transition: all 0.2s ease;
}

.uifb-menu-toggle:hover {
  background: var(--uifb-bg-light);
  color: var(--uifb-primary);
}

.uifb-nav-menu {
  position: fixed;
  top: 6rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--uifb-bg);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 999;
}

.uifb-nav-menu.uifb-active {
  transform: translateX(0);
}

.uifb-nav-list {
  list-style: none;
  padding: 2rem 0;
}

.uifb-nav-item {
  border-bottom: 1px solid var(--uifb-border);
}

.uifb-nav-link {
  display: block;
  padding: 1.5rem 2rem;
  color: var(--uifb-text);
  text-decoration: none;
  font-size: 1.6rem;
  transition: all 0.2s ease;
}

.uifb-nav-link:hover {
  background: var(--uifb-bg-light);
  color: var(--uifb-primary);
}

/* Overlay */
.uifb-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}

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

/* Main Content */
.uifb-main {
  flex: 1;
  padding-top: 6rem;
  padding-bottom: 8rem;
}

/* Buttons */
.uifb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  background: var(--uifb-gradient);
  color: var(--uifb-bg);
  text-decoration: none;
  border-radius: 0.8rem;
  font-weight: 600;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 4.4rem;
  gap: 0.8rem;
}

.uifb-btn:hover {  
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--uifb-shadow);
}

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

.uifb-btn-outline:hover {
  background: var(--uifb-primary);
  color: var(--uifb-bg);
}

.uifb-btn-small {
  padding: 0.8rem 1.6rem;
  font-size: 1.2rem;
  min-height: 3.6rem;
}

/* Touch feedback */
.uifb-touch-active {
  transform: scale(0.98);
  opacity: 0.8;
}

/* Bouncing animation */
@keyframes uifb-bounce {
  0%, 20%, 53%, 80%, 100% {
    animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
    transform: translate3d(0, -30px, 0);
  }
  70% {
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0,-4px,0);
  }
}

.uifb-bounce-animation {
  animation: uifb-bounce 0.6s ease;
}

.uifb-bouncing {
  cursor: pointer;
}

/* Slider/Carousel */
.uifb-slider {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  margin: 2rem 0;
}

.uifb-slides-container {
  display: flex;
  transition: transform 0.4s ease;
}

.uifb-slide {
  min-width: 100%;
  position: relative;
}

.uifb-slide img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  display: block;
}

.uifb-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(20, 20, 20, 0.9));
  padding: 2rem;
  color: var(--uifb-text);
}

.uifb-slide-indicators {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.uifb-slide-indicator {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--uifb-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.uifb-slide-indicator.uifb-active {
  background: var(--uifb-primary);
  transform: scale(1.2);
}

/* Game Grid */
.uifb-games-section {
  margin: 3rem 0;
}

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

.uifb-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.uifb-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--uifb-text);
  padding: 1rem;
  border-radius: 1rem;
  background: var(--uifb-bg-light);
  border: 1px solid var(--uifb-border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.uifb-game-item:hover {
  transform: translateY(-2px);
  border-color: var(--uifb-primary);
  box-shadow: 0 4px 12px var(--uifb-shadow);
}

.uifb-game-icon {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 0.8rem;
  object-fit: cover;
  margin-bottom: 0.8rem;
}

.uifb-game-name {
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}

/* Content Sections */
.uifb-content-section {
  margin: 4rem 0;
  padding: 3rem 2rem;
  background: var(--uifb-bg-light);
  border-radius: 1.2rem;
  border: 1px solid var(--uifb-border);
}

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

.uifb-content-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--uifb-text);
  margin-bottom: 1.5rem;
}

.uifb-content-text:last-child {
  margin-bottom: 0;
}

/* FAQ */
.uifb-faq-item {
  margin-bottom: 2rem;
  border: 1px solid var(--uifb-border);
  border-radius: 0.8rem;
  overflow: hidden;
}

.uifb-faq-question {
  background: var(--uifb-bg-light);
  padding: 1.5rem 2rem;
  font-weight: 600;
  color: var(--uifb-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.uifb-faq-answer {
  padding: 1.5rem 2rem;
  color: var(--uifb-text);
  line-height: 1.6;
}

/* Bottom Navigation */
.uifb-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--uifb-bg);
  border-top: 1px solid var(--uifb-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 6rem;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.uifb-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.4rem;
  text-decoration: none;
  color: var(--uifb-text-muted);
  font-size: 1rem;
  min-width: 4.4rem;
  min-height: 4.4rem;
  border-radius: 0.6rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.uifb-bottom-nav-item:hover,
.uifb-bottom-nav-item.uifb-active {
  color: var(--uifb-primary);
  background: var(--uifb-bg-light);
}

.uifb-bottom-nav-icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

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

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

.uifb-footer-content {
  text-align: center;
}

.uifb-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.uifb-footer-link {
  color: var(--uifb-text-muted);
  text-decoration: none;
  font-size: 1.3rem;
  transition: color 0.2s ease;
}

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

.uifb-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.uifb-partner-icon {
  width: 4rem;
  height: 4rem;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all 0.2s ease;
}

.uifb-partner-icon:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.uifb-copyright {
  color: var(--uifb-text-muted);
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* Promo Links */
.uifb-promo-link {
  color: var(--uifb-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.uifb-promo-link:hover {
  border-bottom-color: var(--uifb-primary);
}

/* Cards */
.uifb-card {
  background: var(--uifb-bg-light);
  border: 1px solid var(--uifb-border);
  border-radius: 1.2rem;
  padding: 2rem;
  margin: 2rem 0;
}

.uifb-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--uifb-primary);
  margin-bottom: 1.5rem;
}

.uifb-card-content {
  color: var(--uifb-text);
  line-height: 1.6;
}

/* Statistics */
.uifb-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.uifb-stat-item {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--uifb-bg-light);
  border-radius: 1rem;
  border: 1px solid var(--uifb-border);
}

.uifb-stat-number {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--uifb-primary);
  display: block;
}

.uifb-stat-label {
  font-size: 1.2rem;
  color: var(--uifb-text-muted);
  margin-top: 0.5rem;
}

/* Animations */
@keyframes uifb-fadeIn {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.uifb-fade-in {
  animation: uifb-fadeIn 0.6s ease forwards;
}

/* Responsive Design */
@media (min-width: 768px) {
  .uifb-bottom-nav {
    display: none;
  }
  
  .uifb-main {
    padding-bottom: 2rem;
  }
  
  .uifb-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 2rem;
  }
  
  .uifb-nav-actions {
    gap: 1.5rem;
  }
  
  .uifb-menu-toggle {
    display: none;
  }
  
  .uifb-nav-menu {
    position: static;
    transform: none;
    background: none;
    display: flex;
    align-items: center;
  }
  
  .uifb-nav-list {
    display: flex;
    padding: 0;
    gap: 2rem;
  }
  
  .uifb-nav-item {
    border: none;
  }
  
  .uifb-nav-link {
    padding: 1rem 1.5rem;
    font-size: 1.4rem;
    border-radius: 0.6rem;
  }
  
  .uifb-overlay {
    display: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --uifb-border: #666;
    --uifb-bg-light: #333;
  }
}

/* Print styles */
@media print {
  .uifb-header,
  .uifb-bottom-nav,
  .uifb-menu-toggle,
  .uifb-btn {
    display: none !important;
  }
  
  .uifb-main {
    padding-top: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}