/* PH 333 - Design CSS */
/* All classes use sb87- prefix for namespace isolation */

/* Root Variables */
:root {
  --primary-color: #FFAA00;
  --secondary-color: #1E1E1E;
  --text-color: #FFFFFF;
  --text-muted: #CCCCCC;
  --border-color: #333333;
  --success-color: #00CC66;
  --warning-color: #FFAA00;
  --danger-color: #FF4444;
  --font-size-base: 62.5%;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 1.6rem;
  overflow-x: hidden;
}

/* Container */
.sb87-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.sb87-header {
  background-color: var(--secondary-color);
  border-bottom: 2px solid var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.sb87-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.sb87-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.8rem;
  font-weight: bold;
}

.sb87-logo-icon {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.sb87-header-buttons {
  display: flex;
  gap: 1rem;
}

.sb87-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.sb87-btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #FF8800);
  color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.3);
}

.sb87-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 170, 0, 0.4);
}

.sb87-btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.sb87-btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
}

.sb87-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Menu */
.sb87-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: var(--secondary-color);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
  transition: right 0.3s ease;
  z-index: 9999;
  padding: 2rem;
  overflow-y: auto;
}

.sb87-mobile-menu.sb87-active {
  display: block;
  right: 0;
}

.sb87-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 3rem;
  cursor: pointer;
}

.sb87-menu-nav {
  margin-top: 3rem;
}

.sb87-menu-nav a {
  display: block;
  padding: 1.2rem 0;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.6rem;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.sb87-menu-nav a:hover {
  color: var(--primary-color);
  padding-left: 1rem;
}

/* Mobile Menu Overlay */
.sb87-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9998;
}

.sb87-mobile-menu.sb87-active + .sb87-menu-overlay {
  display: block;
}

/* Main Content */
main {
  padding-bottom: 8rem;
  min-height: 100vh;
}

/* Carousel */
.sb87-carousel {
  position: relative;
  margin: 2rem 0;
  overflow: hidden;
  border-radius: 1rem;
}

.sb87-carousel-slides {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
}

.sb87-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.sb87-carousel-slide.sb87-active {
  opacity: 1;
}

.sb87-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb87-carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.sb87-carousel-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sb87-carousel-dot.sb87-active {
  background-color: var(--primary-color);
  transform: scale(1.3);
}

/* Section Titles */
.sb87-section-title {
  font-size: 2.4rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 3rem 0 2rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.sb87-section-title span {
  color: var(--text-color);
}

/* Game Grid */
.sb87-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.sb87-game-card {
  background-color: #2a2a2a;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.sb87-game-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255, 170, 0, 0.2);
}

.sb87-game-image {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
}

.sb87-game-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sb87-game-card:hover .sb87-game-image img {
  transform: scale(1.1);
}

.sb87-game-name {
  padding: 0.8rem;
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content Module */
.sb87-module {
  background-color: #2a2a2a;
  border-radius: 1rem;
  padding: 2rem;
  margin: 2rem 0;
  border-left: 4px solid var(--primary-color);
}

.sb87-module h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.sb87-module p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.sb87-module ul {
  list-style: none;
  padding-left: 0;
}

.sb87-module li {
  padding: 0.8rem 0;
  color: var(--text-muted);
  padding-left: 2rem;
  position: relative;
}

.sb87-module li:before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 1.8rem;
}

/* Promo Links */
.sb87-promo-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.sb87-promo-link:hover {
  text-decoration: underline;
  color: #FF8800;
}

/* FAQ Section */
.sb87-faq-item {
  background-color: #2a2a2a;
  border-radius: 1rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.sb87-faq-question {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.6rem;
  user-select: none;
}

.sb87-faq-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.sb87-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #1a1a1a;
}

.sb87-faq-answer.sb87-active {
  max-height: 500px;
}

.sb87-faq-answer p {
  padding: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Footer */
.sb87-footer {
  background-color: #111;
  padding: 3rem 0;
  margin-top: 3rem;
  border-top: 2px solid var(--primary-color);
}

.sb87-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.sb87-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.4rem;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.sb87-footer-links a:hover {
  color: var(--primary-color);
}

.sb87-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.sb87-partner-logo {
  width: 6rem;
  height: 6rem;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.sb87-partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.sb87-copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* Mobile Bottom Navigation */
.sb87-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6.5rem;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.98), rgba(10, 10, 10, 0.98));
  border-top: 2px solid var(--primary-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.sb87-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 6rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 1rem;
  text-decoration: none;
  color: var(--text-muted);
}

.sb87-nav-item:hover {
  background-color: rgba(255, 170, 0, 0.1);
  transform: translateY(-2px);
}

.sb87-nav-item.sb87-active {
  color: var(--primary-color);
}

.sb87-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.3rem;
}

.sb87-nav-text {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .sb87-bottom-nav {
    display: none;
  }

  .sb87-menu-toggle {
    display: none;
  }

  main {
    padding-bottom: 2rem;
  }
}

/* Show menu toggle on mobile */
@media (max-width: 768px) {
  .sb87-menu-toggle {
    display: block;
  }
}

/* Responsive Adjustments */
@media (max-width: 380px) {
  .sb87-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sb87-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1.2rem;
  }
}

/* Loading Animation */
@keyframes sb87-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.sb87-loading {
  animation: sb87-pulse 1.5s ease-in-out infinite;
}

/* Scroll to Top Button */
.sb87-scroll-top {
  position: fixed;
  bottom: 8rem;
  right: 1.5rem;
  width: 5rem;
  height: 5rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 999;
}

.sb87-scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 170, 0, 0.5);
}

.sb87-scroll-top.sb87-visible {
  display: flex;
}

/* Utility Classes */
.sb87-text-center {
  text-align: center;
}

.sb87-mt-1 { margin-top: 1rem; }
.sb87-mt-2 { margin-top: 2rem; }
.sb87-mt-3 { margin-top: 3rem; }
.sb87-mb-1 { margin-bottom: 1rem; }
.sb87-mb-2 { margin-bottom: 2rem; }
.sb87-mb-3 { margin-bottom: 3rem; }

.sb87-hidden {
  display: none;
}
