/* 777 perya Design System - Mobile Gaming Platform */
/* All classes use sf07- prefix for namespace isolation */

/* CSS Variables - Color Palette */
:root {
  --sf07-primary: #2E8B57;
  --sf07-secondary: #98FB98;
  --sf07-accent: #3CB371;
  --sf07-dark: #1B263B;
  --sf07-light: #F8F9FA;
  --sf07-text: #333333;
  --sf07-text-light: #666666;
  --sf07-border: #E5E7EB;
  --sf07-shadow: rgba(0, 0, 0, 0.1);
  --sf07-shadow-lg: rgba(0, 0, 0, 0.15);
  --sf07-success: #10B981;
  --sf07-warning: #F59E0B;
  --sf07-error: #EF4444;

  /* Typography */
  --sf07-font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sf07-font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

  /* Spacing */
  --sf07-spacing-xs: 0.25rem;
  --sf07-spacing-sm: 0.5rem;
  --sf07-spacing-md: 1rem;
  --sf07-spacing-lg: 1.5rem;
  --sf07-spacing-xl: 2rem;
  --sf07-spacing-2xl: 3rem;

  /* Border Radius */
  --sf07-radius-sm: 0.25rem;
  --sf07-radius-md: 0.5rem;
  --sf07-radius-lg: 0.75rem;
  --sf07-radius-xl: 1rem;

  /* Transitions */
  --sf07-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sf07-transition-fast: all 0.15s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sf07-font-primary);
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--sf07-text);
  background: linear-gradient(135deg, var(--sf07-dark) 0%, var(--sf07-primary) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
.sf07-h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--sf07-light);
  margin-bottom: var(--sf07-spacing-md);
}

.sf07-h2 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--sf07-secondary);
  margin-bottom: var(--sf07-spacing-md);
}

.sf07-h3 {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sf07-accent);
  margin-bottom: var(--sf07-spacing-sm);
}

.sf07-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--sf07-text-light);
  margin-bottom: var(--sf07-spacing-md);
}

.sf07-text-sm {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--sf07-text-light);
}

/* Layout Components */
.sf07-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 var(--sf07-spacing-md);
  width: 100%;
}

.sf07-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sf07-main {
  flex: 1;
  padding-top: 70px;
  padding-bottom: 80px;
}

.sf07-grid {
  display: grid;
  gap: var(--sf07-spacing-md);
}

.sf07-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.sf07-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.sf07-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Header Navigation */
.sf07-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sf07-border);
  padding: var(--sf07-spacing-sm) 0;
}

.sf07-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sf07-spacing-md);
  height: 50px;
}

.sf07-logo {
  display: flex;
  align-items: center;
  gap: var(--sf07-spacing-sm);
  text-decoration: none;
  color: var(--sf07-light);
}

.sf07-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--sf07-accent);
  border-radius: var(--sf07-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 1.4rem;
}

.sf07-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--sf07-secondary);
}

.sf07-header-actions {
  display: flex;
  align-items: center;
  gap: var(--sf07-spacing-sm);
}

.sf07-btn {
  padding: var(--sf07-spacing-sm) var(--sf07-spacing-md);
  border: none;
  border-radius: var(--sf07-radius-md);
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--sf07-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

.sf07-btn-primary {
  background: var(--sf07-accent);
  color: white;
}

.sf07-btn-primary:hover {
  background: var(--sf07-primary);
  transform: translateY(-1px);
}

.sf07-btn-secondary {
  background: var(--sf07-secondary);
  color: var(--sf07-dark);
}

.sf07-btn-secondary:hover {
  background: #7dd87d;
  transform: translateY(-1px);
}

.sf07-menu-toggle {
  background: none;
  border: none;
  color: var(--sf07-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: var(--sf07-spacing-xs);
  border-radius: var(--sf07-radius-sm);
  transition: var(--sf07-transition-fast);
}

.sf07-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu */
.sf07-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--sf07-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: var(--sf07-spacing-xl) var(--sf07-spacing-md) var(--sf07-spacing-md);
}

.sf07-mobile-menu.active {
  right: 0;
}

.sf07-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--sf07-transition);
}

.sf07-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sf07-menu-nav {
  list-style: none;
}

.sf07-menu-item {
  margin-bottom: var(--sf07-spacing-sm);
}

.sf07-menu-link {
  display: block;
  padding: var(--sf07-spacing-md);
  color: var(--sf07-light);
  text-decoration: none;
  border-radius: var(--sf07-radius-md);
  transition: var(--sf07-transition-fast);
  font-size: 1.6rem;
}

.sf07-menu-link:hover {
  background: rgba(60, 179, 113, 0.2);
  color: var(--sf07-secondary);
}

/* Hero Carousel */
.sf07-hero {
  position: relative;
  margin-bottom: var(--sf07-spacing-xl);
}

.sf07-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--sf07-radius-lg);
  margin-bottom: var(--sf07-spacing-lg);
}

.sf07-carousel-slides {
  display: flex;
  transition: transform 0.5s ease;
}

.sf07-carousel-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}

.sf07-carousel-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--sf07-radius-lg);
}

.sf07-carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--sf07-spacing-xs);
  margin-top: var(--sf07-spacing-sm);
}

.sf07-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--sf07-transition-fast);
}

.sf07-carousel-indicator.active {
  background: var(--sf07-accent);
  transform: scale(1.2);
}

/* Game Cards */
.sf07-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sf07-spacing-sm);
  margin-bottom: var(--sf07-spacing-xl);
}

.sf07-game-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--sf07-radius-md);
  overflow: hidden;
  transition: var(--sf07-transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.sf07-game-card:hover {
  transform: translateY(-2px);
  border-color: var(--sf07-accent);
  box-shadow: 0 4px 12px var(--sf07-shadow);
}

.sf07-game-image {
  width: 100%;
  height: 80px;
  object-fit: cover;
  background: linear-gradient(45deg, var(--sf07-primary), var(--sf07-accent));
}

.sf07-game-title {
  font-size: 1rem;
  color: var(--sf07-light);
  text-align: center;
  padding: var(--sf07-spacing-xs);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content Sections */
.sf07-section {
  margin-bottom: var(--sf07-spacing-2xl);
}

.sf07-section-header {
  margin-bottom: var(--sf07-spacing-lg);
  text-align: center;
}

.sf07-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--sf07-radius-lg);
  padding: var(--sf07-spacing-lg);
  margin-bottom: var(--sf07-spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--sf07-transition);
}

.sf07-card:hover {
  border-color: var(--sf07-accent);
  box-shadow: 0 8px 24px var(--sf07-shadow-lg);
}

/* Bottom Navigation */
.sf07-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--sf07-dark);
  border-top: 1px solid var(--sf07-border);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: var(--sf07-spacing-xs) 0;
}

.sf07-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 50px;
  color: var(--sf07-text-light);
  text-decoration: none;
  transition: var(--sf07-transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1rem;
}

.sf07-bottom-nav-item:hover,
.sf07-bottom-nav-item.active {
  color: var(--sf07-secondary);
  transform: translateY(-1px);
}

.sf07-bottom-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 2px;
}

.sf07-bottom-nav-text {
  font-size: 1rem;
  line-height: 1;
}

/* Footer */
.sf07-footer {
  background: var(--sf07-dark);
  border-top: 1px solid var(--sf07-border);
  padding: var(--sf07-spacing-xl) 0 var(--sf07-spacing-lg);
  margin-top: var(--sf07-spacing-2xl);
}

.sf07-footer-content {
  text-align: center;
}

.sf07-partners {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sf07-spacing-md);
  margin-bottom: var(--sf07-spacing-lg);
}

.sf07-partner-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--sf07-transition-fast);
}

.sf07-partner-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.sf07-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sf07-spacing-md);
  margin-bottom: var(--sf07-spacing-lg);
}

.sf07-footer-link {
  color: var(--sf07-text-light);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--sf07-transition-fast);
}

.sf07-footer-link:hover {
  color: var(--sf07-secondary);
}

.sf07-copyright {
  color: var(--sf07-text-light);
  font-size: 1rem;
  margin-top: var(--sf07-spacing-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .sf07-main {
    padding-bottom: 80px;
  }

  .sf07-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sf07-spacing-xs);
  }

  .sf07-game-image {
    height: 70px;
  }

  .sf07-game-title {
    font-size: 0.9rem;
  }

  .sf07-bottom-nav {
    display: flex;
  }
}

@media (min-width: 769px) {
  .sf07-bottom-nav {
    display: none;
  }

  .sf07-container {
    max-width: 1200px;
  }

  .sf07-game-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Utility Classes */
.sf07-text-center {
  text-align: center;
}

.sf07-text-left {
  text-align: left;
}

.sf07-text-right {
  text-align: right;
}

.sf07-mb-sm {
  margin-bottom: var(--sf07-spacing-sm);
}

.sf07-mb-md {
  margin-bottom: var(--sf07-spacing-md);
}

.sf07-mb-lg {
  margin-bottom: var(--sf07-spacing-lg);
}

.sf07-mt-sm {
  margin-top: var(--sf07-spacing-sm);
}

.sf07-mt-md {
  margin-top: var(--sf07-spacing-md);
}

.sf07-mt-lg {
  margin-top: var(--sf07-spacing-lg);
}

.sf07-hidden {
  display: none;
}

.sf07-visible {
  display: block;
}

/* Animation Classes */
.sf07-fade-in {
  animation: sf07FadeIn 0.5s ease-in-out;
}

.sf07-slide-up {
  animation: sf07SlideUp 0.3s ease-out;
}

@keyframes sf07FadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sf07SlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading States */
.sf07-loading {
  position: relative;
  overflow: hidden;
}

.sf07-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: sf07Loading 1.5s infinite;
}

@keyframes sf07Loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
.sf07-btn:focus,
.sf07-menu-toggle:focus,
.sf07-bottom-nav-item:focus {
  outline: 2px solid var(--sf07-accent);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --sf07-text: #000000;
    --sf07-text-light: #333333;
    --sf07-border: #000000;
  }
}