/**
 * XGames Core Stylesheet
 * All classes prefixed with 'sbef-' for namespace isolation
 */

/* CSS Variables */
:root {
  --sbef-primary: #800080;
  --sbef-secondary: #9966CC;
  --sbef-accent: #FF1493;
  --sbef-pink: #FFC0CB;
  --sbef-dark: #273746;
  --sbef-light: #FFFFFF;
  --sbef-text: #FFFFFF;
  --sbef-text-muted: #FFC0CB;
  --sbef-border: #9966CC;
  --sbef-shadow: rgba(128, 0, 128, 0.3);
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  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(--sbef-text);
  background-color: var(--sbef-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul, ol {
  list-style: none;
}

/* Container */
.sbef-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.sbef-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--sbef-primary) 0%, var(--sbef-secondary) 100%);
  box-shadow: 0 2px 10px var(--sbef-shadow);
  padding: 0.8rem 0;
}

.sbef-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sbef-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--sbef-light);
}

.sbef-logo img {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 8px;
}

.sbef-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.sbef-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.sbef-btn-primary {
  background: var(--sbef-accent);
  color: var(--sbef-light);
}

.sbef-btn-primary:hover {
  background: var(--sbef-pink);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--sbef-shadow);
}

.sbef-btn-secondary {
  background: var(--sbef-light);
  color: var(--sbef-primary);
}

.sbef-btn-secondary:hover {
  background: var(--sbef-pink);
  color: var(--sbef-dark);
  transform: translateY(-2px);
}

.sbef-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.sbef-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sbef-light);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.sbef-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, var(--sbef-dark) 0%, var(--sbef-primary) 100%);
  z-index: 9999;
  padding: 6rem 2rem 2rem;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 20px var(--sbef-shadow);
}

.sbef-mobile-menu.sbef-menu-open {
  right: 0;
}

.sbef-menu-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--sbef-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.sbef-menu-nav a {
  display: block;
  padding: 1rem 0;
  font-size: 1.6rem;
  color: var(--sbef-light);
  border-bottom: 1px solid rgba(153, 102, 204, 0.3);
  transition: all 0.3s ease;
}

.sbef-menu-nav a:hover {
  color: var(--sbef-pink);
  padding-left: 1rem;
}

.sbef-menu-nav a:last-child {
  border-bottom: none;
}

/* Main Content */
.sbef-main {
  padding-top: 7rem;
  padding-bottom: 8rem;
  min-height: 100vh;
}

/* Section */
.sbef-section {
  padding: 2rem 0;
}

.sbef-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--sbef-light);
  margin-bottom: 1.5rem;
  text-align: center;
}

.sbef-section-title span {
  color: var(--sbef-pink);
}

/* Carousel */
.sbef-carousel {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--sbef-shadow);
}

.sbef-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.sbef-carousel-slide {
  min-width: 100%;
  position: relative;
}

.sbef-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Game Grid */
.sbef-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.sbef-game-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--sbef-primary);
}

.sbef-game-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px var(--sbef-shadow);
}

.sbef-game-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.sbef-game-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(39, 55, 70, 0.9));
  padding: 0.5rem 0.3rem;
  font-size: 1rem;
  color: var(--sbef-light);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cards */
.sbef-card {
  background: linear-gradient(135deg, rgba(128, 0, 128, 0.2) 0%, rgba(153, 102, 204, 0.2) 100%);
  border: 1px solid var(--sbef-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sbef-card-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--sbef-pink);
  margin-bottom: 1rem;
}

.sbef-card-content {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--sbef-text);
}

.sbef-card-content p {
  margin-bottom: 1rem;
}

/* Footer */
.sbef-footer {
  background: linear-gradient(135deg, var(--sbef-dark) 0%, var(--sbef-primary) 100%);
  padding: 2rem 0 8rem;
  border-top: 2px solid var(--sbef-border);
}

.sbef-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.sbef-footer-links a {
  color: var(--sbef-light);
  font-size: 1.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--sbef-border);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.sbef-footer-links a:hover {
  background: var(--sbef-accent);
  border-color: var(--sbef-accent);
  transform: translateY(-2px);
}

.sbef-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.sbef-partners img {
  height: 3rem;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.sbef-partners img:hover {
  opacity: 1;
}

.sbef-copyright {
  text-align: center;
  color: var(--sbef-text-muted);
  font-size: 1.2rem;
}

/* Bottom Navigation */
.sbef-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, var(--sbef-primary) 0%, var(--sbef-secondary) 50%, var(--sbef-primary) 100%);
  box-shadow: 0 -2px 10px var(--sbef-shadow);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  border-top: 2px solid var(--sbef-accent);
}

.sbef-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sbef-light);
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.3rem;
}

.sbef-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.sbef-nav-item:active {
  transform: scale(0.95);
}

.sbef-nav-item.sbef-active {
  color: var(--sbef-pink);
}

.sbef-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 0.2rem;
}

.sbef-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Desktop: Hide bottom nav */
@media (min-width: 769px) {
  .sbef-bottom-nav {
    display: none;
  }

  .sbef-main {
    padding-bottom: 2rem;
  }
}

/* Utility Classes */
.sbef-text-center {
  text-align: center;
}

.sbef-mb-1 {
  margin-bottom: 1rem;
}

.sbef-mb-2 {
  margin-bottom: 2rem;
}

.sbef-mt-1 {
  margin-top: 1rem;
}

.sbef-mt-2 {
  margin-top: 2rem;
}

.sbef-hidden {
  display: none;
}
