/* 29JL Layout Stylesheet - Mobile First Design */
/* Prefix: s39c- - All classes use this prefix to avoid conflicts */

/* CSS Variables */
:root {
  --s39c-primary: #8FBC8F;
  --s39c-secondary: #7CFC00;
  --s39c-accent: #ADFF2F;
  --s39c-light: #F8F9FA;
  --s39c-light-blue: #BAE1FF;
  --s39c-dark: #2C2C2C;
  --s39c-bg: #1a1a1a;
  --s39c-text: #F8F9FA;
  --s39c-gradient: linear-gradient(135deg, #8FBC8F 0%, #7CFC00 100%);
  --s39c-shadow: 0 4px 6px rgba(0,0,0,0.3);
  --s39c-shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

/* Reset and Base */
* {
  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(--s39c-text);
  background: var(--s39c-bg);
  overflow-x: hidden;
}

/* Container and Layout */
.s39c-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.s39c-wrapper {
  width: 100%;
  min-height: 100vh;
  padding-bottom: 8rem;
}

.s39c-grid {
  display: grid;
  gap: 1.6rem;
}

/* Header */
.s39c-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #2C2C2C 0%, #1a1a1a 100%);
  box-shadow: var(--s39c-shadow);
  z-index: 1000;
  padding: 1.2rem 0;
}

.s39c-header-content {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.s39c-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--s39c-text);
}

.s39c-logo i {
  font-size: 2.8rem;
  color: var(--s39c-accent);
}

.s39c-logo-text {
  font-size: 2rem;
  font-weight: 700;
  background: var(--s39c-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.s39c-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.s39c-menu-toggle {
  background: none;
  border: none;
  color: var(--s39c-accent);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

/* Navigation */
.s39c-nav-list {
  list-style: none;
  display: flex;
  gap: 1.6rem;
}

.s39c-nav-item {
  display: inline-block;
}

.s39c-nav-link {
  color: var(--s39c-text);
  text-decoration: none;
  font-size: 1.4rem;
  padding: 0.8rem 1.2rem;
  border-radius: 0.4rem;
  transition: all 0.3s ease;
}

.s39c-nav-link:hover,
.s39c-nav-link.s39c-active {
  background: var(--s39c-primary);
  color: var(--s39c-dark);
}

/* Mobile Menu */
.s39c-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: #2C2C2C;
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: var(--s39c-shadow-lg);
}

.s39c-mobile-menu.s39c-menu-active {
  right: 0;
}

.s39c-menu-header {
  padding: 2rem 1.6rem;
  background: var(--s39c-gradient);
  color: var(--s39c-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.s39c-menu-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.s39c-menu-close {
  background: none;
  border: none;
  color: var(--s39c-dark);
  font-size: 2.4rem;
  cursor: pointer;
}

.s39c-menu-list {
  list-style: none;
  padding: 2rem 0;
}

.s39c-menu-item {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.s39c-menu-link {
  display: block;
  padding: 1.6rem 2rem;
  color: var(--s39c-text);
  text-decoration: none;
  font-size: 1.6rem;
  transition: background 0.3s ease;
}

.s39c-menu-link:hover,
.s39c-menu-link.s39c-active {
  background: rgba(143, 188, 143, 0.2);
  color: var(--s39c-accent);
}

.s39c-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;
}

.s39c-menu-overlay.s39c-overlay-active {
  opacity: 1;
  visibility: visible;
}

/* Buttons */
.s39c-btn {
  display: inline-block;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.6rem;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.s39c-btn-primary {
  background: var(--s39c-gradient);
  color: var(--s39c-dark);
  box-shadow: var(--s39c-shadow);
}

.s39c-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--s39c-shadow-lg);
}

.s39c-btn-secondary {
  background: transparent;
  color: var(--s39c-accent);
  border: 2px solid var(--s39c-accent);
}

.s39c-btn-secondary:hover {
  background: var(--s39c-accent);
  color: var(--s39c-dark);
}

.s39c-btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
}

/* Carousel */
.s39c-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0.8rem;
  margin: 7rem 0 2rem;
}

.s39c-carousel-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
}

.s39c-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.s39c-carousel-slide.s39c-slide-active {
  opacity: 1;
}

.s39c-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s39c-carousel-dots {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 10;
}

.s39c-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.s39c-carousel-dot.s39c-dot-active {
  background: var(--s39c-accent);
  width: 2.4rem;
  border-radius: 0.4rem;
}

/* Section */
.s39c-section {
  padding: 3rem 0;
}

.s39c-section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--s39c-accent);
  margin-bottom: 2rem;
  text-align: center;
}

.s39c-section-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--s39c-primary);
  margin-bottom: 1.6rem;
}

/* Content */
.s39c-content-section {
  background: rgba(44, 44, 44, 0.5);
  border-radius: 0.8rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.s39c-content-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--s39c-accent);
  margin-bottom: 1.6rem;
}

.s39c-content-text {
  color: var(--s39c-light);
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.s39c-content-text a {
  color: var(--s39c-secondary);
  text-decoration: underline;
  font-weight: 600;
}

/* Game Grid */
.s39c-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin: 2rem 0;
}

.s39c-game-card {
  background: rgba(44, 44, 44, 0.8);
  border-radius: 0.8rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.s39c-game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--s39c-shadow-lg);
}

.s39c-game-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.s39c-game-name {
  padding: 0.8rem;
  font-size: 1.2rem;
  color: var(--s39c-text);
  text-align: center;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card Component */
.s39c-card {
  background: rgba(44, 44, 44, 0.6);
  border-radius: 0.8rem;
  padding: 2rem;
  box-shadow: var(--s39c-shadow);
}

/* Bottom Navigation */
.s39c-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #1a1a1a 0%, #2C2C2C 100%);
  box-shadow: 0 -4px 6px rgba(0,0,0,0.3);
  z-index: 1000;
  padding: 0.8rem 0;
}

.s39c-bottom-nav-container {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.s39c-nav-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--s39c-text);
  cursor: pointer;
  padding: 0.8rem;
  min-width: 6rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.s39c-nav-button:hover,
.s39c-nav-button.s39c-active {
  color: var(--s39c-accent);
  transform: scale(1.05);
}

.s39c-nav-icon {
  font-size: 2.4rem;
}

.s39c-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.s39c-footer {
  background: #2C2C2C;
  padding: 3rem 0 10rem;
  margin-top: 4rem;
}

.s39c-footer-content {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.s39c-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.s39c-partner-logo {
  width: 100%;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.s39c-partner-logo:hover {
  opacity: 1;
}

.s39c-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.s39c-footer-link {
  color: var(--s39c-light);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.s39c-footer-link:hover {
  color: var(--s39c-accent);
}

.s39c-copyright {
  text-align: center;
  color: rgba(248, 249, 250, 0.6);
  font-size: 1.2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Utility Classes */
.s39c-text-center {
  text-align: center;
}

.s39c-text-primary {
  color: var(--s39c-primary);
}

.s39c-text-accent {
  color: var(--s39c-accent);
}

.s39c-mb-1 {
  margin-bottom: 1rem;
}

.s39c-mb-2 {
  margin-bottom: 2rem;
}

.s39c-mt-2 {
  margin-top: 2rem;
}

/* Responsive - Desktop */
@media (min-width: 769px) {
  .s39c-bottom-nav {
    display: none;
  }

  .s39c-wrapper {
    padding-bottom: 2rem;
  }

  .s39c-footer {
    padding: 3rem 0 2rem;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  main {
    padding-bottom: 8rem;
  }

  .s39c-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Loading Animation */
.s39c-loading {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--s39c-accent);
  animation: s39c-spin 1s linear infinite;
}

@keyframes s39c-spin {
  to { transform: rotate(360deg); }
}

/* Scroll to top button */
.s39c-scroll-top {
  position: fixed;
  bottom: 10rem;
  right: 2rem;
  background: var(--s39c-gradient);
  color: var(--s39c-dark);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--s39c-shadow);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.s39c-scroll-top.s39c-scroll-visible {
  opacity: 1;
  visibility: visible;
}

/* Tooltip */
.s39c-tooltip {
  position: absolute;
  background: #2C2C2C;
  color: var(--s39c-text);
  padding: 0.8rem 1.2rem;
  border-radius: 0.4rem;
  font-size: 1.2rem;
  white-space: nowrap;
  z-index: 10000;
  box-shadow: var(--s39c-shadow);
}
