/**
 * WK777 Layout Stylesheet - Mobile-First Design
 * All classes use g8ae- prefix for namespace isolation
 * Optimized for Philippine gaming market with warm tan/salmon palette
 */

/* CSS Variables - Color Palette */
:root {
  --g8ae-tan: #D2B48C;
  --g8ae-salmon: #FA8072;
  --g8ae-dark: #2C3E50;
  --g8ae-white: #FFFFFF;
  --g8ae-green: #7CFC00;
  --g8ae-dark-bg: #1a252f;
  --g8ae-card-bg: #34495e;
  --g8ae-overlay: rgba(44, 62, 80, 0.95);
  --g8ae-shadow: rgba(0, 0, 0, 0.3);
  --g8ae-shadow-lg: rgba(0, 0, 0, 0.5);
}

/* Global Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--g8ae-dark-bg) 0%, var(--g8ae-dark) 100%);
  color: var(--g8ae-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.g8ae-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, var(--g8ae-dark) 0%, var(--g8ae-card-bg) 100%);
  box-shadow: 0 2px 10px var(--g8ae-shadow);
  z-index: 1000;
  transition: all 0.3s ease;
}

.g8ae-header-scrolled {
  box-shadow: 0 4px 20px var(--g8ae-shadow-lg);
  background: var(--g8ae-overlay);
}

.g8ae-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.g8ae-logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--g8ae-tan);
  text-decoration: none;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px var(--g8ae-shadow);
  transition: all 0.3s ease;
}

.g8ae-logo:hover {
  color: var(--g8ae-salmon);
  transform: scale(1.05);
}

.g8ae-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.g8ae-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.g8ae-btn-primary {
  background: linear-gradient(135deg, var(--g8ae-salmon) 0%, #ff6b58 100%);
  color: var(--g8ae-white);
  box-shadow: 0 4px 15px rgba(250, 128, 114, 0.3);
}

.g8ae-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(250, 128, 114, 0.5);
}

.g8ae-btn-secondary {
  background: linear-gradient(135deg, var(--g8ae-tan) 0%, #c4a678 100%);
  color: var(--g8ae-dark);
  box-shadow: 0 4px 15px rgba(210, 180, 140, 0.3);
}

.g8ae-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(210, 180, 140, 0.5);
}

.g8ae-menu-icon {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.g8ae-menu-icon span {
  width: 25px;
  height: 3px;
  background: var(--g8ae-tan);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.g8ae-menu-icon.g8ae-active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.g8ae-menu-icon.g8ae-active span:nth-child(2) {
  opacity: 0;
}

.g8ae-menu-icon.g8ae-active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Menu */
.g8ae-mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--g8ae-overlay);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 9999;
  padding: 20px;
}

.g8ae-mobile-menu.g8ae-active {
  transform: translateX(0);
}

.g8ae-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.g8ae-mobile-nav a {
  display: block;
  padding: 15px 20px;
  background: var(--g8ae-card-bg);
  color: var(--g8ae-white);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.g8ae-mobile-nav a:hover {
  background: var(--g8ae-salmon);
  transform: translateX(10px);
}

/* Desktop Navigation */
.g8ae-desktop-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.g8ae-desktop-nav a {
  color: var(--g8ae-white);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s ease;
  position: relative;
  padding: 5px 0;
}

.g8ae-desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--g8ae-salmon);
  transition: width 0.3s ease;
}

.g8ae-desktop-nav a:hover {
  color: var(--g8ae-tan);
}

.g8ae-desktop-nav a:hover::after {
  width: 100%;
}

/* Main Content */
.g8ae-main {
  padding-top: 60px;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* Carousel Styles */
.g8ae-carousel-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 8px 30px var(--g8ae-shadow-lg);
}

.g8ae-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.g8ae-carousel-slide {
  min-width: 100%;
  position: relative;
}

.g8ae-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.g8ae-carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.g8ae-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.g8ae-carousel-dot.g8ae-active {
  background: var(--g8ae-salmon);
  border-color: var(--g8ae-white);
  transform: scale(1.3);
}

/* Section Styles */
.g8ae-section {
  padding: 40px 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.g8ae-section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--g8ae-tan);
  margin-bottom: 25px;
  text-align: center;
  text-shadow: 2px 2px 4px var(--g8ae-shadow);
  position: relative;
  padding-bottom: 15px;
}

.g8ae-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--g8ae-salmon), var(--g8ae-tan));
  border-radius: 2px;
}

/* Category Tabs */
.g8ae-category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 20px 15px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.g8ae-category-tabs::-webkit-scrollbar {
  display: none;
}

.g8ae-category-tab {
  padding: 10px 20px;
  background: var(--g8ae-card-bg);
  color: var(--g8ae-white);
  border: 2px solid transparent;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.g8ae-category-tab:hover {
  background: var(--g8ae-salmon);
  transform: translateY(-2px);
}

.g8ae-category-tab.g8ae-active {
  background: linear-gradient(135deg, var(--g8ae-tan), var(--g8ae-salmon));
  border-color: var(--g8ae-green);
  color: var(--g8ae-dark);
}

/* Game Grid */
.g8ae-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 0 15px;
}

.g8ae-game-card {
  background: var(--g8ae-card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--g8ae-shadow);
}

.g8ae-game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(250, 128, 114, 0.4);
}

.g8ae-game-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.g8ae-game-card:hover .g8ae-game-image {
  transform: scale(1.1);
}

.g8ae-game-info {
  padding: 12px;
  text-align: center;
}

.g8ae-game-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--g8ae-white);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g8ae-game-badge {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--g8ae-green), #6dd500);
  color: var(--g8ae-dark);
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  text-transform: uppercase;
}

/* Features Section */
.g8ae-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  padding: 0 15px;
}

.g8ae-feature-card {
  background: linear-gradient(135deg, var(--g8ae-card-bg), var(--g8ae-dark));
  padding: 30px 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 6px 20px var(--g8ae-shadow);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.g8ae-feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--g8ae-salmon);
  box-shadow: 0 10px 30px rgba(250, 128, 114, 0.3);
}

.g8ae-feature-icon {
  font-size: 48px;
  color: var(--g8ae-tan);
  margin-bottom: 15px;
}

.g8ae-feature-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--g8ae-salmon);
  margin-bottom: 10px;
}

.g8ae-feature-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

/* Partners Section */
.g8ae-partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  padding: 0 15px;
}

.g8ae-partner-card {
  background: var(--g8ae-white);
  padding: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--g8ae-shadow);
}

.g8ae-partner-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(210, 180, 140, 0.4);
}

.g8ae-partner-logo {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
}

/* Footer Styles */
.g8ae-footer {
  background: linear-gradient(135deg, var(--g8ae-dark-bg), #0f1419);
  padding: 40px 15px 20px;
  margin-top: 60px;
}

.g8ae-footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.g8ae-footer-section h3 {
  color: var(--g8ae-tan);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 700;
}

.g8ae-footer-links {
  list-style: none;
}

.g8ae-footer-links li {
  margin-bottom: 10px;
}

.g8ae-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
}

.g8ae-footer-links a:hover {
  color: var(--g8ae-salmon);
}

.g8ae-footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

/* Bottom Navigation (Mobile) */
.g8ae-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, var(--g8ae-dark), var(--g8ae-card-bg));
  box-shadow: 0 -2px 10px var(--g8ae-shadow);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
}

.g8ae-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  min-width: 60px;
  text-decoration: none;
}

.g8ae-bottom-nav-item:hover {
  background: rgba(250, 128, 114, 0.2);
  transform: translateY(-2px);
}

.g8ae-bottom-nav-icon {
  font-size: 22px;
  color: var(--g8ae-tan);
  transition: all 0.3s ease;
}

.g8ae-bottom-nav-item:hover .g8ae-bottom-nav-icon {
  color: var(--g8ae-salmon);
  transform: scale(1.1);
}

.g8ae-bottom-nav-label {
  font-size: 11px;
  color: var(--g8ae-white);
  font-weight: 600;
}

/* FAQ Styles */
.g8ae-faq-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
}

.g8ae-faq-item {
  background: var(--g8ae-card-bg);
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--g8ae-shadow);
  transition: all 0.3s ease;
}

.g8ae-faq-question {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--g8ae-tan);
  transition: all 0.3s ease;
}

.g8ae-faq-question:hover {
  background: rgba(250, 128, 114, 0.1);
}

.g8ae-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  color: rgba(255, 255, 255, 0.8);
}

.g8ae-faq-item.g8ae-active .g8ae-faq-answer {
  max-height: 500px;
  padding: 0 20px 20px;
}

.g8ae-faq-icon {
  transition: transform 0.3s ease;
  font-size: 20px;
}

.g8ae-faq-item.g8ae-active .g8ae-faq-icon {
  transform: rotate(180deg);
}

/* Back to Top Button */
.g8ae-back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--g8ae-salmon), var(--g8ae-tan));
  color: var(--g8ae-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px var(--g8ae-shadow);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.g8ae-back-to-top.g8ae-visible {
  opacity: 1;
  visibility: visible;
}

.g8ae-back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(250, 128, 114, 0.5);
}

/* Utility Classes */
.g8ae-fade-in {
  animation: g8aeFadeIn 0.5s ease;
}

@keyframes g8aeFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.g8ae-text-center {
  text-align: center;
}

.g8ae-mt-20 {
  margin-top: 20px;
}

.g8ae-mb-20 {
  margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .g8ae-menu-icon {
    display: flex;
  }

  .g8ae-desktop-nav {
    display: none;
  }

  .g8ae-bottom-nav {
    display: flex;
  }

  .g8ae-main {
    padding-bottom: 80px;
  }

  .g8ae-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }

  .g8ae-section-title {
    font-size: 24px;
  }

  .g8ae-carousel-container {
    border-radius: 0;
    margin: 0;
  }
}

@media (min-width: 769px) {
  .g8ae-bottom-nav {
    display: none;
  }

  .g8ae-mobile-menu {
    display: none !important;
  }

  .g8ae-desktop-nav {
    display: flex;
  }

  .g8ae-main {
    padding-bottom: 40px;
  }

  .g8ae-back-to-top {
    bottom: 30px;
  }
}

@media (max-width: 430px) {
  .g8ae-header {
    height: 55px;
  }

  .g8ae-logo {
    font-size: 22px;
  }

  .g8ae-btn {
    padding: 6px 14px;
    font-size: 13px;
  }

  .g8ae-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .g8ae-game-image {
    height: 120px;
  }

  .g8ae-section-title {
    font-size: 20px;
  }
}
