/* 9apisoph-click Styles with unique v1a2- prefix */
/* All classes use v1a2- prefix to avoid conflicts */

/* CSS Variables for consistent theming */
:root {
  /* Color palette: Salmon, Crimson, Peach, Dark Blue, Light Pink */
  --v1a2-primary: #FA8072;
  --v1a2-secondary: #DC143C;
  --v1a2-accent: #FFDFBA;
  --v1a2-dark: #2E4057;
  --v1a2-light: #FFB3FF;

  /* Background and text colors */
  --v1a2-bg-primary: #2E4057;
  --v1a2-bg-secondary: #1a2332;
  --v1a2-bg-card: rgba(46, 64, 87, 0.9);
  --v1a2-text-primary: #FFDFBA;
  --v1a2-text-secondary: #FFB3FF;
  --v1a2-text-muted: #FA8072;

  /* Spacing and sizing */
  --v1a2-header-height: 60px;
  --v1a2-bottom-nav-height: 64px;
  --v1a2-container-padding: 1rem;
  --v1a2-border-radius: 12px;
  --v1a2-border-radius-sm: 6px;

  /* Typography */
  --v1a2-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --v1a2-font-size-base: 1.6rem;
  --v1a2-line-height: 1.5;

  /* Transitions */
  --v1a2-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --v1a2-transition-fast: all 0.15s ease;
}

/* 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: var(--v1a2-font-family);
  font-size: var(--v1a2-font-size-base);
  line-height: var(--v1a2-line-height);
  background: linear-gradient(135deg, var(--v1a2-bg-primary) 0%, var(--v1a2-bg-secondary) 100%);
  color: var(--v1a2-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container and layout */
.v1a2-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 var(--v1a2-container-padding);
}

.v1a2-wrapper {
  padding-top: var(--v1a2-header-height);
  padding-bottom: var(--v1a2-bottom-nav-height);
}

/* Header styles */
.v1a2-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--v1a2-header-height);
  background: linear-gradient(90deg, var(--v1a2-bg-card) 0%, rgba(220, 20, 60, 0.8) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--v1a2-primary);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.v1a2-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--v1a2-text-primary);
  text-decoration: none;
}

.v1a2-logo img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.v1a2-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.v1a2-btn {
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: var(--v1a2-border-radius-sm);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--v1a2-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* Touch-friendly size */
  white-space: nowrap;
}

.v1a2-btn-primary {
  background: linear-gradient(135deg, var(--v1a2-secondary) 0%, var(--v1a2-primary) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.v1a2-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
}

.v1a2-btn-secondary {
  background: transparent;
  color: var(--v1a2-text-primary);
  border: 2px solid var(--v1a2-primary);
}

.v1a2-btn-secondary:hover {
  background: var(--v1a2-primary);
  color: var(--v1a2-bg-primary);
}

.v1a2-menu-toggle {
  background: none;
  border: none;
  color: var(--v1a2-text-primary);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--v1a2-border-radius-sm);
  transition: var(--v1a2-transition);
}

.v1a2-menu-toggle:hover {
  background: rgba(250, 128, 114, 0.2);
}

/* Mobile menu styles */
.v1a2-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--v1a2-bg-card);
  backdrop-filter: blur(20px);
  z-index: 9999;
  transition: var(--v1a2-transition);
  padding: 2rem;
  overflow-y: auto;
}

.v1a2-mobile-menu.active {
  right: 0;
}

.v1a2-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(--v1a2-transition);
}

.v1a2-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.v1a2-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--v1a2-text-primary);
  font-size: 2.4rem;
  cursor: pointer;
}

.v1a2-menu-nav {
  list-style: none;
  margin-top: 3rem;
}

.v1a2-menu-nav li {
  margin-bottom: 1rem;
}

.v1a2-menu-nav a {
  color: var(--v1a2-text-primary);
  text-decoration: none;
  font-size: 1.6rem;
  padding: 1rem;
  display: block;
  border-radius: var(--v1a2-border-radius-sm);
  transition: var(--v1a2-transition);
}

.v1a2-menu-nav a:hover {
  background: rgba(250, 128, 114, 0.2);
  color: var(--v1a2-light);
}

/* Carousel styles */
.v1a2-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--v1a2-border-radius);
  margin: 1rem 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.v1a2-carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.v1a2-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  cursor: pointer;
}

.v1a2-carousel-slide.active {
  opacity: 1;
}

.v1a2-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v1a2-carousel-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.v1a2-carousel-prev,
.v1a2-carousel-next {
  background: rgba(46, 64, 87, 0.8);
  border: none;
  color: var(--v1a2-text-primary);
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--v1a2-transition);
  pointer-events: all;
}

.v1a2-carousel-prev:hover,
.v1a2-carousel-next:hover {
  background: var(--v1a2-primary);
}

.v1a2-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.v1a2-carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 223, 186, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--v1a2-transition);
}

.v1a2-carousel-indicator.active {
  background: var(--v1a2-text-primary);
  transform: scale(1.2);
}

/* Card styles */
.v1a2-card {
  background: var(--v1a2-bg-card);
  border-radius: var(--v1a2-border-radius);
  padding: 1.5rem;
  margin: 1rem 0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(250, 128, 114, 0.2);
  transition: var(--v1a2-transition);
}

.v1a2-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(250, 128, 114, 0.2);
}

.v1a2-card-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--v1a2-text-primary);
  margin-bottom: 1rem;
}

.v1a2-card-content {
  color: var(--v1a2-text-secondary);
  line-height: var(--v1a2-line-height);
}

/* Grid layouts */
.v1a2-grid {
  display: grid;
  gap: 1rem;
}

.v1a2-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.v1a2-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.v1a2-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Game grid styles */
.v1a2-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}

.v1a2-game-item {
  background: var(--v1a2-bg-card);
  border-radius: var(--v1a2-border-radius-sm);
  padding: 0.8rem;
  text-align: center;
  transition: var(--v1a2-transition);
  cursor: pointer;
  border: 1px solid rgba(250, 128, 114, 0.1);
}

.v1a2-game-item:hover {
  transform: scale(1.05);
  border-color: var(--v1a2-primary);
  box-shadow: 0 4px 15px rgba(250, 128, 114, 0.3);
}

.v1a2-game-item img {
  width: 100%;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  border-radius: var(--v1a2-border-radius-sm);
}

.v1a2-game-item-name {
  font-size: 1.2rem;
  color: var(--v1a2-text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Section styles */
.v1a2-section {
  margin: 2rem 0;
  padding: 0 1rem;
}

.v1a2-section-title {
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--v1a2-text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.v1a2-section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--v1a2-primary), var(--v1a2-secondary));
  border-radius: 2px;
}

/* Bottom navigation */
.v1a2-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--v1a2-bottom-nav-height);
  background: linear-gradient(90deg, var(--v1a2-bg-card) 0%, rgba(220, 20, 60, 0.9) 100%);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--v1a2-primary);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
}

.v1a2-bottom-nav-item {
  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(--v1a2-text-muted);
  transition: var(--v1a2-transition);
  border-radius: var(--v1a2-border-radius-sm);
  cursor: pointer;
}

.v1a2-bottom-nav-item:hover,
.v1a2-bottom-nav-item.active {
  color: var(--v1a2-text-primary);
  background: rgba(250, 128, 114, 0.2);
  transform: translateY(-2px);
}

.v1a2-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
}

.v1a2-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer styles */
.v1a2-footer {
  background: var(--v1a2-bg-secondary);
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--v1a2-primary);
}

.v1a2-footer-content {
  text-align: center;
}

.v1a2-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.v1a2-footer-links a {
  color: var(--v1a2-text-primary);
  text-decoration: none;
  font-size: 1.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--v1a2-border-radius-sm);
  transition: var(--v1a2-transition);
}

.v1a2-footer-links a:hover {
  background: rgba(250, 128, 114, 0.2);
}

.v1a2-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.v1a2-partner-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--v1a2-transition);
}

.v1a2-partner-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.v1a2-copyright {
  color: var(--v1a2-text-muted);
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .v1a2-bottom-nav {
    display: flex;
  }

  .v1a2-wrapper {
    padding-bottom: var(--v1a2-bottom-nav-height);
  }
}

@media (min-width: 769px) {
  .v1a2-bottom-nav {
    display: none;
  }

  .v1a2-wrapper {
    padding-bottom: 0;
  }
}

/* Utility classes */
.v1a2-text-center { text-align: center; }
.v1a2-text-left { text-align: left; }
.v1a2-text-right { text-align: right; }

.v1a2-mb-1 { margin-bottom: 1rem; }
.v1a2-mb-2 { margin-bottom: 2rem; }
.v1a2-mb-3 { margin-bottom: 3rem; }

.v1a2-mt-1 { margin-top: 1rem; }
.v1a2-mt-2 { margin-top: 2rem; }
.v1a2-mt-3 { margin-top: 3rem; }

.v1a2-p-1 { padding: 1rem; }
.v1a2-p-2 { padding: 2rem; }
.v1a2-p-3 { padding: 3rem; }

/* Animation keyframes */
@keyframes v1a2-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes v1a2-slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes v1a2-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Apply animations */
.v1a2-fade-in {
  animation: v1a2-fadeIn 0.6s ease-out;
}

.v1a2-slide-in-right {
  animation: v1a2-slideInRight 0.3s ease-out;
}

.v1a2-pulse {
  animation: v1a2-pulse 2s infinite;
}

/* Loading states */
.v1a2-loading {
  position: relative;
  pointer-events: none;
}

.v1a2-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--v1a2-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: v1a2-spin 1s linear infinite;
}

@keyframes v1a2-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Focus styles for accessibility */
.v1a2-btn:focus,
.v1a2-menu-toggle:focus,
.v1a2-carousel-prev:focus,
.v1a2-carousel-next:focus,
.v1a2-bottom-nav-item:focus,
.v1a2-menu-nav a:focus {
  outline: 2px solid var(--v1a2-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --v1a2-bg-primary: #000;
    --v1a2-bg-secondary: #111;
    --v1a2-text-primary: #fff;
    --v1a2-text-secondary: #ddd;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}