/**
 * Legend Link PH - Main Theme Stylesheet
 * All classes use s8ea- prefix for namespace isolation
 */

/* CSS Variables for color scheme */
:root {
  --s8ea-primary: #4682B4;
  --s8ea-accent: #FF4500;
  --s8ea-gold: #DEB887;
  --s8ea-dark: #34495E;
  --s8ea-light: #D3D3D3;
  --s8ea-bg: #1a1a2e;
  --s8ea-bg-light: #16213e;
  --s8ea-text: #ffffff;
  --s8ea-text-muted: #b0b0b0;
  --s8ea-border: #2a2a4e;
  --s8ea-shadow: rgba(0, 0, 0, 0.3);
}

/* Reset and base styles */
*, *::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, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--s8ea-text);
  background-color: var(--s8ea-bg);
  overflow-x: hidden;
}

/* Container */
.s8ea-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.s8ea-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--s8ea-dark) 0%, var(--s8ea-bg) 100%);
  box-shadow: 0 2px 10px var(--s8ea-shadow);
  z-index: 1000;
  padding: 0.8rem 0;
}

.s8ea-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.s8ea-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--s8ea-text);
  font-weight: 700;
  font-size: 1.8rem;
}

.s8ea-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.s8ea-header-buttons {
  display: flex;
  gap: 0.5rem;
}

.s8ea-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.s8ea-btn-primary {
  background: linear-gradient(135deg, var(--s8ea-primary) 0%, #5a9bd4 100%);
  color: var(--s8ea-text);
}

.s8ea-btn-accent {
  background: linear-gradient(135deg, var(--s8ea-accent) 0%, #ff6b35 100%);
  color: var(--s8ea-text);
}

.s8ea-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--s8ea-shadow);
}

.s8ea-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--s8ea-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Menu */
.s8ea-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;
}

.s8ea-menu-overlay.s8ea-menu-open {
  opacity: 1;
  visibility: visible;
}

.s8ea-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  max-width: 85%;
  height: 100%;
  background: linear-gradient(180deg, var(--s8ea-dark) 0%, var(--s8ea-bg) 100%);
  z-index: 9999;
  padding: 2rem 1.5rem;
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px var(--s8ea-shadow);
}

.s8ea-mobile-menu.s8ea-menu-open {
  right: 0;
}

.s8ea-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--s8ea-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.s8ea-menu-list {
  list-style: none;
  margin-top: 2rem;
}

.s8ea-menu-item {
  margin-bottom: 0.5rem;
}

.s8ea-menu-link {
  display: block;
  padding: 1rem;
  color: var(--s8ea-text);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 1.4rem;
}

.s8ea-menu-link:hover {
  background: rgba(70, 130, 180, 0.2);
  color: var(--s8ea-gold);
}

/* Main Content */
.s8ea-main {
  margin-top: 70px;
  margin-bottom: 80px;
  min-height: calc(100vh - 150px);
}

@media (max-width: 768px) {
  .s8ea-main {
    padding-bottom: 80px;
  }
}

/* Carousel */
.s8ea-carousel-container {
  position: relative;
  margin: 1.5rem 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--s8ea-shadow);
}

.s8ea-carousel-slide {
  display: none;
  width: 100%;
}

.s8ea-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.s8ea-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.s8ea-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.s8ea-carousel-dot.s8ea-active,
.s8ea-carousel-dot:hover {
  background: var(--s8ea-gold);
  transform: scale(1.2);
}

/* Section */
.s8ea-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--s8ea-bg-light);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--s8ea-shadow);
}

.s8ea-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--s8ea-gold);
  margin-bottom: 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Game Grid */
.s8ea-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}

.s8ea-game-item {
  display: block;
  text-decoration: none;
  color: var(--s8ea-text);
  transition: transform 0.3s ease;
}

.s8ea-game-item:hover {
  transform: scale(1.05);
}

.s8ea-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.3rem;
  box-shadow: 0 2px 8px var(--s8ea-shadow);
}

.s8ea-game-name {
  font-size: 1rem;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

/* Card */
.s8ea-card {
  background: var(--s8ea-bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 2px 10px var(--s8ea-shadow);
}

.s8ea-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--s8ea-gold);
  margin-bottom: 1rem;
}

.s8ea-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--s8ea-text-muted);
}

.s8ea-card-content p {
  margin-bottom: 1rem;
}

.s8ea-card-content a {
  color: var(--s8ea-gold);
  text-decoration: none;
  font-weight: 600;
}

.s8ea-card-content a:hover {
  text-decoration: underline;
}

/* List */
.s8ea-list {
  list-style: none;
  padding: 0;
}

.s8ea-list-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--s8ea-border);
  font-size: 1.4rem;
}

.s8ea-list-item:last-child {
  border-bottom: none;
}

.s8ea-list-item::before {
  content: "▸";
  color: var(--s8ea-gold);
  margin-right: 0.5rem;
}

/* Footer */
.s8ea-footer {
  background: linear-gradient(180deg, var(--s8ea-dark) 0%, var(--s8ea-bg) 100%);
  padding: 2rem 0 1rem;
  margin-top: 2rem;
  border-top: 2px solid var(--s8ea-primary);
}

.s8ea-footer-content {
  margin-bottom: 1.5rem;
}

.s8ea-footer-text {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--s8ea-text-muted);
  text-align: center;
  margin-bottom: 1rem;
}

.s8ea-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.s8ea-footer-link {
  color: var(--s8ea-gold);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.s8ea-footer-link:hover {
  color: var(--s8ea-accent);
}

.s8ea-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.s8ea-partner-logo {
  width: 50px;
  height: 30px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.s8ea-partner-logo:hover {
  opacity: 1;
}

.s8ea-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--s8ea-text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--s8ea-border);
}

/* Mobile Bottom Navigation */
.s8ea-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--s8ea-dark) 0%, var(--s8ea-bg) 100%);
  border-top: 2px solid var(--s8ea-primary);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--s8ea-shadow);
}

@media (min-width: 769px) {
  .s8ea-bottom-nav {
    display: none;
  }
}

.s8ea-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--s8ea-text-muted);
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.3rem;
}

.s8ea-nav-item:hover,
.s8ea-nav-item.s8ea-active {
  color: var(--s8ea-gold);
  background: rgba(222, 184, 135, 0.1);
  transform: scale(1.05);
}

.s8ea-nav-icon {
  font-size: 24px;
  margin-bottom: 0.2rem;
}

.s8ea-nav-text {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

/* Utility classes */
.s8ea-text-center {
  text-align: center;
}

.s8ea-mt-1 {
  margin-top: 1rem;
}

.s8ea-mb-1 {
  margin-bottom: 1rem;
}

.s8ea-p-1 {
  padding: 1rem;
}

/* Desktop specific adjustments */
@media (min-width: 769px) {
  .s8ea-menu-toggle {
    display: none;
  }

  .s8ea-desktop-nav {
    display: flex;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .s8ea-menu-toggle {
    display: block;
  }

  .s8ea-desktop-nav {
    display: none;
  }

  .s8ea-game-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
