/* KING PH CSS Styles - Mobile Gaming Platform */
/* All classes use prefix 'vad8-' for namespace isolation */

/* CSS Variables for consistent theming */
:root {
  --vad8-primary: #FFA500;
  --vad8-primary-dark: #E69500;
  --vad8-primary-light: #FFB733;
  --vad8-bg: #1A1A2E;
  --vad8-bg-light: #2A2A3E;
  --vad8-bg-lighter: #3A3A4E;
  --vad8-text: #FFFFFF;
  --vad8-text-secondary: #CCCCCC;
  --vad8-text-muted: #999999;
  --vad8-accent: #FF6B35;
  --vad8-success: #28A745;
  --vad8-warning: #FFC107;
  --vad8-danger: #DC3545;
  --vad8-info: #17A2B8;
  --vad8-border: #444444;
  --vad8-shadow: rgba(0, 0, 0, 0.3);
  --vad8-gradient: linear-gradient(135deg, #FFA500 0%, #FF6B35 100%);
  --vad8-gradient-dark: linear-gradient(135deg, #E69500 0%, #E55A2B 100%);
}

/* Base styles and reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px for easy calculations */
  scroll-behavior: smooth;
}

body {
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--vad8-text);
  background: var(--vad8-bg);
  overflow-x: hidden;
}

/* Typography */
.vad8-h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--vad8-primary);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.vad8-h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--vad8-primary);
  margin-bottom: 1.2rem;
  line-height: 1.3;
}

.vad8-h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--vad8-text);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.vad8-text {
  color: var(--vad8-text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.vad8-text-small {
  font-size: 1.2rem;
  color: var(--vad8-text-muted);
}

/* Layout containers */
.vad8-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.vad8-wrapper {
  min-height: 100vh;
  padding-bottom: 8rem; /* Space for mobile bottom nav */
}

.vad8-grid {
  display: grid;
  gap: 1.5rem;
}

.vad8-flex {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.vad8-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vad8-flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Header and Navigation */
.vad8-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--vad8-bg);
  border-bottom: 1px solid var(--vad8-border);
  padding: 1rem 0;
}

.vad8-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
}

.vad8-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--vad8-primary);
  text-decoration: none;
}

.vad8-logo-icon {
  width: 2.8rem;
  height: 2.8rem;
  background: var(--vad8-gradient);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.vad8-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Buttons */
.vad8-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 4.4rem; /* Touch-friendly minimum */
  min-width: 6rem;
}

.vad8-btn-primary {
  background: var(--vad8-gradient);
  color: var(--vad8-text);
  box-shadow: 0 2px 8px var(--vad8-shadow);
}

.vad8-btn-primary:hover {
  background: var(--vad8-gradient-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--vad8-shadow);
}

.vad8-btn-secondary {
  background: var(--vad8-bg-light);
  color: var(--vad8-text);
  border: 1px solid var(--vad8-border);
}

.vad8-btn-secondary:hover {
  background: var(--vad8-bg-lighter);
  border-color: var(--vad8-primary);
}

.vad8-btn-outline {
  background: transparent;
  color: var(--vad8-primary);
  border: 2px solid var(--vad8-primary);
}

.vad8-btn-outline:hover {
  background: var(--vad8-primary);
  color: var(--vad8-bg);
}

.vad8-btn-small {
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  min-height: 3.2rem;
}

/* Mobile Menu */
.vad8-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--vad8-bg-light);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.vad8-mobile-menu.active {
  right: 0;
}

.vad8-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.vad8-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.vad8-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--vad8-text);
  font-size: 2.4rem;
  cursor: pointer;
  width: 4.4rem;
  height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vad8-menu-nav {
  margin-top: 3rem;
}

.vad8-menu-item {
  display: block;
  padding: 1.2rem 0;
  color: var(--vad8-text);
  text-decoration: none;
  font-size: 1.6rem;
  border-bottom: 1px solid var(--vad8-border);
  transition: color 0.3s ease;
}

.vad8-menu-item:hover {
  color: var(--vad8-primary);
}

/* Main Content */
.vad8-main {
  margin-top: 6rem; /* Space for fixed header */
  min-height: calc(100vh - 6rem);
}

/* Carousel */
.vad8-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: 2rem;
  height: 18rem;
}

.vad8-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.vad8-carousel-slide.active {
  opacity: 1;
}

.vad8-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vad8-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.vad8-carousel-indicator {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.vad8-carousel-indicator.active {
  background: var(--vad8-primary);
}

/* Game Cards */
.vad8-game-section {
  margin-bottom: 3rem;
}

.vad8-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.vad8-game-card {
  background: var(--vad8-bg-light);
  border-radius: 0.8rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.vad8-game-card:hover {
  border-color: var(--vad8-primary);
  transform: translateY(-2px);
}

.vad8-game-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 0.8rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.vad8-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vad8-game-name {
  font-size: 1.2rem;
  color: var(--vad8-text);
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content Sections */
.vad8-section {
  background: var(--vad8-bg-light);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--vad8-border);
}

.vad8-section-title {
  font-size: 1.8rem;
  color: var(--vad8-primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.vad8-feature-list {
  list-style: none;
}

.vad8-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--vad8-bg);
  border-radius: 0.5rem;
}

.vad8-feature-icon {
  color: var(--vad8-primary);
  font-size: 2rem;
  min-width: 2rem;
}

/* Bottom Navigation */
.vad8-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: var(--vad8-bg-light);
  border-top: 1px solid var(--vad8-border);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
}

.vad8-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--vad8-text-secondary);
}

.vad8-bottom-nav-item:hover,
.vad8-bottom-nav-item.active {
  color: var(--vad8-primary);
  background: rgba(255, 165, 0, 0.1);
  transform: scale(1.05);
}

.vad8-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
}

.vad8-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/* Footer */
.vad8-footer {
  background: var(--vad8-bg-light);
  border-top: 1px solid var(--vad8-border);
  padding: 3rem 0 8rem; /* Extra bottom padding for mobile nav */
  margin-top: 3rem;
}

.vad8-footer-content {
  text-align: center;
}

.vad8-footer-description {
  margin-bottom: 2rem;
  color: var(--vad8-text-secondary);
}

.vad8-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.vad8-footer-link {
  color: var(--vad8-text-secondary);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.vad8-footer-link:hover {
  color: var(--vad8-primary);
}

.vad8-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.vad8-partner-icon {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.vad8-partner-icon:hover {
  opacity: 1;
}

.vad8-copyright {
  color: var(--vad8-text-muted);
  font-size: 1.1rem;
  margin-top: 2rem;
}

/* Scroll to top button */
.vad8-scroll-top {
  position: fixed;
  bottom: 8rem;
  right: 2rem;
  width: 4rem;
  height: 4rem;
  background: var(--vad8-gradient);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.vad8-scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.vad8-scroll-top:hover {
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .vad8-container {
    padding: 0 1rem;
  }

  .vad8-h1 {
    font-size: 2rem;
  }

  .vad8-h2 {
    font-size: 1.8rem;
  }

  .vad8-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: 0.8rem;
  }

  .vad8-game-icon {
    width: 3.5rem;
    height: 3.5rem;
  }

  .vad8-game-name {
    font-size: 1.1rem;
  }

  .vad8-section {
    padding: 1.5rem;
  }

  .vad8-carousel {
    height: 16rem;
  }

  .vad8-bottom-nav {
    height: 5.6rem;
  }

  .vad8-bottom-nav-item {
    min-width: 5rem;
    min-height: 4.5rem;
  }

  .vad8-bottom-nav-icon {
    font-size: 2rem;
  }

  .vad8-bottom-nav-text {
    font-size: 0.9rem;
  }

  .vad8-footer {
    padding-bottom: 7rem;
  }
}

/* Desktop adjustments */
@media (min-width: 769px) {
  .vad8-bottom-nav {
    display: none;
  }

  .vad8-wrapper {
    padding-bottom: 0;
  }

  .vad8-footer {
    padding-bottom: 3rem;
  }
}

/* Utility classes */
.vad8-text-center {
  text-align: center;
}

.vad8-text-left {
  text-align: left;
}

.vad8-text-right {
  text-align: right;
}

.vad8-mb-1 {
  margin-bottom: 1rem;
}

.vad8-mb-2 {
  margin-bottom: 2rem;
}

.vad8-mt-1 {
  margin-top: 1rem;
}

.vad8-mt-2 {
  margin-top: 2rem;
}

.vad8-p-1 {
  padding: 1rem;
}

.vad8-p-2 {
  padding: 2rem;
}

.vad8-hidden {
  display: none;
}

.vad8-visible {
  display: block;
}

/* Animation utilities */
@keyframes vad8-fadeIn {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vad8-fade-in {
  animation: vad8-fadeIn 0.5s ease-out;
}

@keyframes vad8-slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.vad8-slide-in {
  animation: vad8-slideIn 0.3s ease-out;
}

/* 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 */
.vad8-btn:focus,
.vad8-menu-item:focus,
.vad8-bottom-nav-item:focus {
  outline: 2px solid var(--vad8-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --vad8-text: #000000;
    --vad8-bg: #FFFFFF;
    --vad8-primary: #FF6600;
  }
}