/**
 * Jilibibi - Main Stylesheet
 * All classes use prefix: safa-
 * Mobile-first design for online casino platform
 */

/* CSS Variables */
:root {
  --safa-primary: #FF9500;
  --safa-secondary: #AD1457;
  --safa-dark: #273746;
  --safa-accent: #48D1CC;
  --safa-pink: #FFC0CB;
  --safa-light: #F5F5F5;
  --safa-text-dark: #273746;
  --safa-text-light: #F5F5F5;
  --safa-shadow: rgba(0, 0, 0, 0.1);
  --safa-gradient: linear-gradient(135deg, var(--safa-primary) 0%, var(--safa-secondary) 100%);
}

/* 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(--safa-text-dark);
  background-color: var(--safa-light);
  overflow-x: hidden;
  padding-bottom: 80px;
}

body.safa-menu-open {
  overflow: hidden;
}

/* Container */
.safa-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.safa-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--safa-dark);
  box-shadow: 0 2px 10px var(--safa-shadow);
  z-index: 1000;
  height: 60px;
}

.safa-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
}

.safa-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--safa-text-light);
  font-size: 1.8rem;
  font-weight: bold;
}

.safa-logo img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.safa-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.safa-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.safa-btn-primary {
  background: var(--safa-primary);
  color: var(--safa-text-light);
}

.safa-btn-secondary {
  background: transparent;
  color: var(--safa-text-light);
  border: 2px solid var(--safa-primary);
}

.safa-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 149, 0, 0.4);
}

.safa-btn:active {
  transform: scale(0.98);
}

/* Mobile Menu Toggle */
.safa-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
}

.safa-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--safa-text-light);
  transition: all 0.3s ease;
}

.safa-menu-toggle.safa-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.safa-menu-toggle.safa-active span:nth-child(2) {
  opacity: 0;
}

.safa-menu-toggle.safa-active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.safa-mobile-menu {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 100%;
  height: calc(100vh - 60px);
  background: var(--safa-dark);
  transition: left 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 1rem 0;
}

.safa-mobile-menu.safa-active {
  left: 0;
}

.safa-menu-item {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--safa-text-light);
  text-decoration: none;
  font-size: 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.safa-menu-item:hover {
  background: rgba(255, 149, 0, 0.2);
}

/* Carousel */
.safa-carousel {
  position: relative;
  margin-top: 60px;
  overflow: hidden;
}

.safa-slide {
  width: 100%;
  height: auto;
  display: none;
}

.safa-slide.safa-active {
  display: block;
}

.safa-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.safa-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-size: 1.8rem;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.safa-carousel-nav:hover {
  background: rgba(255, 149, 0, 0.8);
}

.safa-carousel-prev {
  left: 10px;
}

.safa-carousel-next {
  right: 10px;
}

/* Main Content */
.safa-main {
  padding: 2rem 0;
}

.safa-section {
  margin-bottom: 3rem;
}

.safa-section-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--safa-dark);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Game Grid */
.safa-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.safa-game-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--safa-shadow);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.safa-game-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(255, 149, 0, 0.3);
}

.safa-game-item:active {
  transform: scale(0.98);
}

.safa-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.safa-game-name {
  padding: 0.6rem 0.4rem;
  font-size: 1.1rem;
  text-align: center;
  color: var(--safa-text-dark);
  background: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Cards */
.safa-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px var(--safa-shadow);
}

.safa-card-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--safa-primary);
  margin-bottom: 1rem;
}

.safa-card-content {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--safa-text-dark);
}

.safa-card-content p {
  margin-bottom: 1rem;
}

/* Feature List */
.safa-feature-list {
  list-style: none;
  padding: 0;
}

.safa-feature-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--safa-light);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.safa-feature-list li:last-child {
  border-bottom: none;
}

.safa-feature-icon {
  width: 24px;
  height: 24px;
  color: var(--safa-primary);
  flex-shrink: 0;
}

/* Text Links */
.safa-text-link {
  color: var(--safa-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.safa-text-link:hover {
  color: var(--safa-secondary);
  text-decoration: underline;
}

/* Footer */
.safa-footer {
  background: var(--safa-dark);
  color: var(--safa-text-light);
  padding: 2rem 0 6rem 0;
}

.safa-footer-content {
  margin-bottom: 2rem;
}

.safa-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.safa-footer-link {
  color: var(--safa-text-light);
  text-decoration: none;
  font-size: 1.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.safa-footer-link:hover {
  background: var(--safa-primary);
}

.safa-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.safa-partner-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.safa-partner-logo:hover {
  opacity: 1;
}

.safa-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--safa-pink);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Bottom Navigation */
.safa-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--safa-dark);
  box-shadow: 0 -2px 10px var(--safa-shadow);
  z-index: 1000;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.safa-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  text-decoration: none;
  color: var(--safa-text-light);
  transition: all 0.3s ease;
  cursor: pointer;
  background: none;
  border: none;
}

.safa-nav-btn:hover {
  color: var(--safa-primary);
}

.safa-nav-btn.safa-active {
  color: var(--safa-primary);
}

.safa-nav-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.safa-nav-text {
  font-size: 10px;
  font-weight: 500;
}

/* Utilities */
.safa-text-center {
  text-align: center;
}

.safa-mt-1 { margin-top: 1rem; }
.safa-mt-2 { margin-top: 2rem; }
.safa-mb-1 { margin-bottom: 1rem; }
.safa-mb-2 { margin-bottom: 2rem; }

.safa-hidden {
  display: none;
}

/* Desktop Responsive */
@media (min-width: 769px) {
  .safa-bottom-nav {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  .safa-mobile-menu {
    display: none;
  }
}

/* Loading State */
body:not(.safa-loaded) {
  opacity: 0;
}

body.safa-loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Touch Feedback */
.safa-btn:active,
.safa-nav-btn:active,
.safa-game-item:active {
  transform: scale(0.95);
}
