/**
 * jili365 - Core Styles
 * All classes use w59fd- prefix for namespace isolation
 * Color palette: #8A2BE2, #F5F5F5, #FF9500, #9400D3, #1B263B
 */

/* CSS Variables */
:root {
  --w59fd-primary: #8A2BE2;
  --w59fd-secondary: #9400D3;
  --w59fd-accent: #FF9500;
  --w59fd-dark: #1B263B;
  --w59fd-light: #F5F5F5;
  --w59fd-white: #FFFFFF;
  --w59fd-gray: #6B7280;
  --w59fd-border: #E5E7EB;
  --w59fd-shadow: rgba(27, 38, 59, 0.15);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--w59fd-dark);
  background-color: var(--w59fd-light);
  overflow-x: hidden;
}

/* Container */
.w59fd-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.w59fd-wrapper {
  min-height: 100vh;
  padding-bottom: 80px;
}

/* Header Styles */
.w59fd-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--w59fd-primary) 0%, var(--w59fd-secondary) 100%);
  padding: 0.75rem 1rem;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--w59fd-shadow);
}

.w59fd-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.w59fd-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--w59fd-white);
}

.w59fd-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.w59fd-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--w59fd-white);
}

.w59fd-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.w59fd-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.w59fd-btn-primary {
  background-color: var(--w59fd-accent);
  color: var(--w59fd-white);
}

.w59fd-btn-primary:hover {
  background-color: #E68600;
  transform: translateY(-1px);
}

.w59fd-btn-secondary {
  background-color: var(--w59fd-white);
  color: var(--w59fd-primary);
}

.w59fd-btn-secondary:hover {
  background-color: var(--w59fd-light);
}

.w59fd-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--w59fd-white);
  cursor: pointer;
  font-size: 2rem;
}

/* Mobile Menu */
.w59fd-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: linear-gradient(135deg, var(--w59fd-dark) 0%, var(--w59fd-primary) 100%);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 5rem 2rem 2rem;
  overflow-y: auto;
}

.w59fd-mobile-menu.w59fd-menu-open {
  right: 0;
}

.w59fd-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--w59fd-white);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.w59fd-menu-list {
  list-style: none;
}

.w59fd-menu-item {
  margin-bottom: 0.5rem;
}

.w59fd-menu-link {
  display: block;
  padding: 1rem;
  color: var(--w59fd-white);
  text-decoration: none;
  font-size: 1.6rem;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.w59fd-menu-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.w59fd-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.w59fd-mobile-menu.w59fd-menu-open + .w59fd-menu-overlay {
  opacity: 1;
  visibility: visible;
}

/* Main Content */
.w59fd-main {
  padding-top: 60px;
}

.w59fd-section {
  padding: 2rem 0;
}

.w59fd-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--w59fd-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Carousel */
.w59fd-carousel {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 12px;
}

.w59fd-carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.w59fd-carousel-slide {
  min-width: 100%;
  display: none;
}

.w59fd-carousel-slide.w59fd-active {
  display: block;
}

.w59fd-carousel-image {
  width: 100%;
  height: auto;
  display: block;
}

.w59fd-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.w59fd-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.w59fd-carousel-dot.w59fd-active {
  background-color: var(--w59fd-accent);
  transform: scale(1.2);
}

/* Game Grid */
.w59fd-game-section {
  margin-bottom: 3rem;
}

.w59fd-category-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--w59fd-dark);
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--w59fd-primary) 0%, var(--w59fd-secondary) 100%);
  border-radius: 8px;
  color: var(--w59fd-white);
}

.w59fd-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.w59fd-game-item {
  background: var(--w59fd-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--w59fd-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.w59fd-game-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px var(--w59fd-shadow);
}

.w59fd-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.w59fd-game-name {
  padding: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--w59fd-dark);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Content Modules */
.w59fd-content-module {
  background: var(--w59fd-white);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px var(--w59fd-shadow);
}

.w59fd-module-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--w59fd-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.w59fd-module-content {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--w59fd-dark);
}

.w59fd-module-content p {
  margin-bottom: 1rem;
}

.w59fd-module-content a {
  color: var(--w59fd-primary);
  text-decoration: none;
  font-weight: 600;
}

.w59fd-module-content a:hover {
  color: var(--w59fd-accent);
  text-decoration: underline;
}

/* FAQ List */
.w59fd-faq-list {
  list-style: none;
}

.w59fd-faq-item {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--w59fd-light);
  border-radius: 8px;
  border-left: 4px solid var(--w59fd-primary);
}

.w59fd-faq-question {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--w59fd-primary);
  margin-bottom: 0.5rem;
}

.w59fd-faq-answer {
  font-size: 1.4rem;
  color: var(--w59fd-dark);
  line-height: 1.6;
}

/* Feature List */
.w59fd-feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.w59fd-feature-item {
  background: linear-gradient(135deg, var(--w59fd-light) 0%, #FFFFFF 100%);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.w59fd-feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.w59fd-feature-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--w59fd-primary);
}

/* Bottom Navigation */
.w59fd-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--w59fd-dark) 0%, var(--w59fd-primary) 100%);
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--w59fd-shadow);
}

.w59fd-bottom-nav-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.w59fd-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
}

.w59fd-nav-item:hover {
  color: var(--w59fd-white);
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.w59fd-nav-item.w59fd-active {
  color: var(--w59fd-accent);
}

.w59fd-nav-icon {
  font-size: 24px;
}

.w59fd-nav-text {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

/* Footer */
.w59fd-footer {
  background: linear-gradient(135deg, var(--w59fd-dark) 0%, var(--w59fd-primary) 100%);
  color: var(--w59fd-white);
  padding: 3rem 0 8rem;
  margin-top: 3rem;
}

.w59fd-footer-content {
  text-align: center;
  margin-bottom: 2rem;
}

.w59fd-footer-text {
  font-size: 1.4rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.w59fd-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.w59fd-footer-link {
  color: var(--w59fd-white);
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.w59fd-footer-link:hover {
  background-color: var(--w59fd-accent);
  transform: translateY(-2px);
}

.w59fd-partners {
  margin-top: 2rem;
}

.w59fd-partners-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.w59fd-partners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.w59fd-partner-logo {
  width: 60px;
  height: 40px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.w59fd-partner-logo:hover {
  opacity: 1;
}

.w59fd-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (min-width: 769px) {
  .w59fd-bottom-nav {
    display: none;
  }

  .w59fd-wrapper {
    padding-bottom: 2rem;
  }

  .w59fd-menu-toggle {
    display: none;
  }
}

/* Utility Classes */
.w59fd-text-center {
  text-align: center;
}

.w59fd-mt-1 {
  margin-top: 1rem;
}

.w59fd-mb-1 {
  margin-bottom: 1rem;
}

.w59fd-mb-2 {
  margin-bottom: 2rem;
}
