/**
 * jilli - Design System
 * All classes use s844- prefix for namespace isolation
 */

/* ===== CSS Variables ===== */
:root {
  --s844-primary: #FFBF00;
  --s844-primary-dark: #E5A800;
  --s844-bg: #0F0F23;
  --s844-bg-light: #1A1A35;
  --s844-bg-card: #252540;
  --s844-text: #FFFFFF;
  --s844-text-muted: #B8B8D4;
  --s844-border: #3A3A5C;
  --s844-shadow: rgba(0, 0, 0, 0.3);
  --s844-gradient: linear-gradient(135deg, #FFBF00 0%, #FFA500 100%);
  --s844-overlay: rgba(15, 15, 35, 0.95);
}

/* ===== Reset & 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, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  background-color: var(--s844-bg);
  color: var(--s844-text);
  min-width: 320px;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: var(--s844-primary);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--s844-primary-dark);
}

/* ===== Header ===== */
.s844-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--s844-bg-light);
  border-bottom: 1px solid var(--s844-border);
  z-index: 1000;
  box-shadow: 0 2px 8px var(--s844-shadow);
}

.s844-header-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.s844-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--s844-primary);
}

.s844-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.s844-header-buttons {
  display: flex;
  gap: 8px;
}

.s844-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.s844-btn-primary {
  background: var(--s844-gradient);
  color: var(--s844-bg);
}

.s844-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 191, 0, 0.3);
}

.s844-btn-outline {
  background: transparent;
  color: var(--s844-primary);
  border: 2px solid var(--s844-primary);
}

.s844-btn-outline:hover {
  background: var(--s844-primary);
  color: var(--s844-bg);
}

.s844-hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
}

.s844-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--s844-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.s844-hamburger-active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.s844-hamburger-active span:nth-child(2) {
  opacity: 0;
}

.s844-hamburger-active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== Mobile Menu ===== */
.s844-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--s844-overlay);
  backdrop-filter: blur(10px);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.s844-menu-open {
  right: 0;
}

.s844-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.s844-overlay-active {
  opacity: 1;
  visibility: visible;
}

.s844-menu-header {
  padding: 20px;
  border-bottom: 1px solid var(--s844-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.s844-menu-logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--s844-primary);
}

.s844-menu-close {
  background: none;
  border: none;
  color: var(--s844-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 8px;
}

.s844-menu-nav {
  padding: 20px;
}

.s844-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--s844-text);
  font-size: 1.6rem;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.s844-menu-link:hover {
  background: var(--s844-bg-card);
  color: var(--s844-primary);
}

.s844-menu-link i {
  font-size: 2rem;
  width: 24px;
  text-align: center;
}

/* ===== Main Content ===== */
.s844-main {
  margin-top: 60px;
  padding: 20px 16px 100px;
  min-height: calc(100vh - 60px);
}

/* ===== Carousel ===== */
.s844-carousel {
  position: relative;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px var(--s844-shadow);
}

.s844-carousel-slide {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.s844-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s844-carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.s844-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.s844-carousel-indicator.s844-active {
  width: 24px;
  border-radius: 4px;
  background: var(--s844-primary);
}

/* ===== Section ===== */
.s844-section {
  margin-bottom: 32px;
}

.s844-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--s844-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.s844-section-title i {
  font-size: 2.4rem;
}

/* ===== Game Grid ===== */
.s844-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.s844-game-card {
  background: var(--s844-bg-card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--s844-border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.s844-game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(255, 191, 0, 0.2);
  border-color: var(--s844-primary);
}

.s844-game-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--s844-bg-light);
}

.s844-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s844-game-name {
  padding: 8px;
  font-size: 1.2rem;
  color: var(--s844-text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* ===== Card ===== */
.s844-card {
  background: var(--s844-bg-card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--s844-border);
  box-shadow: 0 4px 12px var(--s844-shadow);
}

.s844-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--s844-primary);
  margin-bottom: 12px;
}

.s844-card-content {
  color: var(--s844-text-muted);
  line-height: 1.6;
}

.s844-card-content p {
  margin-bottom: 12px;
}

.s844-card-content a {
  color: var(--s844-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* ===== Button Large ===== */
.s844-btn-large {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: var(--s844-gradient);
  color: var(--s844-bg);
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 24px 0;
  box-shadow: 0 4px 16px rgba(255, 191, 0, 0.3);
}

.s844-btn-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(255, 191, 0, 0.4);
}

/* ===== Footer ===== */
.s844-footer {
  background: var(--s844-bg-light);
  border-top: 1px solid var(--s844-border);
  padding: 32px 16px 100px;
  margin-top: 40px;
}

.s844-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  justify-content: center;
}

.s844-footer-link {
  color: var(--s844-text-muted);
  font-size: 1.4rem;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.s844-footer-link:hover {
  color: var(--s844-primary);
  background: var(--s844-bg-card);
}

.s844-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.s844-partner-logo {
  width: 100%;
  height: 40px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.7);
  transition: all 0.3s ease;
}

.s844-partner-logo:hover {
  filter: grayscale(0%) brightness(1);
}

.s844-copyright {
  text-align: center;
  color: var(--s844-text-muted);
  font-size: 1.2rem;
  line-height: 1.6;
}

/* ===== Mobile Bottom Navigation ===== */
.s844-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--s844-bg-light);
  border-top: 2px solid var(--s844-primary);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 1000;
  box-shadow: 0 -2px 12px var(--s844-shadow);
}

.s844-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  color: var(--s844-text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 12px;
}

.s844-nav-item:hover,
.s844-nav-item.s844-active {
  color: var(--s844-primary);
  background: rgba(255, 191, 0, 0.1);
}

.s844-nav-item i {
  font-size: 24px;
  transition: transform 0.3s ease;
}

.s844-nav-item:hover i {
  transform: scale(1.15);
}

.s844-nav-item span {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .s844-bottom-nav {
    display: none;
  }

  .s844-main {
    padding-bottom: 20px;
  }

  .s844-footer {
    padding-bottom: 32px;
  }
}

/* Add padding to main for mobile bottom nav */
@media (max-width: 768px) {
  .s844-main {
    padding-bottom: 100px;
  }
}

/* ===== Responsive ===== */
@media (max-width: 360px) {
  .s844-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .s844-header-buttons {
    gap: 6px;
  }

  .s844-btn {
    padding: 6px 12px;
    font-size: 1.2rem;
  }
}
