/**
 * JL555 Stylesheet
 * All classes use s13a- prefix for namespace isolation
 * Mobile-first responsive design
 */

/* CSS Variables for color consistency */
:root {
  --s13a-primary: #FF4500;
  --s13a-secondary: #FF8C00;
  --s13a-accent: #26A69A;
  --s13a-dark: #34495E;
  --s13a-gray: #999999;
  --s13a-bg-dark: #1a1a2e;
  --s13a-bg-card: #16213e;
  --s13a-text: #f5f5f5;
  --s13a-text-muted: #b0b0b0;
  --s13a-border: #2a2a4a;
  --s13a-success: #26A69A;
  --s13a-warning: #FF8C00;
  --s13a-danger: #FF4500;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--s13a-text);
  background-color: var(--s13a-bg-dark);
  min-width: 320px;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* Container */
.s13a-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Wrapper */
.s13a-wrapper {
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .s13a-wrapper {
    padding-bottom: 2rem;
  }
}

/* Header styles */
.s13a-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background-color: var(--s13a-bg-card);
  border-bottom: 2px solid var(--s13a-primary);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.s13a-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  min-height: 60px;
}

.s13a-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--s13a-text);
  font-size: 1.8rem;
  font-weight: 700;
}

.s13a-logo img {
  width: 32px;
  height: 32px;
}

.s13a-header-buttons {
  display: flex;
  gap: 0.5rem;
}

.s13a-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  min-width: 44px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.s13a-btn-primary {
  background: linear-gradient(135deg, var(--s13a-primary), var(--s13a-secondary));
  color: white;
}

.s13a-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

.s13a-btn-secondary {
  background: transparent;
  color: var(--s13a-primary);
  border: 2px solid var(--s13a-primary);
}

.s13a-btn-secondary:hover {
  background: var(--s13a-primary);
  color: white;
}

/* Mobile menu toggle */
.s13a-menu-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--s13a-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  min-height: 44px;
  min-width: 44px;
}

@media (min-width: 769px) {
  .s13a-menu-toggle {
    display: none;
  }
}

/* Mobile menu */
.s13a-mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  max-width: 430px;
  background-color: var(--s13a-bg-card);
  padding: 1rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  border-top: 2px solid var(--s13a-primary);
}

.s13a-mobile-menu.s13a-menu-open {
  transform: translateX(0);
}

.s13a-menu-link {
  display: block;
  padding: 1rem;
  color: var(--s13a-text);
  text-decoration: none;
  border-bottom: 1px solid var(--s13a-border);
  font-size: 1.4rem;
  transition: background 0.3s ease;
}

.s13a-menu-link:hover {
  background-color: var(--s13a-primary);
  color: white;
}

.s13a-menu-link:last-child {
  border-bottom: none;
}

/* Main content */
.s13a-main {
  margin-top: 60px;
  padding: 1rem;
}

/* Carousel */
.s13a-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 8px;
}

.s13a-carousel-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.s13a-carousel-slide:hover {
  transform: scale(1.02);
}

/* Headings */
.s13a-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--s13a-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.s13a-section-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--s13a-secondary);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--s13a-primary);
}

/* Game grid */
.s13a-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.s13a-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--s13a-text);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.s13a-game-item:hover {
  transform: scale(1.05);
}

.s13a-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background-color: var(--s13a-bg-card);
  margin-bottom: 0.5rem;
  border: 1px solid var(--s13a-border);
}

.s13a-game-name {
  font-size: 1rem;
  text-align: center;
  line-height: 1.2;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card */
.s13a-card {
  background-color: var(--s13a-bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--s13a-border);
}

.s13a-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--s13a-primary);
  margin-bottom: 1rem;
}

.s13a-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--s13a-text-muted);
}

/* Promo link */
.s13a-promo-link {
  color: var(--s13a-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

.s13a-promo-link:hover {
  color: var(--s13a-secondary);
  text-decoration: underline;
}

/* Footer */
.s13a-footer {
  background-color: var(--s13a-bg-card);
  padding: 2rem 1rem 8rem;
  border-top: 2px solid var(--s13a-primary);
}

@media (min-width: 769px) {
  .s13a-footer {
    padding-bottom: 2rem;
  }
}

.s13a-footer-content {
  text-align: center;
  margin-bottom: 1.5rem;
}

.s13a-footer-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--s13a-primary);
  margin-bottom: 1rem;
}

.s13a-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.s13a-footer-link {
  color: var(--s13a-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--s13a-border);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.s13a-footer-link:hover {
  background-color: var(--s13a-primary);
  color: white;
  border-color: var(--s13a-primary);
}

.s13a-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.s13a-partner-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.s13a-partner-logo:hover {
  opacity: 1;
}

.s13a-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--s13a-text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--s13a-border);
}

/* Bottom navigation */
.s13a-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: linear-gradient(135deg, var(--s13a-bg-card), var(--s13a-bg-dark));
  border-top: 2px solid var(--s13a-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

@media (min-width: 769px) {
  .s13a-bottom-nav {
    display: none;
  }
}

.s13a-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--s13a-text-muted);
  min-width: 60px;
  min-height: 60px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.s13a-nav-item:hover,
.s13a-nav-item.s13a-active {
  color: var(--s13a-primary);
  transform: scale(1.1);
}

.s13a-nav-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.s13a-nav-text {
  font-size: 10px;
  font-weight: 500;
}

/* Touch feedback */
.s13a-touch-active {
  opacity: 0.7;
  transform: scale(0.95);
}

/* Utility classes */
.s13a-text-center {
  text-align: center;
}

.s13a-mb-1 {
  margin-bottom: 1rem;
}

.s13a-mb-2 {
  margin-bottom: 2rem;
}

.s13a-mt-2 {
  margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .s13a-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .s13a-game-name {
    font-size: 0.9rem;
  }
}
