/*
 * RR888 Theme Stylesheet
 * Prefix: s3bb-
 * Color Palette: #C71585 (MediumVioletRed) | #1A1A2E (Dark Navy) | #DCDCDC (Gainsboro) | #DC143C (Crimson) | #FF0000 (Red)
 */

:root {
  --s3bb-primary: #C71585;
  --s3bb-secondary: #1A1A2E;
  --s3bb-text-light: #DCDCDC;
  --s3bb-accent: #DC143C;
  --s3bb-highlight: #FF0000;
  --s3bb-bg-dark: #1A1A2E;
  --s3bb-bg-card: #252545;
  --s3bb-bg-section: #1e1e3a;
  --s3bb-border: #3a3a5c;
  --s3bb-gold: #FFD700;
  --s3bb-font-size: 62.5%;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--s3bb-font-size);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--s3bb-bg-dark);
  color: var(--s3bb-text-light);
  line-height: 1.5rem;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--s3bb-primary); text-decoration: none; }
a:hover { color: var(--s3bb-highlight); }

img { max-width: 100%; height: auto; display: block; }

/* Container */
.s3bb-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.s3bb-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

/* Header */
.s3bb-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--s3bb-secondary) 0%, #2a1a3e 100%);
  border-bottom: 2px solid var(--s3bb-primary);
  height: 56px;
}

.s3bb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.s3bb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.s3bb-logo img {
  width: 28px;
  height: 28px;
}

.s3bb-logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--s3bb-primary), var(--s3bb-highlight));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.s3bb-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.s3bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  min-height: 36px;
}

.s3bb-btn-register {
  background: linear-gradient(135deg, var(--s3bb-primary), var(--s3bb-accent));
  color: #fff;
}

.s3bb-btn-register:hover {
  background: linear-gradient(135deg, var(--s3bb-accent), var(--s3bb-highlight));
  transform: scale(1.05);
}

.s3bb-btn-login {
  background: transparent;
  color: var(--s3bb-text-light);
  border: 1px solid var(--s3bb-primary);
}

.s3bb-btn-login:hover {
  background: var(--s3bb-primary);
  color: #fff;
}

.s3bb-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--s3bb-text-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px;
}

/* Desktop nav */
.s3bb-desktop-nav {
  display: none;
}

/* Mobile menu overlay */
.s3bb-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
}

.s3bb-overlay-active {
  display: block;
}

/* Mobile slide menu */
.s3bb-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--s3bb-secondary);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 2rem 1.5rem;
}

.s3bb-menu-active {
  right: 0;
}

.s3bb-menu-close {
  background: none;
  border: none;
  color: var(--s3bb-text-light);
  font-size: 2.4rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

.s3bb-mobile-menu ul {
  list-style: none;
  margin-top: 3rem;
}

.s3bb-mobile-menu li {
  border-bottom: 1px solid var(--s3bb-border);
}

.s3bb-mobile-menu a {
  display: block;
  padding: 1.2rem 0;
  color: var(--s3bb-text-light);
  font-size: 1.4rem;
  font-weight: 500;
  transition: color 0.2s;
}

.s3bb-mobile-menu a:hover {
  color: var(--s3bb-primary);
}

/* Carousel */
.s3bb-carousel {
  position: relative;
  overflow: hidden;
  margin-top: 56px;
  border-radius: 0 0 12px 12px;
}

.s3bb-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.s3bb-slide {
  min-width: 100%;
  cursor: pointer;
}

.s3bb-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.s3bb-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.s3bb-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s;
}

.s3bb-dot-active {
  background: var(--s3bb-primary);
}

/* Main content */
.s3bb-main {
  padding-bottom: 20px;
}

/* Section headings */
.s3bb-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 2rem 0 1.2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--s3bb-primary);
}

.s3bb-section-subtitle {
  font-size: 1.4rem;
  color: var(--s3bb-text-light);
  margin-bottom: 1rem;
  opacity: 0.8;
}

/* Game grid */
.s3bb-game-category {
  margin-bottom: 2rem;
}

.s3bb-category-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--s3bb-primary);
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.s3bb-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.s3bb-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  background: var(--s3bb-bg-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.s3bb-game-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(199,21,133,0.3);
}

.s3bb-game-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.s3bb-game-name {
  font-size: 1.1rem;
  text-align: center;
  padding: 4px 2px 6px;
  color: var(--s3bb-text-light);
  line-height: 1.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Content cards */
.s3bb-card {
  background: var(--s3bb-bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--s3bb-border);
}

.s3bb-card h3 {
  font-size: 1.6rem;
  color: var(--s3bb-primary);
  margin-bottom: 1rem;
}

.s3bb-card p {
  font-size: 1.3rem;
  line-height: 1.8rem;
  color: var(--s3bb-text-light);
  margin-bottom: 1rem;
}

/* Promo button */
.s3bb-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--s3bb-primary), var(--s3bb-accent));
  color: #fff;
  padding: 10px 24px;
  border-radius: 25px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.s3bb-promo-btn:hover {
  background: linear-gradient(135deg, var(--s3bb-accent), var(--s3bb-highlight));
  transform: scale(1.05);
}

/* Promo text link */
.s3bb-promo-link {
  color: var(--s3bb-highlight);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.s3bb-promo-link:hover {
  color: var(--s3bb-primary);
}

/* Features grid */
.s3bb-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.s3bb-feature-item {
  background: var(--s3bb-bg-section);
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
  border: 1px solid var(--s3bb-border);
}

.s3bb-feature-item i,
.s3bb-feature-item span.material-symbols-outlined {
  font-size: 2.4rem;
  color: var(--s3bb-primary);
  margin-bottom: 0.5rem;
}

.s3bb-feature-item h4 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.s3bb-feature-item p {
  font-size: 1.1rem;
  color: var(--s3bb-text-light);
  opacity: 0.8;
}

/* Footer */
.s3bb-footer {
  background: var(--s3bb-secondary);
  padding: 2rem 1rem 6rem;
  border-top: 2px solid var(--s3bb-primary);
}

.s3bb-footer-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.s3bb-footer-brand p {
  font-size: 1.2rem;
  color: var(--s3bb-text-light);
  opacity: 0.7;
  margin-top: 0.5rem;
}

.s3bb-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.s3bb-footer-links a {
  color: var(--s3bb-text-light);
  font-size: 1.2rem;
  padding: 4px 10px;
  border: 1px solid var(--s3bb-border);
  border-radius: 15px;
  transition: all 0.2s;
}

.s3bb-footer-links a:hover {
  background: var(--s3bb-primary);
  color: #fff;
  border-color: var(--s3bb-primary);
}

.s3bb-footer-copyright {
  text-align: center;
  font-size: 1.1rem;
  color: var(--s3bb-text-light);
  opacity: 0.5;
  margin-top: 1rem;
}

/* Bottom Navigation */
.s3bb-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #2a1a3e 0%, var(--s3bb-secondary) 100%);
  border-top: 2px solid var(--s3bb-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  padding: 0 4px;
}

.s3bb-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 56px;
  background: none;
  border: none;
  color: var(--s3bb-text-light);
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 4px 0;
  opacity: 0.7;
}

.s3bb-bottom-nav-btn i,
.s3bb-bottom-nav-btn span.material-symbols-outlined,
.s3bb-bottom-nav-btn ion-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.s3bb-bottom-nav-btn span.s3bb-nav-label {
  font-size: 1rem;
  font-weight: 500;
}

.s3bb-bottom-nav-btn:hover,
.s3bb-nav-active {
  opacity: 1;
  color: var(--s3bb-primary);
  transform: scale(1.1);
}

.s3bb-nav-active {
  position: relative;
}

.s3bb-nav-active::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--s3bb-primary);
  border-radius: 2px;
}

/* Responsive */
@media (min-width: 769px) {
  .s3bb-bottom-nav { display: none; }
  .s3bb-menu-toggle { display: none; }
  .s3bb-desktop-nav {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .s3bb-desktop-nav a {
    color: var(--s3bb-text-light);
    font-size: 1.3rem;
    font-weight: 500;
    transition: color 0.2s;
  }
  .s3bb-desktop-nav a:hover {
    color: var(--s3bb-primary);
  }
  .s3bb-container { max-width: 768px; }
  .s3bb-header-inner { max-width: 768px; }
  .s3bb-game-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 768px) {
  .s3bb-menu-toggle { display: block; }
  .s3bb-main { padding-bottom: 80px; }
}
