/**
 * 711ph Gaming Website Styles
 * Mobile-first responsive design
 * Color palette: #FF8A80 | #2E4057 | #2E8B57 | #FF0000 | #3CB371
 */

/* CSS Variables for consistent theming */
:root {
  /* Color palette */
  --s99e-primary: #FF8A80;
  --s99e-secondary: #2E4057;
  --s99e-accent: #2E8B57;
  --s99e-highlight: #FF0000;
  --s99e-success: #3CB371;

  /* Dark theme colors */
  --s99e-bg-dark: #1a1a1a;
  --s99e-bg-medium: #2d2d2d;
  --s99e-bg-light: #3a3a3a;
  --s99e-text-primary: #ffffff;
  --s99e-text-secondary: #cccccc;
  --s99e-text-muted: #999999;

  /* Spacing */
  --s99e-spacing-xs: 0.5rem;
  --s99e-spacing-sm: 1rem;
  --s99e-spacing-md: 1.5rem;
  --s99e-spacing-lg: 2rem;
  --s99e-spacing-xl: 3rem;

  /* Typography */
  --s99e-font-size-xs: 1.2rem;
  --s99e-font-size-sm: 1.4rem;
  --s99e-font-size-base: 1.6rem;
  --s99e-font-size-lg: 1.8rem;
  --s99e-font-size-xl: 2.2rem;
  --s99e-font-size-2xl: 2.8rem;

  /* Layout */
  --s99e-header-height: 6rem;
  --s99e-nav-height: 6.4rem;
  --s99e-max-width: 430px;

  /* Transitions */
  --s99e-transition-fast: 0.2s ease;
  --s99e-transition-normal: 0.3s ease;
  --s99e-transition-slow: 0.5s ease;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: var(--s99e-font-size-base);
  line-height: 1.5;
  color: var(--s99e-text-primary);
  background-color: var(--s99e-bg-dark);
  max-width: var(--s99e-max-width);
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.s99e-h1 {
  font-size: var(--s99e-font-size-2xl);
  font-weight: 700;
  color: var(--s99e-primary);
  margin-bottom: var(--s99e-spacing-md);
  text-align: center;
}

.s99e-h2 {
  font-size: var(--s99e-font-size-xl);
  font-weight: 600;
  color: var(--s99e-text-primary);
  margin-bottom: var(--s99e-spacing-sm);
}

.s99e-h3 {
  font-size: var(--s99e-font-size-lg);
  font-weight: 600;
  color: var(--s99e-text-primary);
  margin-bottom: var(--s99e-spacing-xs);
}

.s99e-text {
  color: var(--s99e-text-secondary);
  margin-bottom: var(--s99e-spacing-sm);
}

.s99e-text-sm {
  font-size: var(--s99e-font-size-sm);
  color: var(--s99e-text-muted);
}

/* Layout containers */
.s99e-container {
  width: 100%;
  padding: 0 var(--s99e-spacing-sm);
  margin: 0 auto;
}

.s99e-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.s99e-main {
  flex: 1;
  padding-bottom: 8rem; /* Space for bottom nav */
}

/* Header */
.s99e-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--s99e-header-height);
  background: linear-gradient(135deg, var(--s99e-secondary) 0%, var(--s99e-bg-medium) 100%);
  border-bottom: 1px solid var(--s99e-bg-light);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s99e-spacing-sm);
}

.s99e-header-left {
  display: flex;
  align-items: center;
  gap: var(--s99e-spacing-xs);
}

.s99e-logo {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--s99e-primary);
  color: white;
  font-weight: bold;
  font-size: var(--s99e-font-size-sm);
}

.s99e-site-name {
  font-size: var(--s99e-font-size-lg);
  font-weight: 700;
  color: var(--s99e-primary);
  text-decoration: none;
}

.s99e-header-right {
  display: flex;
  align-items: center;
  gap: var(--s99e-spacing-xs);
}

.s99e-btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 0.5rem;
  font-size: var(--s99e-font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--s99e-transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem; /* Touch-friendly size */
  min-width: 6rem;
}

.s99e-btn-primary {
  background: linear-gradient(135deg, var(--s99e-primary) 0%, var(--s99e-highlight) 100%);
  color: white;
}

.s99e-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 138, 128, 0.3);
}

.s99e-btn-secondary {
  background: var(--s99e-bg-medium);
  color: var(--s99e-text-primary);
  border: 1px solid var(--s99e-bg-light);
}

.s99e-btn-secondary:hover {
  background: var(--s99e-bg-light);
}

.s99e-menu-toggle {
  background: none;
  border: none;
  color: var(--s99e-text-primary);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.8rem;
  border-radius: 0.5rem;
  transition: all var(--s99e-transition-fast);
}

.s99e-menu-toggle:hover {
  background: var(--s99e-bg-medium);
}

/* Mobile Menu */
.s99e-mobile-menu {
  position: fixed;
  top: var(--s99e-header-height);
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: calc(100vh - var(--s99e-header-height));
  background: var(--s99e-bg-medium);
  border-left: 1px solid var(--s99e-bg-light);
  z-index: 9999;
  transition: right var(--s99e-transition-normal);
  overflow-y: auto;
}

.s99e-mobile-menu.s99e-active {
  right: 0;
}

.s99e-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 var(--s99e-transition-normal);
}

.s99e-menu-overlay.s99e-active {
  opacity: 1;
  visibility: visible;
}

.s99e-menu-list {
  list-style: none;
  padding: var(--s99e-spacing-sm);
}

.s99e-menu-item {
  margin-bottom: var(--s99e-spacing-xs);
}

.s99e-menu-link {
  display: block;
  padding: 1.2rem var(--s99e-spacing-sm);
  color: var(--s99e-text-primary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all var(--s99e-transition-fast);
  font-weight: 500;
}

.s99e-menu-link:hover {
  background: var(--s99e-bg-light);
  color: var(--s99e-primary);
}

/* Carousel */
.s99e-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: var(--s99e-spacing-lg);
}

.s99e-carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--s99e-transition-slow);
}

.s99e-carousel-item.s99e-active {
  opacity: 1;
}

.s99e-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.s99e-carousel-dots {
  position: absolute;
  bottom: var(--s99e-spacing-xs);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--s99e-spacing-xs);
}

.s99e-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--s99e-transition-fast);
}

.s99e-carousel-dot.s99e-active {
  background: var(--s99e-primary);
  transform: scale(1.2);
}

/* Game Grid */
.s99e-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: var(--s99e-spacing-xs);
  margin-bottom: var(--s99e-spacing-lg);
}

.s99e-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all var(--s99e-transition-fast);
  text-decoration: none;
}

.s99e-game-item:hover {
  transform: translateY(-2px);
}

.s99e-game-icon {
  width: 6rem;
  height: 6rem;
  border-radius: 1rem;
  object-fit: cover;
  margin-bottom: var(--s99e-spacing-xs);
  border: 2px solid transparent;
  transition: all var(--s99e-transition-fast);
}

.s99e-game-item:hover .s99e-game-icon {
  border-color: var(--s99e-primary);
  box-shadow: 0 4px 12px rgba(255, 138, 128, 0.3);
}

.s99e-game-name {
  font-size: var(--s99e-font-size-xs);
  color: var(--s99e-text-secondary);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content Sections */
.s99e-section {
  margin-bottom: var(--s99e-spacing-lg);
  padding: var(--s99e-spacing-md);
  background: var(--s99e-bg-medium);
  border-radius: 1rem;
  border: 1px solid var(--s99e-bg-light);
}

.s99e-section-title {
  font-size: var(--s99e-font-size-xl);
  color: var(--s99e-primary);
  margin-bottom: var(--s99e-spacing-md);
  text-align: center;
  font-weight: 600;
}

.s99e-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s99e-spacing-sm);
}

.s99e-feature-item {
  text-align: center;
  padding: var(--s99e-spacing-sm);
  background: var(--s99e-bg-light);
  border-radius: 0.8rem;
  transition: all var(--s99e-transition-fast);
}

.s99e-feature-item:hover {
  background: var(--s99e-primary);
  color: white;
  transform: translateY(-2px);
}

.s99e-feature-icon {
  font-size: 2.4rem;
  margin-bottom: var(--s99e-spacing-xs);
  display: block;
}

.s99e-feature-text {
  font-size: var(--s99e-font-size-xs);
  font-weight: 500;
}

/* Bottom Navigation */
.s99e-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--s99e-nav-height);
  background: linear-gradient(135deg, var(--s99e-secondary) 0%, var(--s99e-bg-medium) 100%);
  border-top: 1px solid var(--s99e-bg-light);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 var(--s99e-spacing-xs);
}

.s99e-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 6rem;
  cursor: pointer;
  transition: all var(--s99e-transition-fast);
  border: none;
  background: none;
  color: var(--s99e-text-secondary);
  text-decoration: none;
  border-radius: 0.8rem;
  position: relative;
}

.s99e-nav-item:hover,
.s99e-nav-item.s99e-active {
  color: var(--s99e-primary);
  transform: translateY(-2px);
}

.s99e-nav-item.s99e-touch-active {
  transform: scale(0.95);
}

.s99e-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
  transition: all var(--s99e-transition-fast);
}

.s99e-nav-text {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  line-height: 1;
}

.s99e-nav-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--s99e-highlight);
  color: white;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 1rem;
  min-width: 1.6rem;
  text-align: center;
  font-weight: 600;
}

/* Footer */
.s99e-footer {
  background: var(--s99e-bg-medium);
  border-top: 1px solid var(--s99e-bg-light);
  padding: var(--s99e-spacing-lg) var(--s99e-spacing-sm) var(--s99e-spacing-xl);
  margin-top: var(--s99e-spacing-lg);
}

.s99e-footer-content {
  text-align: center;
  margin-bottom: var(--s99e-spacing-md);
}

.s99e-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s99e-spacing-sm);
  margin-bottom: var(--s99e-spacing-md);
}

.s99e-footer-link {
  color: var(--s99e-text-secondary);
  text-decoration: none;
  font-size: var(--s99e-font-size-sm);
  transition: color var(--s99e-transition-fast);
}

.s99e-footer-link:hover {
  color: var(--s99e-primary);
}

.s99e-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--s99e-spacing-sm);
  margin-bottom: var(--s99e-spacing-md);
}

.s99e-partner-icon {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity var(--s99e-transition-fast);
}

.s99e-partner-icon:hover {
  opacity: 1;
}

.s99e-copyright {
  font-size: var(--s99e-font-size-xs);
  color: var(--s99e-text-muted);
  text-align: center;
}

/* Loading Animation */
.s99e-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--s99e-transition-normal);
}

.s99e-loading.s99e-active {
  opacity: 1;
  visibility: visible;
}

.s99e-spinner {
  width: 4rem;
  height: 4rem;
  border: 0.4rem solid var(--s99e-bg-light);
  border-top: 0.4rem solid var(--s99e-primary);
  border-radius: 50%;
  animation: s99e-spin 1s linear infinite;
}

@keyframes s99e-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility Classes */
.s99e-text-center { text-align: center; }
.s99e-text-left { text-align: left; }
.s99e-text-right { text-align: right; }

.s99e-mb-xs { margin-bottom: var(--s99e-spacing-xs); }
.s99e-mb-sm { margin-bottom: var(--s99e-spacing-sm); }
.s99e-mb-md { margin-bottom: var(--s99e-spacing-md); }
.s99e-mb-lg { margin-bottom: var(--s99e-spacing-lg); }

.s99e-mt-xs { margin-top: var(--s99e-spacing-xs); }
.s99e-mt-sm { margin-top: var(--s99e-spacing-sm); }
.s99e-mt-md { margin-top: var(--s99e-spacing-md); }
.s99e-mt-lg { margin-top: var(--s99e-spacing-lg); }

.s99e-hidden { display: none; }
.s99e-visible { display: block; }

.s99e-lazy {
  opacity: 0;
  transition: opacity var(--s99e-transition-normal);
}

.s99e-lazy.s99e-loaded {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .s99e-main {
    padding-bottom: 8rem; /* Extra space for bottom nav */
  }

  .s99e-game-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .s99e-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) {
  .s99e-bottom-nav {
    display: none;
  }

  .s99e-main {
    padding-bottom: 0;
  }

  .s99e-game-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .s99e-feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --s99e-text-primary: #ffffff;
    --s99e-text-secondary: #ffffff;
    --s99e-bg-dark: #000000;
    --s99e-bg-medium: #111111;
    --s99e-bg-light: #222222;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .s99e-header,
  .s99e-bottom-nav,
  .s99e-footer {
    display: none;
  }

  .s99e-main {
    padding: 0;
  }
}