/**
 * JiliBB Gaming Platform - Design System
 * All classes use w931f- prefix for namespace isolation
 * Color scheme: #00FA9A (spring green), #3C3C3C (dark gray), #F8F8FF (ghost white), #778899 (slate gray), #0C0C0C (deep black)
 */

/* ==================== CSS Variables ==================== */
:root {
  --w931f-primary: #00FA9A;
  --w931f-primary-dark: #00D87D;
  --w931f-primary-light: #33FBAA;
  --w931f-dark: #0C0C0C;
  --w931f-dark-gray: #3C3C3C;
  --w931f-gray: #778899;
  --w931f-light: #F8F8FF;
  --w931f-white: #FFFFFF;
  --w931f-bg: #1A1A1A;
  --w931f-bg-light: #2A2A2A;
  --w931f-shadow: rgba(0, 250, 154, 0.2);
  --w931f-shadow-dark: rgba(0, 0, 0, 0.5);
  --w931f-transition: all 0.3s ease;
  --w931f-border-radius: 8px;
  --w931f-header-height: 64px;
  --w931f-bottom-nav-height: 60px;
}

/* ==================== Base Styles ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--w931f-light);
  background-color: var(--w931f-bg);
  overflow-x: hidden;
}

a {
  color: var(--w931f-primary);
  text-decoration: none;
  transition: var(--w931f-transition);
}

a:hover {
  color: var(--w931f-primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==================== Header ==================== */
.w931f-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--w931f-header-height);
  background: linear-gradient(135deg, var(--w931f-dark) 0%, var(--w931f-dark-gray) 100%);
  box-shadow: 0 2px 10px var(--w931f-shadow-dark);
  z-index: 1000;
  transition: var(--w931f-transition);
}

.w931f-header-scrolled {
  background: rgba(12, 12, 12, 0.95);
  backdrop-filter: blur(10px);
}

.w931f-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.w931f-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.w931f-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.w931f-site-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--w931f-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.w931f-header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.w931f-btn {
  padding: 1rem 2rem;
  border-radius: var(--w931f-border-radius);
  font-size: 1.4rem;
  font-weight: 600;
  transition: var(--w931f-transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.w931f-btn-primary {
  background: linear-gradient(135deg, var(--w931f-primary) 0%, var(--w931f-primary-dark) 100%);
  color: var(--w931f-dark);
  box-shadow: 0 4px 15px var(--w931f-shadow);
}

.w931f-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--w931f-shadow);
}

.w931f-btn-outline {
  border: 2px solid var(--w931f-primary);
  color: var(--w931f-primary);
}

.w931f-btn-outline:hover {
  background: var(--w931f-primary);
  color: var(--w931f-dark);
}

.w931f-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  height: 30px;
  justify-content: center;
  cursor: pointer;
}

.w931f-menu-line {
  width: 100%;
  height: 3px;
  background: var(--w931f-primary);
  border-radius: 2px;
  transition: var(--w931f-transition);
}

.w931f-menu-btn-active .w931f-menu-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.w931f-menu-btn-active .w931f-menu-line:nth-child(2) {
  opacity: 0;
}

.w931f-menu-btn-active .w931f-menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ==================== Mobile Menu ==================== */
.w931f-mobile-menu {
  position: fixed;
  top: var(--w931f-header-height);
  left: -100%;
  width: 280px;
  height: calc(100vh - var(--w931f-header-height));
  background: linear-gradient(180deg, var(--w931f-dark-gray) 0%, var(--w931f-dark) 100%);
  box-shadow: 2px 0 20px var(--w931f-shadow-dark);
  transition: var(--w931f-transition);
  z-index: 9999;
  overflow-y: auto;
}

.w931f-menu-active {
  left: 0;
}

.w931f-mobile-nav {
  padding: 2rem 0;
}

.w931f-nav-link {
  display: block;
  padding: 1.5rem 2rem;
  color: var(--w931f-light);
  font-size: 1.6rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--w931f-transition);
}

.w931f-nav-link:hover,
.w931f-nav-active {
  background: rgba(0, 250, 154, 0.1);
  border-left-color: var(--w931f-primary);
  color: var(--w931f-primary);
}

/* ==================== Main Content ==================== */
.w931f-main {
  margin-top: var(--w931f-header-height);
  min-height: calc(100vh - var(--w931f-header-height));
  padding-bottom: var(--w931f-bottom-nav-height);
}

.w931f-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.w931f-section {
  padding: 4rem 0;
}

.w931f-section-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--w931f-primary);
  position: relative;
  padding-bottom: 1.5rem;
}

.w931f-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--w931f-primary), transparent);
  border-radius: 2px;
}

/* ==================== Carousel ==================== */
.w931f-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--w931f-border-radius);
  margin-bottom: 3rem;
}

.w931f-carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.w931f-carousel-slide {
  min-width: 100%;
  cursor: pointer;
  position: relative;
}

.w931f-carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--w931f-border-radius);
}

.w931f-carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.w931f-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--w931f-transition);
}

.w931f-carousel-dot-active,
.w931f-carousel-dot:hover {
  background: var(--w931f-primary);
  transform: scale(1.2);
}

/* ==================== Game Grid ==================== */
.w931f-game-category {
  margin-bottom: 4rem;
}

.w931f-category-title {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--w931f-primary);
  text-transform: capitalize;
}

.w931f-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1.5rem;
}

.w931f-game-card {
  background: var(--w931f-bg-light);
  border-radius: var(--w931f-border-radius);
  padding: 1rem;
  transition: var(--w931f-transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.w931f-game-card:hover {
  transform: translateY(-5px);
  border-color: var(--w931f-primary);
  box-shadow: 0 10px 25px var(--w931f-shadow);
}

.w931f-game-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.w931f-game-name {
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  color: var(--w931f-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== Content Sections ==================== */
.w931f-content-box {
  background: var(--w931f-bg-light);
  border-radius: var(--w931f-border-radius);
  padding: 3rem;
  margin-bottom: 3rem;
  border-left: 4px solid var(--w931f-primary);
}

.w931f-content-title {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--w931f-primary);
}

.w931f-content-text {
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--w931f-gray);
  margin-bottom: 1.5rem;
}

.w931f-feature-list {
  list-style: none;
  margin: 2rem 0;
}

.w931f-feature-item {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--w931f-dark);
  border-radius: 6px;
  border-left: 3px solid var(--w931f-primary);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.w931f-feature-icon {
  font-size: 2.4rem;
  color: var(--w931f-primary);
}

.w931f-feature-text {
  font-size: 1.5rem;
  color: var(--w931f-light);
}

/* ==================== FAQ Accordion ==================== */
.w931f-faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.w931f-faq-item {
  background: var(--w931f-bg-light);
  border-radius: var(--w931f-border-radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.w931f-faq-question {
  padding: 2rem;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--w931f-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--w931f-transition);
}

.w931f-faq-question:hover {
  background: rgba(0, 250, 154, 0.1);
}

.w931f-faq-icon {
  font-size: 2rem;
  transition: var(--w931f-transition);
}

.w931f-faq-active .w931f-faq-icon {
  transform: rotate(180deg);
}

.w931f-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.w931f-faq-active .w931f-faq-answer {
  max-height: 1000px;
}

.w931f-faq-answer-content {
  padding: 0 2rem 2rem 2rem;
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--w931f-gray);
}

/* ==================== Bottom Navigation ==================== */
.w931f-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--w931f-bottom-nav-height);
  background: linear-gradient(135deg, var(--w931f-dark) 0%, var(--w931f-dark-gray) 100%);
  box-shadow: 0 -2px 10px var(--w931f-shadow-dark);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 1rem;
}

.w931f-bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  color: var(--w931f-gray);
  transition: var(--w931f-transition);
  text-align: center;
}

.w931f-bottom-nav-link:hover,
.w931f-bottom-nav-link.w931f-nav-active {
  color: var(--w931f-primary);
  transform: translateY(-3px);
}

.w931f-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
}

.w931f-nav-text {
  font-size: 1.1rem;
  font-weight: 500;
}

/* ==================== Footer ==================== */
.w931f-footer {
  background: var(--w931f-dark);
  padding: 4rem 0 calc(var(--w931f-bottom-nav-height) + 2rem) 0;
  border-top: 2px solid var(--w931f-primary);
}

.w931f-footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.w931f-footer-section {
  text-align: center;
}

.w931f-footer-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--w931f-primary);
}

.w931f-footer-links {
  list-style: none;
}

.w931f-footer-link {
  display: inline-block;
  margin: 0.5rem 1rem;
  font-size: 1.4rem;
  color: var(--w931f-gray);
  transition: var(--w931f-transition);
}

.w931f-footer-link:hover {
  color: var(--w931f-primary);
}

.w931f-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
}

.w931f-partner-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--w931f-transition);
}

.w931f-partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.w931f-copyright {
  text-align: center;
  font-size: 1.4rem;
  color: var(--w931f-gray);
  padding-top: 2rem;
  border-top: 1px solid var(--w931f-dark-gray);
}

/* ==================== Utility Classes ==================== */
.w931f-text-center {
  text-align: center;
}

.w931f-text-primary {
  color: var(--w931f-primary);
}

.w931f-mt-1 { margin-top: 1rem; }
.w931f-mt-2 { margin-top: 2rem; }
.w931f-mt-3 { margin-top: 3rem; }
.w931f-mb-1 { margin-bottom: 1rem; }
.w931f-mb-2 { margin-bottom: 2rem; }
.w931f-mb-3 { margin-bottom: 3rem; }

.w931f-toast {
  position: fixed;
  bottom: calc(var(--w931f-bottom-nav-height) + 2rem);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--w931f-primary);
  color: var(--w931f-dark);
  padding: 1.5rem 3rem;
  border-radius: var(--w931f-border-radius);
  font-weight: 600;
  box-shadow: 0 5px 20px var(--w931f-shadow);
  z-index: 10000;
  opacity: 0;
  transition: var(--w931f-transition);
}

.w931f-toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==================== Responsive Design ==================== */
@media (min-width: 769px) {
  .w931f-bottom-nav {
    display: none;
  }

  .w931f-main {
    padding-bottom: 0;
  }

  .w931f-footer {
    padding-bottom: 2rem;
  }

  .w931f-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .w931f-footer-content {
    grid-template-columns: repeat(3, 1fr);
    text-align: left;
  }

  .w931f-footer-section {
    text-align: left;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 58%;
  }

  .w931f-header-actions .w931f-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
  }

  .w931f-section {
    padding: 3rem 0;
  }

  .w931f-section-title {
    font-size: 2.2rem;
  }

  .w931f-content-box {
    padding: 2rem;
  }

  .w931f-main {
    padding-bottom: calc(var(--w931f-bottom-nav-height) + 2rem);
  }
}

@media (max-width: 430px) {
  .w931f-container {
    padding: 0 1.5rem;
  }

  .w931f-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
  }

  .w931f-site-name {
    font-size: 1.6rem;
  }
}
