/**
 * XOPlay PH Theme CSS
 * Mobile-first gaming platform for Philippine market
 */

/* CSS Variables - Color Palette */
:root {
  --v7d7-primary: #1C2833;
  --v7d7-secondary: #FFD700;
  --v7d7-accent: #FFCCCB;
  --v7d7-light: #CCCCCC;
  --v7d7-dark: #0B0B0B;
  --v7d7-success: #28A745;
  --v7d7-warning: #FFC107;
  --v7d7-danger: #DC3545;
  --v7d7-info: #17A2B8;

  /* Typography */
  --v7d7-font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --v7d7-font-secondary: Arial, Helvetica, sans-serif;

  /* Spacing */
  --v7d7-spacing-xs: 0.5rem;
  --v7d7-spacing-sm: 1rem;
  --v7d7-spacing-md: 1.5rem;
  --v7d7-spacing-lg: 2rem;
  --v7d7-spacing-xl: 3rem;

  /* Border Radius */
  --v7d7-border-radius: 8px;
  --v7d7-border-radius-sm: 4px;
  --v7d7-border-radius-lg: 12px;

  /* Shadows */
  --v7d7-shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --v7d7-shadow-md: 0 4px 8px rgba(0,0,0,0.15);
  --v7d7-shadow-lg: 0 8px 16px rgba(0,0,0,0.2);

  /* Transitions */
  --v7d7-transition: all 0.3s ease;
  --v7d7-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(--v7d7-font-primary);
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--v7d7-light);
  background-color: var(--v7d7-primary);
  overflow-x: hidden;
}

/* Typography */
.v7d7-h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--v7d7-secondary);
  margin-bottom: var(--v7d7-spacing-md);
  line-height: 1.3;
}

.v7d7-h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--v7d7-secondary);
  margin-bottom: var(--v7d7-spacing-sm);
  line-height: 1.4;
}

.v7d7-h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--v7d7-accent);
  margin-bottom: var(--v7d7-spacing-sm);
  line-height: 1.4;
}

.v7d7-p {
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--v7d7-light);
  margin-bottom: var(--v7d7-spacing-sm);
}

.v7d7-small {
  font-size: 1.2rem;
  color: var(--v7d7-light);
  opacity: 0.8;
}

/* Layout Components */
.v7d7-container {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 var(--v7d7-spacing-sm);
}

.v7d7-wrapper {
  min-height: 100vh;
  padding-bottom: 8rem; /* Space for bottom nav */
}

.v7d7-grid {
  display: grid;
  gap: var(--v7d7-spacing-sm);
}

.v7d7-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.v7d7-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.v7d7-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.v7d7-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v7d7-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.v7d7-flex-col {
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.v7d7-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--v7d7-primary) 0%, #2C3E50 100%);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: var(--v7d7-spacing-xs) var(--v7d7-spacing-sm);
  box-shadow: var(--v7d7-shadow-md);
}

.v7d7-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 43rem;
  margin: 0 auto;
}

.v7d7-logo {
  display: flex;
  align-items: center;
  gap: var(--v7d7-spacing-xs);
  text-decoration: none;
  color: var(--v7d7-secondary);
  font-weight: 700;
  font-size: 1.8rem;
}

.v7d7-logo img {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--v7d7-border-radius-sm);
}

.v7d7-header-actions {
  display: flex;
  align-items: center;
  gap: var(--v7d7-spacing-xs);
}

/* Button Styles */
.v7d7-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: var(--v7d7-border-radius);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--v7d7-transition);
  min-height: 4.4rem; /* Touch-friendly */
  min-width: 8rem;
}

.v7d7-btn-primary {
  background: linear-gradient(135deg, var(--v7d7-secondary) 0%, #FFA500 100%);
  color: var(--v7d7-primary);
  box-shadow: var(--v7d7-shadow-sm);
}

.v7d7-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--v7d7-shadow-md);
}

.v7d7-btn-secondary {
  background: transparent;
  color: var(--v7d7-secondary);
  border: 2px solid var(--v7d7-secondary);
}

.v7d7-btn-secondary:hover {
  background: var(--v7d7-secondary);
  color: var(--v7d7-primary);
}

.v7d7-btn-ghost {
  background: transparent;
  color: var(--v7d7-light);
  border: 1px solid var(--v7d7-light);
}

.v7d7-btn-ghost:hover {
  background: var(--v7d7-light);
  color: var(--v7d7-primary);
}

/* Mobile Menu */
.v7d7-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--v7d7-secondary);
  font-size: 2.4rem;
  cursor: pointer;
  padding: var(--v7d7-spacing-xs);
  border-radius: var(--v7d7-border-radius-sm);
  transition: var(--v7d7-transition);
}

.v7d7-menu-toggle:hover {
  background: rgba(255, 215, 0, 0.1);
}

.v7d7-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 30rem;
  height: 100vh;
  background: linear-gradient(135deg, var(--v7d7-primary) 0%, #2C3E50 100%);
  backdrop-filter: blur(20px);
  z-index: 9999;
  transition: var(--v7d7-transition);
  padding: var(--v7d7-spacing-md);
  overflow-y: auto;
}

.v7d7-mobile-menu.active {
  right: 0;
}

.v7d7-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(--v7d7-transition);
}

.v7d7-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.v7d7-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--v7d7-spacing-lg);
  padding-bottom: var(--v7d7-spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.v7d7-menu-close {
  background: none;
  border: none;
  color: var(--v7d7-light);
  font-size: 2rem;
  cursor: pointer;
  padding: var(--v7d7-spacing-xs);
  border-radius: var(--v7d7-border-radius-sm);
  transition: var(--v7d7-transition);
}

.v7d7-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.v7d7-menu-nav {
  list-style: none;
}

.v7d7-menu-nav li {
  margin-bottom: var(--v7d7-spacing-sm);
}

.v7d7-menu-nav a {
  display: block;
  padding: var(--v7d7-spacing-sm);
  color: var(--v7d7-light);
  text-decoration: none;
  border-radius: var(--v7d7-border-radius-sm);
  transition: var(--v7d7-transition);
}

.v7d7-menu-nav a:hover {
  background: rgba(255, 215, 0, 0.1);
  color: var(--v7d7-secondary);
}

/* Carousel */
.v7d7-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--v7d7-border-radius-lg);
  margin: var(--v7d7-spacing-md) 0;
  box-shadow: var(--v7d7-shadow-lg);
}

.v7d7-carousel-container {
  display: flex;
  transition: transform 0.5s ease;
}

.v7d7-carousel-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}

.v7d7-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.v7d7-carousel-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--v7d7-spacing-sm);
  pointer-events: none;
}

.v7d7-carousel-btn {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  pointer-events: all;
  transition: var(--v7d7-transition);
}

.v7d7-carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.v7d7-carousel-indicators {
  position: absolute;
  bottom: var(--v7d7-spacing-sm);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--v7d7-spacing-xs);
}

.v7d7-carousel-indicator {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--v7d7-transition);
}

.v7d7-carousel-indicator.active {
  background: var(--v7d7-secondary);
  transform: scale(1.2);
}

/* Game Cards */
.v7d7-game-card {
  background: linear-gradient(135deg, #2C3E50 0%, var(--v7d7-primary) 100%);
  border-radius: var(--v7d7-border-radius);
  padding: var(--v7d7-spacing-sm);
  text-align: center;
  cursor: pointer;
  transition: var(--v7d7-transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v7d7-game-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--v7d7-shadow-md);
  border-color: var(--v7d7-secondary);
}

.v7d7-game-icon {
  width: 100%;
  height: auto;
  border-radius: var(--v7d7-border-radius-sm);
  margin-bottom: var(--v7d7-spacing-xs);
}

.v7d7-game-title {
  font-size: 1.2rem;
  color: var(--v7d7-light);
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Section Styles */
.v7d7-section {
  margin: var(--v7d7-spacing-lg) 0;
  padding: var(--v7d7-spacing-md);
  background: rgba(44, 62, 80, 0.3);
  border-radius: var(--v7d7-border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v7d7-section-title {
  font-size: 2rem;
  color: var(--v7d7-secondary);
  margin-bottom: var(--v7d7-spacing-md);
  text-align: center;
  position: relative;
}

.v7d7-section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 5rem;
  height: 0.2rem;
  background: var(--v7d7-secondary);
  border-radius: 0.1rem;
}

/* Bottom Navigation */
.v7d7-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--v7d7-primary) 0%, #2C3E50 100%);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: var(--v7d7-spacing-xs) 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.v7d7-bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 43rem;
  margin: 0 auto;
}

.v7d7-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 5.6rem;
  padding: var(--v7d7-spacing-xs);
  cursor: pointer;
  transition: var(--v7d7-transition);
  border-radius: var(--v7d7-border-radius-sm);
  text-decoration: none;
  color: var(--v7d7-light);
}

.v7d7-bottom-nav-item:hover,
.v7d7-bottom-nav-item.active {
  background: rgba(255, 215, 0, 0.1);
  color: var(--v7d7-secondary);
  transform: translateY(-2px);
}

.v7d7-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
  transition: var(--v7d7-transition);
}

.v7d7-bottom-nav-label {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* Footer */
.v7d7-footer {
  background: linear-gradient(135deg, var(--v7d7-primary) 0%, #0B0B0B 100%);
  padding: var(--v7d7-spacing-lg) var(--v7d7-spacing-sm) 10rem; /* Extra padding for bottom nav */
  margin-top: var(--v7d7-spacing-xl);
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.v7d7-footer-content {
  max-width: 43rem;
  margin: 0 auto;
}

.v7d7-footer-section {
  margin-bottom: var(--v7d7-spacing-lg);
}

.v7d7-footer-title {
  font-size: 1.8rem;
  color: var(--v7d7-secondary);
  margin-bottom: var(--v7d7-spacing-sm);
}

.v7d7-footer-links {
  list-style: none;
}

.v7d7-footer-links li {
  margin-bottom: var(--v7d7-spacing-xs);
}

.v7d7-footer-links a {
  color: var(--v7d7-light);
  text-decoration: none;
  transition: var(--v7d7-transition);
}

.v7d7-footer-links a:hover {
  color: var(--v7d7-secondary);
}

.v7d7-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v7d7-spacing-sm);
  margin: var(--v7d7-spacing-md) 0;
}

.v7d7-partner-logo {
  width: 4.8rem;
  height: 4.8rem;
  object-fit: contain;
  filter: grayscale(0.3) brightness(0.8);
  transition: var(--v7d7-transition);
}

.v7d7-partner-logo:hover {
  filter: none;
  transform: scale(1.1);
}

.v7d7-footer-bottom {
  text-align: center;
  padding-top: var(--v7d7-spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--v7d7-light);
  opacity: 0.7;
}

/* Utility Classes */
.v7d7-text-center {
  text-align: center;
}

.v7d7-text-left {
  text-align: left;
}

.v7d7-text-right {
  text-align: right;
}

.v7d7-mt-1 { margin-top: var(--v7d7-spacing-xs); }
.v7d7-mt-2 { margin-top: var(--v7d7-spacing-sm); }
.v7d7-mt-3 { margin-top: var(--v7d7-spacing-md); }
.v7d7-mt-4 { margin-top: var(--v7d7-spacing-lg); }

.v7d7-mb-1 { margin-bottom: var(--v7d7-spacing-xs); }
.v7d7-mb-2 { margin-bottom: var(--v7d7-spacing-sm); }
.v7d7-mb-3 { margin-bottom: var(--v7d7-spacing-md); }
.v7d7-mb-4 { margin-bottom: var(--v7d7-spacing-lg); }

.v7d7-pt-1 { padding-top: var(--v7d7-spacing-xs); }
.v7d7-pt-2 { padding-top: var(--v7d7-spacing-sm); }
.v7d7-pt-3 { padding-top: var(--v7d7-spacing-md); }
.v7d7-pt-4 { padding-top: var(--v7d7-spacing-lg); }

.v7d7-pb-1 { padding-bottom: var(--v7d7-spacing-xs); }
.v7d7-pb-2 { padding-bottom: var(--v7d7-spacing-sm); }
.v7d7-pb-3 { padding-bottom: var(--v7d7-spacing-md); }
.v7d7-pb-4 { padding-bottom: var(--v7d7-spacing-lg); }

.v7d7-hidden {
  display: none !important;
}

.v7d7-visible {
  display: block !important;
}

/* Loading States */
.v7d7-loading {
  opacity: 0.6;
  pointer-events: none;
}

.v7d7-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 0.2rem solid var(--v7d7-light);
  border-top: 0.2rem solid var(--v7d7-secondary);
  border-radius: 50%;
  animation: v7d7-spin 1s linear infinite;
}

@keyframes v7d7-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes v7d7-fadeIn {
  from { opacity: 0; transform: translateY(2rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes v7d7-slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes v7d7-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-1rem); }
  60% { transform: translateY(-0.5rem); }
}

.v7d7-fade-in {
  animation: v7d7-fadeIn 0.6s ease-out;
}

.v7d7-slide-in {
  animation: v7d7-slideIn 0.3s ease-out;
}

.v7d7-bounce {
  animation: v7d7-bounce 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .v7d7-menu-toggle {
    display: block;
  }

  .v7d7-header-actions .v7d7-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1.2rem;
    min-height: 3.8rem;
  }

  .v7d7-h1 {
    font-size: 2rem;
  }

  .v7d7-h2 {
    font-size: 1.8rem;
  }

  .v7d7-game-card {
    padding: var(--v7d7-spacing-xs);
  }

  .v7d7-bottom-nav {
    display: block;
  }

  .v7d7-wrapper {
    padding-bottom: 8rem;
  }
}

@media (min-width: 769px) {
  .v7d7-bottom-nav {
    display: none;
  }

  .v7d7-wrapper {
    padding-bottom: 0;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --v7d7-primary: #000000;
    --v7d7-secondary: #FFFF00;
    --v7d7-accent: #FF0000;
    --v7d7-light: #FFFFFF;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States for Accessibility */
.v7d7-btn:focus,
.v7d7-menu-toggle:focus,
.v7d7-menu-nav a:focus,
.v7d7-bottom-nav-item:focus {
  outline: 2px solid var(--v7d7-secondary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .v7d7-header,
  .v7d7-bottom-nav,
  .v7d7-carousel-controls,
  .v7d7-carousel-indicators {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}