/* 666jili Style Sheet - Mobile First Design */
/* All classes use prefix 'w4039-' to avoid conflicts */

/* === CSS Variables === */
:root {
  --w4039-primary: #212F3D;
  --w4039-secondary: #BC8F8F;
  --w4039-accent: #D2691E;
  --w4039-light: #E0FFFF;
  --w4039-dark: #1A252F;
  --w4039-text: #E0FFFF;
  --w4039-text-dark: #212F3D;
  --w4039-border: rgba(224, 255, 255, 0.2);
  --w4039-shadow: rgba(0, 0, 0, 0.3);
  --w4039-overlay: rgba(33, 47, 61, 0.95);
  font-size: 62.5%;
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--w4039-text);
  background: var(--w4039-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--w4039-accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--w4039-secondary);
  text-decoration: underline;
}

/* === Container === */
.w4039-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.w4039-wrapper {
  width: 100%;
  padding: 1.5rem;
}

/* === Header === */
.w4039-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--w4039-dark);
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px var(--w4039-shadow);
  z-index: 1000;
}

.w4039-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 430px;
  margin: 0 auto;
}

.w4039-logo-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.w4039-logo {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.w4039-site-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--w4039-accent);
  text-shadow: 1px 1px 2px var(--w4039-shadow);
}

.w4039-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.w4039-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 44px;
}

.w4039-btn-primary {
  background: linear-gradient(135deg, var(--w4039-accent), var(--w4039-secondary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(210, 105, 30, 0.3);
}

.w4039-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(210, 105, 30, 0.4);
}

.w4039-btn-secondary {
  background: rgba(188, 143, 143, 0.2);
  color: var(--w4039-secondary);
  border: 1px solid var(--w4039-secondary);
}

.w4039-btn-secondary:hover {
  background: var(--w4039-secondary);
  color: #fff;
}

.w4039-menu-toggle {
  background: transparent;
  border: none;
  color: var(--w4039-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

/* === Mobile Menu === */
.w4039-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.w4039-menu-overlay.w4039-active {
  opacity: 1;
  visibility: visible;
}

.w4039-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  bottom: 0;
  width: 280px;
  background: var(--w4039-overlay);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 2rem;
}

.w4039-mobile-menu.w4039-active {
  right: 0;
}

.w4039-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--w4039-border);
}

.w4039-menu-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--w4039-accent);
}

.w4039-menu-close {
  background: transparent;
  border: none;
  color: var(--w4039-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
}

.w4039-mobile-nav-link {
  display: block;
  padding: 1.2rem 0;
  color: var(--w4039-text);
  font-size: 1.5rem;
  border-bottom: 1px solid var(--w4039-border);
  transition: all 0.3s ease;
}

.w4039-mobile-nav-link:hover,
.w4039-mobile-nav-link.w4039-active {
  color: var(--w4039-accent);
  padding-left: 1rem;
  text-decoration: none;
}

/* === Main Content === */
.w4039-main {
  margin-top: 60px;
  padding-bottom: 80px;
  min-height: calc(100vh - 140px);
}

/* === Slider === */
.w4039-slider {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 4px 16px var(--w4039-shadow);
}

.w4039-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.w4039-slider-track {
  display: flex;
  transition: transform 0.5s ease;
}

.w4039-slide {
  min-width: 100%;
  cursor: pointer;
}

.w4039-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.w4039-slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.w4039-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.w4039-slider-dot.w4039-active {
  background: var(--w4039-accent);
  width: 24px;
  border-radius: 5px;
}

/* === Section === */
.w4039-section {
  margin: 3rem 0;
}

.w4039-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--w4039-accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--w4039-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.w4039-section-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--w4039-secondary);
  margin: 2rem 0 1rem;
}

/* === Game Grid === */
.w4039-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.w4039-game-item {
  background: rgba(188, 143, 143, 0.1);
  border-radius: 8px;
  padding: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--w4039-border);
}

.w4039-game-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(210, 105, 30, 0.3);
  border-color: var(--w4039-accent);
}

.w4039-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.w4039-game-name {
  font-size: 1.1rem;
  color: var(--w4039-text);
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* === Card === */
.w4039-card {
  background: rgba(26, 37, 47, 0.6);
  border-radius: 12px;
  padding: 2rem;
  margin: 1.5rem 0;
  border: 1px solid var(--w4039-border);
  box-shadow: 0 4px 12px var(--w4039-shadow);
}

.w4039-card-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--w4039-accent);
  margin-bottom: 1rem;
}

.w4039-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--w4039-text);
}

/* === List === */
.w4039-list {
  list-style: none;
  padding: 0;
}

.w4039-list-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--w4039-border);
  font-size: 1.4rem;
  line-height: 1.6;
}

.w4039-list-item:last-child {
  border-bottom: none;
}

.w4039-list-item::before {
  content: "▸ ";
  color: var(--w4039-accent);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* === Bottom Navigation === */
.w4039-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--w4039-dark) 0%, var(--w4039-primary) 100%);
  box-shadow: 0 -2px 12px var(--w4039-shadow);
  z-index: 1000;
  border-top: 1px solid var(--w4039-border);
}

.w4039-bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
  padding: 0.8rem 0;
  height: 64px;
}

.w4039-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  color: var(--w4039-text);
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.5rem;
}

.w4039-bottom-nav-item:hover,
.w4039-bottom-nav-item.w4039-active {
  color: var(--w4039-accent);
  background: rgba(210, 105, 30, 0.15);
  transform: scale(1.05);
}

.w4039-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
  transition: all 0.3s ease;
}

.w4039-bottom-nav-item:hover .w4039-bottom-nav-icon {
  transform: translateY(-2px);
}

.w4039-bottom-nav-label {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === Footer === */
.w4039-footer {
  background: var(--w4039-dark);
  padding: 3rem 1.5rem 10rem;
  margin-top: 4rem;
  border-top: 2px solid var(--w4039-accent);
}

.w4039-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.w4039-footer-link {
  color: var(--w4039-secondary);
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.w4039-footer-link:hover {
  background: rgba(188, 143, 143, 0.2);
  color: var(--w4039-accent);
  text-decoration: none;
}

.w4039-partners {
  margin: 2rem 0;
  text-align: center;
}

.w4039-partners-title {
  font-size: 1.6rem;
  color: var(--w4039-secondary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.w4039-partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  max-width: 350px;
  margin: 0 auto;
}

.w4039-partner-logo {
  width: 100%;
  height: auto;
  opacity: 0.7;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.w4039-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.w4039-copyright {
  text-align: center;
  color: var(--w4039-text);
  font-size: 1.2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--w4039-border);
  opacity: 0.8;
}

/* === Accordion === */
.w4039-accordion-item {
  margin-bottom: 1rem;
  border: 1px solid var(--w4039-border);
  border-radius: 8px;
  overflow: hidden;
}

.w4039-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: rgba(188, 143, 143, 0.1);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--w4039-text);
  transition: all 0.3s ease;
}

.w4039-accordion-header:hover {
  background: rgba(210, 105, 30, 0.2);
  color: var(--w4039-accent);
}

.w4039-accordion-icon {
  font-size: 2rem;
  font-weight: 700;
  color: var(--w4039-accent);
}

.w4039-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.5rem;
  background: rgba(26, 37, 47, 0.4);
}

.w4039-accordion-content.w4039-active {
  padding: 1.5rem;
}

/* === Desktop Responsive === */
@media (min-width: 769px) {
  .w4039-bottom-nav {
    display: none;
  }

  .w4039-main {
    padding-bottom: 2rem;
  }

  .w4039-footer {
    padding-bottom: 3rem;
  }
}

/* === Mobile Specific === */
@media (max-width: 768px) {
  .w4039-main {
    padding-bottom: 80px;
  }

  .w4039-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 360px) {
  .w4039-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .w4039-partners-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === Game Detail Page Styles === */
.w4039-game-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(26, 37, 47, 0.6);
  border-radius: 12px;
  border: 1px solid var(--w4039-border);
}

.w4039-game-icon-large {
  cursor: pointer;
  transition: all 0.3s ease;
  width: 120px;
  height: 120px;
}

.w4039-game-icon-large:hover {
  transform: scale(1.1);
}

.w4039-game-icon-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(210, 105, 30, 0.3);
}

.w4039-game-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--w4039-accent);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.w4039-game-description {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--w4039-text);
  margin-bottom: 2rem;
}

.w4039-game-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
}

.w4039-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.w4039-stat-label {
  font-size: 1.2rem;
  color: var(--w4039-secondary);
  font-weight: 500;
}

.w4039-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--w4039-accent);
}

.w4039-game-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.w4039-btn-large {
  padding: 1.2rem 2rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Game info card */
.w4039-game-info {
  max-width: 600px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .w4039-game-hero {
    padding: 1.5rem;
  }

  .w4039-game-icon-large {
    width: 100px;
    height: 100px;
  }

  .w4039-game-title {
    font-size: 2rem;
  }

  .w4039-game-description {
    font-size: 1.4rem;
  }

  .w4039-game-stats {
    gap: 1.5rem;
  }

  .w4039-game-actions {
    flex-direction: column;
    align-items: center;
  }

  .w4039-btn-large {
    width: 100%;
    justify-content: center;
  }
}
