/* 666jili - Main Stylesheet */
/* All classes use s891- prefix for namespace isolation */

/* CSS Variables */
:root {
  --s891-primary: #0000CD;
  --s891-primary-dark: #00008B;
  --s891-primary-light: #1E1EDE;
  --s891-bg: #1A1A1A;
  --s891-bg-light: #2A2A2A;
  --s891-bg-lighter: #3A3A3A;
  --s891-text: #FFFFFF;
  --s891-text-muted: #B0B0B0;
  --s891-border: #4A4A4A;
  --s891-success: #00C851;
  --s891-warning: #FF8800;
  --s891-danger: #FF4444;
  --s891-shadow: rgba(0, 0, 0, 0.3);
  --s891-gradient: linear-gradient(135deg, #0000CD 0%, #00008B 100%);
}

/* Reset & 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.6;
  color: var(--s891-text);
  background-color: var(--s891-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.s891-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.s891-wrapper {
  padding-top: 70px;
  padding-bottom: 80px;
}

/* Header */
.s891-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--s891-bg);
  border-bottom: 1px solid var(--s891-border);
  z-index: 1000;
  box-shadow: 0 2px 10px var(--s891-shadow);
}

.s891-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  height: 60px;
}

.s891-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--s891-text);
  font-weight: 700;
  font-size: 1.8rem;
}

.s891-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.s891-header-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.s891-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  outline: none;
}

.s891-btn-primary {
  background: var(--s891-gradient);
  color: var(--s891-text);
  box-shadow: 0 2px 8px rgba(0, 0, 205, 0.3);
}

.s891-btn-primary:hover {
  background: var(--s891-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 205, 0.4);
}

.s891-btn-secondary {
  background: transparent;
  color: var(--s891-primary);
  border: 2px solid var(--s891-primary);
}

.s891-btn-secondary:hover {
  background: var(--s891-primary);
  color: var(--s891-text);
}

.s891-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10001;
}

.s891-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--s891-text);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.s891-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--s891-bg-light);
  z-index: 9999;
  padding: 80px 2rem 2rem;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px var(--s891-shadow);
}

.s891-mobile-menu.s891-menu-open {
  right: 0;
}

.s891-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;
}

.s891-mobile-menu.s891-menu-open + .s891-menu-overlay {
  opacity: 1;
  visibility: visible;
}

.s891-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.s891-menu-link {
  display: block;
  padding: 1.2rem 1.5rem;
  color: var(--s891-text);
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.s891-menu-link:hover {
  background: var(--s891-bg-lighter);
  color: var(--s891-primary);
  padding-left: 2rem;
}

/* Carousel */
.s891-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin: 2rem 0;
  height: 200px;
  box-shadow: 0 4px 15px var(--s891-shadow);
}

.s891-carousel-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.s891-carousel-slide {
  min-width: 100%;
  height: 100%;
}

.s891-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s891-carousel-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.s891-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.s891-carousel-dot.s891-active {
  background: var(--s891-primary);
  width: 24px;
  border-radius: 4px;
}

/* Content Sections */
.s891-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--s891-bg-light);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--s891-shadow);
}

.s891-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--s891-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.s891-section-content {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--s891-text-muted);
}

.s891-section-content p {
  margin-bottom: 1.2rem;
}

.s891-section-content a {
  color: var(--s891-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.s891-section-content a:hover {
  color: var(--s891-primary-light);
  text-decoration: underline;
}

/* Game Grid */
.s891-game-category {
  margin: 3rem 0;
}

.s891-category-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--s891-primary);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.s891-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.s891-game-item {
  display: block;
  text-decoration: none;
  color: var(--s891-text);
  transition: transform 0.2s ease;
}

.s891-game-item:hover {
  transform: scale(1.05);
}

.s891-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px var(--s891-shadow);
}

.s891-game-name {
  font-size: 1.1rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Card Component */
.s891-card {
  background: var(--s891-bg-light);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 2px 10px var(--s891-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.s891-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 20px var(--s891-shadow);
}

.s891-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--s891-primary);
}

.s891-card-content {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--s891-text-muted);
}

/* Footer */
.s891-footer {
  background: var(--s891-bg-light);
  padding: 3rem 1.5rem 100px;
  margin-top: 4rem;
  border-top: 1px solid var(--s891-border);
}

.s891-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.s891-footer-link {
  color: var(--s891-text-muted);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color 0.2s ease;
}

.s891-footer-link:hover {
  color: var(--s891-primary);
}

.s891-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.s891-partner-logo {
  width: 60px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.s891-partner-logo:hover {
  opacity: 1;
}

.s891-copyright {
  text-align: center;
  font-size: 1.3rem;
  color: var(--s891-text-muted);
  margin-top: 2rem;
}

/* Bottom Navigation */
.s891-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--s891-bg-light);
  border-top: 2px solid var(--s891-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 62px;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--s891-shadow);
}

.s891-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--s891-text-muted);
  font-size: 1rem;
  min-width: 60px;
  min-height: 60px;
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 0.5rem;
}

.s891-bottom-nav-item:hover {
  color: var(--s891-primary);
  transform: scale(1.1);
}

.s891-bottom-nav-item.s891-active {
  color: var(--s891-primary);
}

.s891-bottom-nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.s891-bottom-nav-label {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

/* Desktop Responsive */
@media (min-width: 769px) {
  .s891-bottom-nav {
    display: none;
  }

  .s891-wrapper {
    padding-bottom: 2rem;
  }

  .s891-footer {
    padding-bottom: 3rem;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .s891-menu-toggle {
    display: flex;
  }

  .s891-header-buttons {
    display: flex;
  }
}

/* Utilities */
.s891-text-center {
  text-align: center;
}

.s891-mt-1 {
  margin-top: 1rem;
}

.s891-mt-2 {
  margin-top: 2rem;
}

.s891-mb-1 {
  margin-bottom: 1rem;
}

.s891-mb-2 {
  margin-bottom: 2rem;
}

.s891-highlight {
  color: var(--s891-primary);
  font-weight: 600;
}

/* Loading State */
body:not(.s891-loaded) {
  opacity: 0;
}

body.s891-loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* RTL Support */
[dir="rtl"] .s891-mobile-menu {
  right: auto;
  left: -100%;
}

[dir="rtl"] .s891-mobile-menu.s891-menu-open {
  left: 0;
}

/* Print Styles */
@media print {
  .s891-header,
  .s891-bottom-nav,
  .s891-mobile-menu {
    display: none;
  }

  .s891-wrapper {
    padding-top: 0;
    padding-bottom: 0;
  }
}
