/**
 * Sugal77 Gaming Platform CSS Design
 * Mobile-first responsive design with dynamic prefix
 */

/* CSS Variables with dynamic prefix */
:root {
  --w2278-primary: #26A69A;
  --w2278-primary-dark: #1e7d74;
  --w2278-primary-light: #4fb6ab;
  --w2278-secondary: #2C3E50;
  --w2278-secondary-dark: #1a252f;
  --w2278-secondary-light: #34495e;
  --w2278-accent: #e74c3c;
  --w2278-success: #27ae60;
  --w2278-warning: #f39c12;
  --w2278-info: #3498db;
  --w2278-text: #ffffff;
  --w2278-text-secondary: #bdc3c7;
  --w2278-text-muted: #7f8c8d;
  --w2278-bg: #1a1a1a;
  --w2278-bg-secondary: #2c2c2c;
  --w2278-bg-card: #34495e;
  --w2278-border: #34495e;
  --w2278-border-light: #4a5f7a;
  --w2278-shadow: rgba(0, 0, 0, 0.3);
  --w2278-shadow-light: rgba(0, 0, 0, 0.1);
  --w2278-gradient: linear-gradient(135deg, var(--w2278-primary) 0%, var(--w2278-primary-dark) 100%);
  --w2278-radius: 8px;
  --w2278-radius-sm: 4px;
  --w2278-radius-lg: 12px;
  --w2278-transition: all 0.3s ease;
  --w2278-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --w2278-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--w2278-font-primary);
  background: var(--w2278-bg);
  color: var(--w2278-text);
  line-height: 1.6;
  overflow-x: hidden;
}

body.mobile-device {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Typography */
.w2278-h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: var(--w2278-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.w2278-h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--w2278-text);
}

.w2278-h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--w2278-text);
}

.w2278-h4 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--w2278-text);
}

.w2278-text {
  color: var(--w2278-text-secondary);
  margin-bottom: 1rem;
}

.w2278-text-small {
  font-size: 0.875rem;
  color: var(--w2278-text-muted);
}

/* Layout Components */
.w2278-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.w2278-main {
  padding-top: 70px;
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .w2278-main {
    padding-bottom: 2rem;
  }
}

/* Header */
.w2278-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--w2278-secondary);
  border-bottom: 2px solid var(--w2278-primary);
  box-shadow: 0 2px 10px var(--w2278-shadow);
}

.w2278-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  height: 70px;
}

.w2278-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--w2278-primary);
  text-decoration: none;
  cursor: pointer;
}

.w2278-logo:hover {
  color: var(--w2278-primary-light);
}

.w2278-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.w2278-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--w2278-radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--w2278-transition);
  min-height: 44px;
  white-space: nowrap;
}

.w2278-btn-primary {
  background: var(--w2278-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(38, 166, 154, 0.3);
}

.w2278-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(38, 166, 154, 0.4);
}

.w2278-btn-secondary {
  background: transparent;
  color: var(--w2278-primary);
  border: 2px solid var(--w2278-primary);
}

.w2278-btn-secondary:hover {
  background: var(--w2278-primary);
  color: white;
}

.w2278-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.w2278-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--w2278-primary);
  transition: var(--w2278-transition);
}

.w2278-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.w2278-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.w2278-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.w2278-mobile-menu {
  position: fixed;
  top: 70px;
  left: -100%;
  width: 85%;
  height: calc(100vh - 70px);
  background: var(--w2278-secondary);
  z-index: 9999;
  transition: left 0.3s ease;
  overflow-y: auto;
  border-right: 1px solid var(--w2278-border);
}

.w2278-mobile-menu.active {
  left: 0;
}

.w2278-menu-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.w2278-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.w2278-menu-list {
  list-style: none;
  padding: 1rem 0;
}

.w2278-menu-item {
  border-bottom: 1px solid var(--w2278-border);
}

.w2278-menu-link {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--w2278-text);
  text-decoration: none;
  transition: var(--w2278-transition);
  font-weight: 500;
}

.w2278-menu-link:hover {
  background: var(--w2278-bg-secondary);
  color: var(--w2278-primary);
}

/* Carousel */
.w2278-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--w2278-radius-lg);
  margin: 1rem 0;
  box-shadow: 0 8px 25px var(--w2278-shadow);
}

.w2278-carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.w2278-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}

.w2278-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.w2278-carousel-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.w2278-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--w2278-transition);
}

.w2278-indicator.active {
  background: var(--w2278-primary);
}

.w2278-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--w2278-transition);
}

.w2278-carousel-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.w2278-prev {
  left: 1rem;
}

.w2278-next {
  right: 1rem;
}

/* Game Grid */
.w2278-game-section {
  margin: 2rem 0;
}

.w2278-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.w2278-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--w2278-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.w2278-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.w2278-game-card {
  background: var(--w2278-bg-card);
  border-radius: var(--w2278-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--w2278-transition);
  border: 1px solid var(--w2278-border);
  position: relative;
}

.w2278-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--w2278-shadow);
  border-color: var(--w2278-primary);
}

.w2278-game-image {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.w2278-game-name {
  padding: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  color: var(--w2278-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content Modules */
.w2278-module {
  background: var(--w2278-bg-card);
  border-radius: var(--w2278-radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--w2278-border);
  box-shadow: 0 4px 15px var(--w2278-shadow);
}

.w2278-module-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.w2278-module-icon {
  font-size: 1.5rem;
  color: var(--w2278-primary);
}

.w2278-module-content {
  color: var(--w2278-text-secondary);
}

.w2278-module-content p {
  margin-bottom: 1rem;
}

.w2278-module-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.w2278-module-content li {
  margin-bottom: 0.5rem;
}

/* Bottom Navigation */
.w2278-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--w2278-secondary);
  border-top: 2px solid var(--w2278-primary);
  z-index: 1000;
  padding: 0.5rem 0;
  box-shadow: 0 -4px 15px var(--w2278-shadow);
}

.w2278-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
}

.w2278-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--w2278-transition);
  border-radius: var(--w2278-radius-sm);
  text-decoration: none;
  color: var(--w2278-text-secondary);
}

.w2278-bottom-nav-item:hover,
.w2278-bottom-nav-item.active {
  background: var(--w2278-bg-secondary);
  color: var(--w2278-primary);
  transform: scale(1.05);
}

.w2278-bottom-nav-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.w2278-bottom-nav-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .w2278-bottom-nav {
    display: none;
  }

  .w2278-main {
    padding-bottom: 2rem;
  }
}

/* Add bottom padding on mobile */
@media (max-width: 768px) {
  .w2278-main {
    padding-bottom: 80px;
  }
}

/* Footer */
.w2278-footer {
  background: var(--w2278-secondary-dark);
  border-top: 2px solid var(--w2278-primary);
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}

.w2278-footer-content {
  text-align: center;
}

.w2278-partners {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.w2278-partner-logo {
  width: 60px;
  height: 30px;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--w2278-transition);
}

.w2278-partner-logo:hover {
  opacity: 1;
}

.w2278-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.w2278-footer-link {
  color: var(--w2278-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--w2278-transition);
}

.w2278-footer-link:hover {
  color: var(--w2278-primary);
}

.w2278-copyright {
  color: var(--w2278-text-muted);
  font-size: 0.75rem;
  margin-top: 1rem;
}

/* Utility Classes */
.w2278-text-center {
  text-align: center;
}

.w2278-text-left {
  text-align: left;
}

.w2278-text-right {
  text-align: right;
}

.w2278-mb-1 {
  margin-bottom: 0.5rem;
}

.w2278-mb-2 {
  margin-bottom: 1rem;
}

.w2278-mb-3 {
  margin-bottom: 1.5rem;
}

.w2278-mt-1 {
  margin-top: 0.5rem;
}

.w2278-mt-2 {
  margin-top: 1rem;
}

.w2278-mt-3 {
  margin-top: 1.5rem;
}

.w2278-p-1 {
  padding: 0.5rem;
}

.w2278-p-2 {
  padding: 1rem;
}

.w2278-p-3 {
  padding: 1.5rem;
}

.w2278-d-flex {
  display: flex;
}

.w2278-align-center {
  align-items: center;
}

.w2278-justify-center {
  justify-content: center;
}

.w2278-justify-between {
  justify-content: space-between;
}

.w2278-gap-1 {
  gap: 0.5rem;
}

.w2278-gap-2 {
  gap: 1rem;
}

/* Back to Top Button */
.w2278-back-to-top {
  position: fixed;
  bottom: 100px;
  right: 1rem;
  background: var(--w2278-primary);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px var(--w2278-shadow);
  transition: var(--w2278-transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.w2278-back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.w2278-back-to-top:hover {
  background: var(--w2278-primary-dark);
  transform: translateY(-2px);
}

/* Loading States */
.w2278-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--w2278-border);
  border-top: 3px solid var(--w2278-primary);
  border-radius: 50%;
  animation: w2278-spin 1s linear infinite;
}

@keyframes w2278-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .w2278-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .w2278-game-image {
    height: 70px;
  }

  .w2278-game-name {
    font-size: 0.65rem;
    padding: 0.25rem;
  }

  .w2278-carousel img {
    height: 150px;
  }

  .w2278-module {
    padding: 1rem;
    margin: 1rem 0;
  }

  .w2278-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .w2278-container {
    padding: 0 0.75rem;
  }

  .w2278-header-content {
    padding: 0.75rem;
  }

  .w2278-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.375rem;
  }

  .w2278-game-image {
    height: 60px;
  }

  .w2278-bottom-nav-item {
    min-width: 55px;
    min-height: 55px;
    padding: 0.375rem;
  }

  .w2278-bottom-nav-icon {
    font-size: 1.25rem;
  }

  .w2278-bottom-nav-label {
    font-size: 0.65rem;
  }
}

/* Print Styles */
@media print {
  .w2278-header,
  .w2278-bottom-nav,
  .w2278-back-to-top {
    display: none !important;
  }

  .w2278-main {
    padding-top: 0;
    padding-bottom: 0;
  }

  body {
    background: white;
    color: black;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --w2278-text: #ffffff;
    --w2278-bg: #000000;
    --w2278-primary: #00ffff;
    --w2278-secondary: #ffffff;
  }
}

/* Focus styles for keyboard navigation */
.w2278-btn:focus,
.w2278-menu-link:focus,
.w2278-game-card:focus,
.w2278-bottom-nav-item:focus {
  outline: 2px solid var(--w2278-primary);
  outline-offset: 2px;
}

/* Image lazy loading styles */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded {
  opacity: 1;
}