/**
 * JL7777 Main Stylesheet
 * All classes use ui5e- prefix for namespace isolation
 * Mobile-first responsive design
 */

/* CSS Variables */
:root {
  --ui5e-primary: #FF5722;
  --ui5e-secondary: #C9C9FF;
  --ui5e-dark: #2D2D2D;
  --ui5e-darker: #1a1a1a;
  --ui5e-light: #f5f5f5;
  --ui5e-white: #ffffff;
  --ui5e-gray: #666666;
  --ui5e-border: #404040;
  --ui5e-gradient: linear-gradient(135deg, #FF5722 0%, #FF8A65 100%);
  --ui5e-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
  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, Oxygen, Ubuntu, sans-serif;
  font-size: 1.4rem;
  line-height: 1.6;
  background-color: var(--ui5e-dark);
  color: var(--ui5e-light);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.ui5e-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.ui5e-wrapper {
  padding-top: 60px;
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .ui5e-wrapper {
    padding-bottom: 0;
  }
}

/* Header */
.ui5e-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: var(--ui5e-darker);
  border-bottom: 1px solid var(--ui5e-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.ui5e-header-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ui5e-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.ui5e-site-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ui5e-primary);
  text-decoration: none;
}

.ui5e-header-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ui5e-btn {
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.ui5e-btn-primary {
  background: var(--ui5e-gradient);
  color: var(--ui5e-white);
  box-shadow: var(--ui5e-shadow);
}

.ui5e-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.4);
}

.ui5e-btn-secondary {
  background: transparent;
  color: var(--ui5e-secondary);
  border: 1px solid var(--ui5e-secondary);
}

.ui5e-btn-secondary:hover {
  background: var(--ui5e-secondary);
  color: var(--ui5e-dark);
}

.ui5e-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--ui5e-light);
  font-size: 2rem;
  cursor: pointer;
}

@media (min-width: 769px) {
  .ui5e-menu-toggle {
    display: none;
  }
}

/* Mobile Menu */
.ui5e-mobile-menu {
  position: fixed;
  top: 56px;
  left: -100%;
  width: 280px;
  height: calc(100vh - 56px);
  background-color: var(--ui5e-darker);
  transition: left 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
}

.ui5e-mobile-menu.ui5e-menu-open {
  left: 0;
}

.ui5e-menu-overlay {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.ui5e-menu-overlay.ui5e-overlay-active {
  opacity: 1;
  visibility: visible;
}

.ui5e-menu-nav {
  padding: 1rem 0;
}

.ui5e-menu-nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--ui5e-light);
  text-decoration: none;
  font-size: 1.4rem;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.ui5e-menu-nav a:hover {
  background-color: rgba(255, 87, 34, 0.1);
  border-left-color: var(--ui5e-primary);
  color: var(--ui5e-primary);
}

/* Desktop Navigation */
@media (min-width: 769px) {
  .ui5e-desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .ui5e-desktop-nav a {
    color: var(--ui5e-light);
    text-decoration: none;
    font-size: 1.4rem;
    transition: color 0.3s ease;
  }

  .ui5e-desktop-nav a:hover {
    color: var(--ui5e-primary);
  }
}

@media (max-width: 768px) {
  .ui5e-desktop-nav {
    display: none;
  }
}

/* Carousel */
.ui5e-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.ui5e-carousel-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.ui5e-carousel-slide {
  min-width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ui5e-carousel-slide.ui5e-slide-active {
  opacity: 1;
}

.ui5e-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ui5e-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.ui5e-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ui5e-carousel-dot.ui5e-dot-active {
  background-color: var(--ui5e-primary);
  transform: scale(1.2);
}

/* Section */
.ui5e-section {
  margin-bottom: 2rem;
}

.ui5e-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ui5e-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.ui5e-section-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ui5e-secondary);
  margin-bottom: 1rem;
}

/* Game Grid */
.ui5e-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.ui5e-game-item {
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.ui5e-game-item:hover {
  transform: scale(1.05);
}

.ui5e-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background-color: var(--ui5e-darker);
  margin-bottom: 0.5rem;
}

.ui5e-game-name {
  font-size: 1rem;
  color: var(--ui5e-light);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content Card */
.ui5e-card {
  background-color: var(--ui5e-darker);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--ui5e-border);
}

.ui5e-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ui5e-primary);
  margin-bottom: 1rem;
}

.ui5e-card-content {
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--ui5e-light);
}

.ui5e-card-content p {
  margin-bottom: 1rem;
}

.ui5e-card-content a {
  color: var(--ui5e-primary);
  text-decoration: none;
  font-weight: 600;
}

.ui5e-card-content a:hover {
  text-decoration: underline;
}

/* Promotional Link */
.ui5e-promo-link {
  color: var(--ui5e-primary);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.ui5e-promo-link:hover {
  text-decoration: underline;
}

.ui5e-promo-btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--ui5e-gradient);
  color: var(--ui5e-white);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: var(--ui5e-shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1.4rem;
}

.ui5e-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 87, 34, 0.4);
}

/* Feature List */
.ui5e-feature-list {
  list-style: none;
}

.ui5e-feature-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--ui5e-border);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.ui5e-feature-list li:last-child {
  border-bottom: none;
}

.ui5e-feature-icon {
  color: var(--ui5e-primary);
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* FAQ */
.ui5e-faq-item {
  margin-bottom: 1rem;
  border: 1px solid var(--ui5e-border);
  border-radius: 8px;
  overflow: hidden;
}

.ui5e-faq-question {
  background-color: rgba(255, 87, 34, 0.1);
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--ui5e-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ui5e-faq-answer {
  padding: 1rem 1.5rem;
  color: var(--ui5e-gray);
  line-height: 1.8;
}

/* Bottom Navigation */
.ui5e-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(180deg, var(--ui5e-darker) 0%, #0d0d0d 100%);
  border-top: 2px solid var(--ui5e-primary);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

@media (min-width: 769px) {
  .ui5e-bottom-nav {
    display: none;
  }
}

.ui5e-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  text-decoration: none;
  color: var(--ui5e-gray);
  transition: all 0.3s ease;
  position: relative;
}

.ui5e-nav-item:hover {
  color: var(--ui5e-primary);
  transform: scale(1.1);
}

.ui5e-nav-item.ui5e-active {
  color: var(--ui5e-primary);
}

.ui5e-nav-item.ui5e-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background-color: var(--ui5e-primary);
  border-radius: 2px;
}

.ui5e-nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.ui5e-nav-text {
  font-size: 10px;
  font-weight: 500;
}

/* Footer */
.ui5e-footer {
  background-color: var(--ui5e-darker);
  border-top: 1px solid var(--ui5e-border);
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}

.ui5e-footer-content {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ui5e-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ui5e-footer-links a {
  color: var(--ui5e-gray);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.ui5e-footer-links a:hover {
  color: var(--ui5e-primary);
}

.ui5e-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ui5e-partner-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.ui5e-partner-logo:hover {
  opacity: 1;
}

.ui5e-copyright {
  text-align: center;
  color: var(--ui5e-gray);
  font-size: 1.2rem;
}

/* H1 Title */
h1.ui5e-main-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ui5e-primary);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* Statistics Table */
.ui5e-stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.ui5e-stats-table th,
.ui5e-stats-table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--ui5e-border);
}

.ui5e-stats-table th {
  background-color: rgba(255, 87, 34, 0.1);
  color: var(--ui5e-primary);
  font-weight: 600;
}

.ui5e-stats-table td {
  color: var(--ui5e-light);
}

/* Achievement Badge */
.ui5e-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--ui5e-gradient);
  color: var(--ui5e-white);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 20px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Loading Spinner */
.ui5e-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ui5e-border);
  border-top-color: var(--ui5e-primary);
  border-radius: 50%;
  animation: ui5e-spin 1s linear infinite;
}

@keyframes ui5e-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pulse Animation */
@keyframes ui5e-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.ui5e-pulse {
  animation: ui5e-pulse 2s infinite;
}

/* Responsive Utilities */
@media (max-width: 380px) {
  .ui5e-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 769px) {
  .ui5e-container {
    max-width: 1200px;
  }

  .ui5e-game-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  h1.ui5e-main-title {
    font-size: 2.8rem;
  }
}

/* Accessibility */
.ui5e-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
.ui5e-btn:focus,
.ui5e-nav-item:focus,
.ui5e-promo-link:focus {
  outline: 2px solid var(--ui5e-primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .ui5e-header,
  .ui5e-bottom-nav,
  .ui5e-footer {
    display: none;
  }

  .ui5e-wrapper {
    padding-top: 0;
    padding-bottom: 0;
  }
}
