/* PH333 SBS Core CSS Framework with v595- class prefixes */
/* Color Scheme: #2C2C2C (background), #EE82EE (text) */
/* Image hash prefix: 33559517 */

/* CSS Variables */
:root {
  --v595-primary: #EE82EE;
  --v595-secondary: #DA70D6;
  --v595-accent: #BA55D3;
  --v595-background: #2C2C2C;
  --v595-dark: #1C1C1C;
  --v595-light: #3C3C3C;
  --v595-text-primary: #FFFFFF;
  --v595-text-secondary: #E0E0E0;
  --v595-text-muted: #B0B0B0;
  --v595-border: #4C4C4C;
  --v595-shadow: rgba(238, 130, 238, 0.3);
  --v595-gradient-primary: linear-gradient(135deg, #EE82EE, #DA70D6);
  --v595-gradient-secondary: linear-gradient(135deg, #DA70D6, #BA55D3);
  --v595-gradient-dark: linear-gradient(135deg, #2C2C2C, #1C1C1C);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--v595-background);
  color: var(--v595-text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* Container System */
.v595-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.v595-container {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.v595-section {
  padding: 20px 0;
}

/* Header Styles */
.v595-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--v595-gradient-dark);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--v595-border);
  z-index: 1000;
  height: 60px;
}

.v595-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
}

.v595-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--v595-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.v595-logo img {
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 6px;
}

.v595-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Menu Toggle */
.v595-menu-toggle {
  display: block;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 6px;
}

.v595-menu-bar {
  width: 20px;
  height: 2px;
  background-color: var(--v595-primary);
  transition: all 0.3s ease;
  border-radius: 1px;
}

.v595-menu-toggle-active .v595-menu-bar:nth-child(1) {
  transform: rotate(-45deg) translate(-3px, 3px);
}

.v595-menu-toggle-active .v595-menu-bar:nth-child(2) {
  opacity: 0;
}

.v595-menu-toggle-active .v595-menu-bar:nth-child(3) {
  transform: rotate(45deg) translate(-3px, -3px);
}

/* Navigation Menu */
.v595-nav-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--v595-dark);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  border-bottom: 1px solid var(--v595-border);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.v595-nav-menu-active {
  transform: translateY(0);
}

.v595-nav-item {
  display: block;
  padding: 16px 20px;
  color: var(--v595-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--v595-border);
  transition: all 0.3s ease;
}

.v595-nav-item:hover {
  background-color: var(--v595-light);
  color: var(--v595-primary);
}

/* Button Styles */
.v595-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  gap: 8px;
  min-height: 36px;
}

.v595-btn-primary {
  background: var(--v595-gradient-primary);
  color: white;
  box-shadow: 0 2px 8px var(--v595-shadow);
}

.v595-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--v595-shadow);
}

.v595-btn-secondary {
  background: transparent;
  color: var(--v595-primary);
  border: 1px solid var(--v595-primary);
}

.v595-btn-secondary:hover {
  background: var(--v595-primary);
  color: white;
}

.v595-btn-accent {
  background: var(--v595-gradient-secondary);
  color: white;
}

.v595-btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  min-height: 32px;
}

.v595-btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
  min-height: 44px;
}

/* Card Styles */
.v595-card {
  background: var(--v595-light);
  border: 1px solid var(--v595-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.v595-card-title {
  color: var(--v595-primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

/* Typography */
.v595-title {
  color: var(--v595-primary);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.v595-subtitle {
  color: var(--v595-text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.v595-text-center {
  text-align: center;
}

.v595-text-primary {
  color: var(--v595-primary);
}

.v595-text-secondary {
  color: var(--v595-text-secondary);
}

.v595-text-muted {
  color: var(--v595-text-muted);
}

/* Game Grid */
.v595-games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.v595-game-card {
  background: var(--v595-dark);
  border: 1px solid var(--v595-border);
  border-radius: 8px;
  padding: 8px;
  text-decoration: none;
  color: var(--v595-text-primary);
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.v595-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--v595-shadow);
  border-color: var(--v595-primary);
}

.v595-game-icon {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  margin-bottom: 8px;
  object-fit: cover;
}

.v595-game-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* Carousel Styles */
.v595-carousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.v595-slide {
  display: none;
  width: 100%;
}

.v595-slide-active {
  display: block;
}

.v595-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.v595-carousel-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.v595-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.v595-indicator-active {
  background: var(--v595-primary);
  transform: scale(1.2);
}

/* Footer Styles */
.v595-footer {
  background: var(--v595-dark);
  border-top: 1px solid var(--v595-border);
  padding: 20px 0;
  margin-top: auto;
}

.v595-footer-content {
  text-align: center;
}

.v595-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.v595-footer-link {
  color: var(--v595-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.v595-footer-link:hover {
  color: var(--v595-primary);
}

.v595-copyright {
  color: var(--v595-text-muted);
  font-size: 0.8rem;
}

/* Bottom Navigation */
.v595-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--v595-dark);
  border-top: 1px solid var(--v595-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 999;
}

.v595-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--v595-text-muted);
  font-size: 0.7rem;
  transition: all 0.3s ease;
  padding: 4px 8px;
  min-width: 60px;
}

.v595-bottom-nav-item:hover,
.v595-bottom-nav-item.active {
  color: var(--v595-primary);
}

.v595-bottom-nav-icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

/* Form Styles */
.v595-form-group {
  margin-bottom: 16px;
}

.v595-label {
  display: block;
  color: var(--v595-text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.v595-input,
.v595-select,
.v595-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--v595-background);
  border: 1px solid var(--v595-border);
  border-radius: 6px;
  color: var(--v595-text-primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.v595-input:focus,
.v595-select:focus,
.v595-textarea:focus {
  outline: none;
  border-color: var(--v595-primary);
  box-shadow: 0 0 0 2px var(--v595-shadow);
}

.v595-field-error {
  border-color: #ff4444;
  box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.3);
}

/* Utility Classes */
.v595-hidden {
  display: none;
}

.v595-visible {
  display: block;
}

.v595-flex {
  display: flex;
}

.v595-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.v595-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v595-grid {
  display: grid;
}

.v595-gap-sm {
  gap: 8px;
}

.v595-gap-md {
  gap: 16px;
}

.v595-gap-lg {
  gap: 24px;
}

.v595-mb-sm {
  margin-bottom: 8px;
}

.v595-mb-md {
  margin-bottom: 16px;
}

.v595-mb-lg {
  margin-bottom: 24px;
}

.v595-mt-sm {
  margin-top: 8px;
}

.v595-mt-md {
  margin-top: 16px;
}

.v595-mt-lg {
  margin-top: 24px;
}

.v595-p-sm {
  padding: 8px;
}

.v595-p-md {
  padding: 16px;
}

.v595-p-lg {
  padding: 24px;
}

.v595-rounded {
  border-radius: 8px;
}

.v595-rounded-lg {
  border-radius: 12px;
}

.v595-shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.v595-shadow-lg {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Loading and Animation */
.v595-loading {
  position: relative;
  overflow: hidden;
}

.v595-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--v595-shadow), transparent);
  animation: v595-loading 1.5s infinite;
}

@keyframes v595-loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.v595-fade-in {
  animation: v595-fade-in 0.5s ease-in;
}

@keyframes v595-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 375px) {
  .v595-container {
    padding: 0 12px;
  }
  
  .v595-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .v595-game-icon {
    width: 50px;
    height: 50px;
  }
  
  .v595-btn-lg {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media (min-width: 431px) {
  .v595-container {
    max-width: 430px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --v595-border: #666666;
    --v595-text-muted: #CCCCCC;
  }
}

/* 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 {
  .v595-header,
  .v595-bottom-nav,
  .v595-menu-toggle {
    display: none;
  }
  
  .v595-wrapper {
    margin-top: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* Menu open state body lock */
.v595-menu-open {
  overflow: hidden;
}

/* Focus styles for accessibility */
.v595-btn:focus,
.v595-nav-item:focus,
.v595-bottom-nav-item:focus,
.v595-game-card:focus {
  outline: 2px solid var(--v595-primary);
  outline-offset: 2px;
}

/* Lazy loading images */
.v595-lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.v595-lazy.loaded {
  opacity: 1;
}