/*
 * J8PH Universal CSS Design System
 * Mobile-first responsive design for casino gaming platform
 */

/* CSS Variables */
:root {
  --v288-primary: #34495E;
  --v288-secondary: #C0C0C0;
  --v288-dark: #3A3A3A;
  --v288-light: #ffffff;
  --v288-accent: #e74c3c;
  --v288-success: #27ae60;
  --v288-warning: #f39c12;
  --v288-bg: #1a1a1a;
  --v288-text: #C0C0C0;
  --v288-border: #444444;
  --v288-shadow: rgba(0, 0, 0, 0.3);
  --v288-gradient: linear-gradient(135deg, #34495E 0%, #2c3e50 100%);
  --v288-transition: all 0.3s ease;
  --v288-radius: 8px;
  --v288-spacing: 1rem;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--v288-text);
  background: var(--v288-bg);
  overflow-x: hidden;
}

/* Container and layout */
.v288-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

.v288-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.v288-main {
  flex: 1;
  padding-top: 7rem;
  padding-bottom: 8rem;
}

/* Header styles */
.v288-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--v288-gradient);
  border-bottom: 1px solid var(--v288-border);
  z-index: 1000;
  transition: var(--v288-transition);
  box-shadow: 0 2px 10px var(--v288-shadow);
}

.v288-header.v288-scrolled {
  background: rgba(52, 73, 94, 0.95);
  backdrop-filter: blur(10px);
}

.v288-header.v288-hidden {
  transform: translateY(-100%);
}

.v288-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  min-height: 6rem;
}

.v288-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--v288-light);
  font-weight: 700;
  font-size: 2rem;
}

.v288-logo-img {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
}

.v288-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.v288-header-btn {
  padding: 0.8rem 1.6rem;
  background: var(--v288-accent);
  color: var(--v288-light);
  border: none;
  border-radius: var(--v288-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--v288-transition);
  min-height: 4.4rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.v288-header-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

.v288-menu-toggle {
  display: flex;
  flex-direction: column;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0.5rem;
}

.v288-hamburger {
  position: relative;
  width: 100%;
  height: 100%;
}

.v288-hamburger::before,
.v288-hamburger::after,
.v288-hamburger span {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--v288-light);
  transition: var(--v288-transition);
  left: 0;
}

.v288-hamburger::before { top: 0; }
.v288-hamburger span { top: 50%; transform: translateY(-50%); }
.v288-hamburger::after { bottom: 0; }

.v288-hamburger.v288-active::before {
  transform: rotate(45deg);
  top: 50%;
}

.v288-hamburger.v288-active span {
  opacity: 0;
}

.v288-hamburger.v288-active::after {
  transform: rotate(-45deg);
  bottom: 50%;
}

/* Mobile navigation */
.v288-mobile-menu {
  position: fixed;
  top: 6rem;
  left: 0;
  right: 0;
  background: var(--v288-dark);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: var(--v288-transition);
  z-index: 999;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

.v288-mobile-menu.v288-active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.v288-mobile-nav {
  padding: 2rem 1rem;
}

.v288-mobile-nav a {
  display: block;
  padding: 1.5rem 0;
  color: var(--v288-text);
  text-decoration: none;
  border-bottom: 1px solid var(--v288-border);
  transition: var(--v288-transition);
  font-size: 1.6rem;
}

.v288-mobile-nav a:hover {
  color: var(--v288-accent);
  padding-left: 1rem;
}

/* Button styles */
.v288-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  background: var(--v288-primary);
  color: var(--v288-light);
  border: none;
  border-radius: var(--v288-radius);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--v288-transition);
  text-decoration: none;
  min-height: 4.4rem;
  position: relative;
  overflow: hidden;
}

.v288-btn:hover {
  background: #2c3e50;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--v288-shadow);
}

.v288-btn-primary {
  background: var(--v288-accent);
}

.v288-btn-primary:hover {
  background: #c0392b;
}

.v288-btn-success {
  background: var(--v288-success);
}

.v288-btn-success:hover {
  background: #219a52;
}

.v288-promo-btn,
.v288-play-btn,
.v288-register-btn,
.v288-login-btn {
  background: linear-gradient(45deg, #e74c3c, #f39c12);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.v288-promo-btn:hover,
.v288-play-btn:hover,
.v288-register-btn:hover,
.v288-login-btn:hover {
  background: linear-gradient(45deg, #c0392b, #d68910);
}

/* Ripple effect */
.v288-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: v288-ripple-animation 0.6s ease-out;
}

@keyframes v288-ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Carousel styles */
.v288-carousel {
  position: relative;
  width: 100%;
  height: 20rem;
  margin: 2rem 0;
  border-radius: var(--v288-radius);
  overflow: hidden;
}

.v288-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.v288-slide.v288-active {
  opacity: 1;
}

.v288-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.v288-carousel-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.v288-carousel-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--v288-transition);
}

.v288-carousel-dot.v288-active {
  background: var(--v288-accent);
}

/* Game grid styles */
.v288-games-section {
  margin: 3rem 0;
}

.v288-section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--v288-light);
  margin-bottom: 2rem;
  text-align: center;
}

.v288-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.v288-game-item {
  background: var(--v288-dark);
  border-radius: var(--v288-radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--v288-transition);
  border: 1px solid var(--v288-border);
  min-height: 4.4rem;
}

.v288-game-item:hover {
  background: var(--v288-primary);
  transform: translateY(-5px);
  box-shadow: 0 5px 20px var(--v288-shadow);
}

.v288-game-img {
  width: 100%;
  height: 6rem;
  object-fit: cover;
  border-radius: var(--v288-radius);
  margin-bottom: 0.8rem;
}

.v288-game-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--v288-text);
  line-height: 1.3;
}

/* Card styles */
.v288-card {
  background: var(--v288-dark);
  border-radius: var(--v288-radius);
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--v288-border);
  box-shadow: 0 2px 10px var(--v288-shadow);
}

.v288-card-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--v288-light);
  margin-bottom: 1.5rem;
}

.v288-card-content {
  color: var(--v288-text);
  line-height: 1.6;
}

/* Footer styles */
.v288-footer {
  background: var(--v288-dark);
  border-top: 1px solid var(--v288-border);
  padding: 3rem 0 10rem;
  margin-top: auto;
}

.v288-footer-content {
  text-align: center;
}

.v288-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.v288-footer-links a {
  color: var(--v288-text);
  text-decoration: none;
  font-size: 1.4rem;
  transition: var(--v288-transition);
}

.v288-footer-links a:hover {
  color: var(--v288-accent);
}

.v288-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.v288-partner-img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--v288-transition);
}

.v288-partner-img:hover {
  opacity: 1;
}

.v288-copyright {
  font-size: 1.2rem;
  color: var(--v288-secondary);
  margin-top: 2rem;
}

/* Bottom navigation */
.v288-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--v288-gradient);
  border-top: 1px solid var(--v288-border);
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--v288-shadow);
}

.v288-bottom-nav-content {
  display: flex;
  justify-content: space-around;
  padding: 0.8rem 0;
  max-width: 430px;
  margin: 0 auto;
}

.v288-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--v288-secondary);
  transition: var(--v288-transition);
  padding: 0.5rem;
  border-radius: var(--v288-radius);
  min-width: 4.4rem;
  min-height: 4.4rem;
  justify-content: center;
}

.v288-nav-item:hover,
.v288-nav-item.v288-active {
  color: var(--v288-accent);
  background: rgba(255, 255, 255, 0.1);
}

.v288-nav-item.v288-clicked {
  transform: scale(0.95);
}

.v288-nav-icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

.v288-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Utility classes */
.v288-text-center { text-align: center; }
.v288-text-left { text-align: left; }
.v288-text-right { text-align: right; }
.v288-hidden { display: none; }
.v288-visible { display: block; }

.v288-mt-1 { margin-top: 1rem; }
.v288-mt-2 { margin-top: 2rem; }
.v288-mt-3 { margin-top: 3rem; }
.v288-mb-1 { margin-bottom: 1rem; }
.v288-mb-2 { margin-bottom: 2rem; }
.v288-mb-3 { margin-bottom: 3rem; }

.v288-p-1 { padding: 1rem; }
.v288-p-2 { padding: 2rem; }
.v288-p-3 { padding: 3rem; }

/* Responsive adjustments */
@media (min-width: 768px) {
  .v288-container {
    max-width: 768px;
  }
  
  .v288-games-grid {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }
  
  .v288-bottom-nav {
    display: none;
  }
  
  .v288-main {
    padding-bottom: 3rem;
  }
}

/* Lazy loading styles */
.v288-lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.v288-lazy.loaded {
  opacity: 1;
}

/* Loading animation */
.v288-loading {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--v288-border);
  border-radius: 50%;
  border-top-color: var(--v288-accent);
  animation: v288-spin 1s ease-in-out infinite;
}

@keyframes v288-spin {
  to { transform: rotate(360deg); }
}

/* Accessibility improvements */
.v288-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for better accessibility */
.v288-btn:focus,
.v288-nav-item:focus,
.v288-game-item:focus {
  outline: 2px solid var(--v288-accent);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --v288-text: #ffffff;
    --v288-border: #ffffff;
    --v288-shadow: rgba(255, 255, 255, 0.3);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .v288-header,
  .v288-bottom-nav,
  .v288-mobile-menu {
    display: none;
  }
  
  .v288-main {
    padding: 0;
  }
  
  .v288-card {
    break-inside: avoid;
  }
}