/**
 * Fil777.css - Core styles for Fil777 gaming platform
 * Prefix: s188- for all CSS classes to avoid conflicts
 * Mobile-first responsive design with 430px max width
 */

/* CSS Variables */
:root {
  --s188-primary: #0D1117;
  --s188-secondary: #00CED1;
  --s188-bg: #f8fafc;
  --s188-surface: #ffffff;
  --s188-text: #1f2937;
  --s188-text-dim: #6b7280;
  --s188-border: #e5e7eb;
  --s188-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --s188-radius: 0.5rem;
  --s188-spacing: 1rem;
  font-size: 62.5%; /* Base 10px for rem calculations */
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--s188-text);
  background-color: var(--s188-bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--s188-primary);
}

h1 { font-size: 3.2rem; line-height: 1.2; }
h2 { font-size: 2.4rem; line-height: 1.3; }
h3 { font-size: 2.0rem; line-height: 1.4; }
h4 { font-size: 1.8rem; line-height: 1.4; }
h5 { font-size: 1.6rem; line-height: 1.5; }
h6 { font-size: 1.4rem; line-height: 1.5; }

p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

a {
  color: var(--s188-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #008B8D;
}

/* Layout Components */
.s188-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.s188-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.s188-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .s188-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .s188-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.s188-section {
  margin: 3rem 0;
}

/* Header Styles */
.s188-header {
  background: var(--s188-surface);
  border-bottom: 1px solid var(--s188-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--s188-shadow);
}

.s188-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.6rem;
  height: 6rem;
}

.s188-logo {
  display: flex;
  align-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--s188-primary);
}

.s188-logo-img {
  width: 3.2rem;
  height: 3.2rem;
  margin-right: 0.8rem;
  border-radius: var(--s188-radius);
}

.s188-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.s188-menu-toggle {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  background: transparent;
  border: none;
}

.s188-menu-toggle span {
  width: 2.4rem;
  height: 0.3rem;
  background: var(--s188-primary);
  margin: 0.2rem 0;
  transition: 0.3s;
  border-radius: 0.2rem;
}

.s188-toggle-active span:nth-child(1) {
  transform: rotate(-45deg) translate(-0.5rem, 0.6rem);
}

.s188-toggle-active span:nth-child(2) {
  opacity: 0;
}

.s188-toggle-active span:nth-child(3) {
  transform: rotate(45deg) translate(-0.5rem, -0.6rem);
}

/* Mobile Menu */
.s188-mobile-menu {
  position: fixed;
  top: 6rem;
  left: -100%;
  width: 100%;
  height: calc(100vh - 6rem);
  background: var(--s188-surface);
  transition: left 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.s188-menu-active {
  left: 0;
}

.s188-menu-overlay {
  position: fixed;
  top: 6rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.s188-overlay-active {
  opacity: 1;
  visibility: visible;
}

.s188-nav-menu {
  list-style: none;
  padding: 2rem;
}

.s188-nav-item {
  margin-bottom: 1rem;
}

.s188-nav-link {
  display: block;
  padding: 1.2rem 0;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--s188-text);
  border-bottom: 1px solid var(--s188-border);
  transition: color 0.2s ease;
}

.s188-nav-link:hover {
  color: var(--s188-secondary);
}

/* Button Styles */
.s188-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: var(--s188-radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-height: 4.4rem;
  gap: 0.8rem;
}

.s188-btn-primary {
  background: var(--s188-secondary);
  color: white;
}

.s188-btn-primary:hover {
  background: #008B8D;
  transform: translateY(-0.2rem);
}

.s188-btn-outline {
  background: transparent;
  color: var(--s188-secondary);
  border: 2px solid var(--s188-secondary);
}

.s188-btn-outline:hover {
  background: var(--s188-secondary);
  color: white;
}

.s188-play-btn {
  background: linear-gradient(135deg, var(--s188-secondary), #008B8D);
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  padding: 1.6rem 3.2rem;
  border-radius: 5rem;
  box-shadow: 0 4px 15px rgba(0, 206, 209, 0.3);
}

.s188-play-btn:hover {
  transform: translateY(-0.3rem);
  box-shadow: 0 6px 20px rgba(0, 206, 209, 0.4);
}

.s188-promo-btn {
  position: relative;
  overflow: hidden;
}

.s188-promo-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

.s188-promo-btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Ripple Animation */
.s188-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: s188-ripple 0.6s linear;
}

@keyframes s188-ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Carousel Styles */
.s188-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--s188-radius);
  margin-bottom: 2rem;
}

.s188-slide {
  display: none;
  width: 100%;
  position: relative;
}

.s188-slide.s188-active {
  display: block;
}

.s188-slide img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.s188-slide img:hover {
  transform: scale(1.05);
}

.s188-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.s188-dot {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--s188-border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.s188-dot.s188-active {
  background: var(--s188-secondary);
}

/* Card Styles */
.s188-card {
  background: var(--s188-surface);
  border-radius: var(--s188-radius);
  padding: 2rem;
  box-shadow: var(--s188-shadow);
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.s188-card:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Game Grid */
.s188-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.s188-game-item {
  background: var(--s188-surface);
  border-radius: var(--s188-radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--s188-shadow);
  cursor: pointer;
  transition: all 0.2s ease;
}

.s188-game-item:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.s188-game-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--s188-radius);
  margin-bottom: 0.8rem;
}

.s188-game-name {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--s188-text);
  line-height: 1.3;
}

/* Footer Styles */
.s188-footer {
  background: var(--s188-primary);
  color: white;
  margin-top: auto;
  padding: 3rem 0;
}

.s188-footer-content {
  text-align: center;
}

.s188-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.s188-footer-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.4rem;
  transition: color 0.2s ease;
}

.s188-footer-link:hover {
  color: var(--s188-secondary);
}

.s188-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.s188-partner-img {
  width: 4rem;
  height: 2rem;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.s188-partner-img:hover {
  opacity: 1;
}

.s188-copyright {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2rem;
}

/* Bottom Navigation */
.s188-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--s188-surface);
  border-top: 1px solid var(--s188-border);
  display: flex;
  justify-content: space-around;
  padding: 0.8rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  height: 6rem;
}

.s188-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  color: var(--s188-text-dim);
  text-decoration: none;
  transition: all 0.2s ease;
  flex: 1;
  border: none;
  background: transparent;
  cursor: pointer;
}

.s188-bottom-nav-item:hover,
.s188-bottom-nav-item.s188-nav-active {
  color: var(--s188-secondary);
  transform: translateY(-0.2rem);
}

.s188-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 0.2rem;
}

.s188-nav-text {
  font-size: 1.2rem;
  font-weight: 500;
}

/* Animation Classes */
.s188-animate {
  opacity: 0;
  transform: translateY(2rem);
  transition: all 0.6s ease;
}

.s188-animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Loading Spinner */
.s188-loading {
  width: 4rem;
  height: 4rem;
  border: 0.4rem solid var(--s188-border);
  border-top: 0.4rem solid var(--s188-secondary);
  border-radius: 50%;
  animation: s188-spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes s188-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Touch Styles for Mobile */
.s188-touch {
  transform: scale(0.95);
}

/* Main Content */
.s188-main {
  flex: 1;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/* Utility Classes */
.s188-text-center { text-align: center; }
.s188-text-left { text-align: left; }
.s188-text-right { text-align: right; }

.s188-mb-1 { margin-bottom: 1rem; }
.s188-mb-2 { margin-bottom: 2rem; }
.s188-mb-3 { margin-bottom: 3rem; }

.s188-mt-1 { margin-top: 1rem; }
.s188-mt-2 { margin-top: 2rem; }
.s188-mt-3 { margin-top: 3rem; }

.s188-p-1 { padding: 1rem; }
.s188-p-2 { padding: 2rem; }
.s188-p-3 { padding: 3rem; }

.s188-hidden { display: none; }
.s188-visible { display: block; }

/* Responsive Adjustments */
@media (max-width: 430px) {
  .s188-container {
    padding: 0 1.2rem;
  }
  
  .s188-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  
  .s188-game-icon {
    width: 3.2rem;
    height: 3.2rem;
  }
  
  .s188-game-name {
    font-size: 1.1rem;
  }
}