/**
 * WAGI777 CSS Theme
 * Mobile-first design with unique prefixes
 */

/* Root variables for consistent theming */
:root {
  --w77-primary: #FF9800;
  --w77-secondary: #DAA520;
  --w77-bg-dark: #0D1117;
  --w77-bg-light: #1a1d24;
  --w77-text: #FFFFFF;
  --w77-text-secondary: #B0B0B0;
  --w77-accent: #FFCC02;
  --w77-purple: #8470FF;
  --w77-success: #4CAF50;
  --w77-warning: #FFC107;
  --w77-error: #F44336;
  --w77-border: #333;
  --w77-shadow: rgba(0, 0, 0, 0.3);
  --w77-gradient: linear-gradient(135deg, #FF9800 0%, #DAA520 100%);
}

/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  background-color: var(--w77-bg-dark);
  color: var(--w77-text);
  overflow-x: hidden;
}

/* Container and layout */
.w77-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.w77-wrapper {
  min-height: 100vh;
  padding-bottom: 8rem;
}

/* Header */
.w77-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--w77-bg-light);
  border-bottom: 1px solid var(--w77-border);
  z-index: 1000;
  padding: 1rem 0;
}

.w77-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.w77-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--w77-text);
}

.w77-logo-icon {
  width: 2.4rem;
  height: 2.4rem;
  background: var(--w77-gradient);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.w77-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--w77-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.w77-header-actions {
  display: flex;
  gap: 1rem;
}

.w77-btn {
  padding: 0.8rem 1.6rem;
  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-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem;
  touch-action: manipulation;
}

.w77-btn-primary {
  background: var(--w77-gradient);
  color: var(--w77-text);
  box-shadow: 0 2px 8px var(--w77-shadow);
}

.w77-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--w77-shadow);
}

.w77-btn-secondary {
  background: transparent;
  color: var(--w77-text);
  border: 2px solid var(--w77-primary);
}

.w77-btn-secondary:hover {
  background: var(--w77-primary);
  color: var(--w77-bg-dark);
}

.w77-menu-toggle {
  background: none;
  border: none;
  color: var(--w77-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
}

/* Mobile menu */
.w77-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--w77-bg-light);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

.w77-mobile-menu.active {
  right: 0;
}

.w77-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.w77-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.w77-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--w77-text);
  font-size: 2.4rem;
  cursor: pointer;
  width: 4.4rem;
  height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.w77-menu-list {
  list-style: none;
  margin-top: 4rem;
}

.w77-menu-item {
  margin-bottom: 1rem;
}

.w77-menu-link {
  display: block;
  padding: 1.2rem;
  color: var(--w77-text);
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.w77-menu-link:hover {
  background: var(--w77-bg-dark);
  color: var(--w77-primary);
}

/* Main content */
.w77-main {
  padding-top: 7rem;
  min-height: 100vh;
}

/* Carousel */
.w77-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px var(--w77-shadow);
}

.w77-carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.w77-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}

.w77-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.w77-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.w77-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.w77-dot.active {
  background: var(--w77-primary);
  width: 2rem;
  border-radius: 0.4rem;
}

/* Game grid */
.w77-game-section {
  margin-bottom: 3rem;
}

.w77-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.w77-section-title::before {
  content: '';
  width: 0.4rem;
  height: 2rem;
  background: var(--w77-gradient);
  border-radius: 0.2rem;
}

.w77-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.w77-game-item {
  background: var(--w77-bg-light);
  border-radius: 0.8rem;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.w77-game-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--w77-shadow);
}

.w77-game-image {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  background: var(--w77-gradient);
}

.w77-game-name {
  padding: 0.8rem 0.5rem;
  font-size: 1.2rem;
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content modules */
.w77-content-module {
  background: var(--w77-bg-light);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px var(--w77-shadow);
}

.w77-module-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--w77-primary);
}

.w77-module-content {
  line-height: 1.7;
}

.w77-module-content p {
  margin-bottom: 1rem;
}

.w77-highlight {
  color: var(--w77-accent);
  font-weight: 600;
}

/* Bottom navigation */
.w77-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--w77-bg-light);
  border-top: 1px solid var(--w77-border);
  z-index: 1000;
  padding: 0.5rem 0;
  display: none;
}

.w77-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
}

.w77-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 6rem;
  padding: 0.5rem;
  text-decoration: none;
  color: var(--w77-text-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.w77-bottom-nav-item:hover,
.w77-bottom-nav-item.active {
  color: var(--w77-primary);
  transform: scale(1.1);
}

.w77-bottom-nav-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.w77-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.w77-footer {
  background: var(--w77-bg-light);
  border-top: 1px solid var(--w77-border);
  padding: 3rem 0 8rem;
  margin-top: 3rem;
}

.w77-footer-content {
  margin-bottom: 2rem;
}

.w77-footer-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--w77-primary);
}

.w77-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.w77-footer-link {
  color: var(--w77-text-secondary);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.w77-footer-link:hover {
  color: var(--w77-primary);
}

.w77-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.w77-partner-icon {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.w77-partner-icon:hover {
  opacity: 1;
}

.w77-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--w77-text-secondary);
  margin-top: 2rem;
}

/* FAQ accordion */
.w77-faq-item {
  border-bottom: 1px solid var(--w77-border);
  margin-bottom: 1rem;
}

.w77-faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  cursor: pointer;
  font-weight: 600;
  transition: color 0.3s ease;
}

.w77-faq-question:hover {
  color: var(--w77-primary);
}

.w77-faq-question.active {
  color: var(--w77-primary);
}

.w77-faq-icon {
  font-size: 2rem;
  font-weight: 400;
  transition: transform 0.3s ease;
}

.w77-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 2rem;
  color: var(--w77-text-secondary);
  line-height: 1.6;
}

.w77-faq-answer.active {
  max-height: 20rem;
  padding-bottom: 1.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .w77-bottom-nav {
    display: block;
  }

  .w77-main {
    padding-bottom: 8rem;
  }

  .w77-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }

  .w77-game-image {
    height: 6rem;
  }

  .w77-game-name {
    font-size: 1rem;
    padding: 0.6rem 0.3rem;
  }
}

@media (max-width: 480px) {
  .w77-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .w77-header-actions .w77-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1.2rem;
  }
}

/* Utility classes */
.w77-text-center {
  text-align: center;
}

.w77-text-primary {
  color: var(--w77-primary);
}

.w77-text-secondary {
  color: var(--w77-text-secondary);
}

.w77-mb-1 {
  margin-bottom: 1rem;
}

.w77-mb-2 {
  margin-bottom: 2rem;
}

.w77-mb-3 {
  margin-bottom: 3rem;
}

.w77-hidden {
  display: none;
}

.w77-flex {
  display: flex;
}

.w77-grid {
  display: grid;
}

.w77-gap-1 {
  gap: 1rem;
}

.w77-gap-2 {
  gap: 2rem;
}