/**
 * phSky Layout CSS
 * All classes use v37d- prefix for namespace isolation
 */

/* CSS Variables with v37d prefix */
:root {
  --v37d-primary: #FFE4B5;
  --v37d-secondary: #FAF0E6;
  --v37d-light: #F5F5F5;
  --v37d-dark: #1A1A2E;
  --v37d-cream: #FDF5E6;
  --v37d-accent: #FFCC02;
  --v37d-text-dark: #1A1A2E;
  --v37d-text-light: #FAF0E6;
  --v37d-white: #FFFFFF;
  --v37d-gray: #6B7280;
  --v37d-border: #E5E7EB;
  --v37d-shadow: rgba(0, 0, 0, 0.1);
  --v37d-transition: all 0.3s ease;
}

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--v37d-text-dark);
  background-color: var(--v37d-secondary);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--v37d-transition);
}

/* Container with v37d prefix */
.v37d-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.v37d-wrapper {
  padding-top: 6rem;
  padding-bottom: 8rem;
}

/* Header Styles with v37d prefix */
.v37d-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--v37d-dark) 0%, #2D2D4A 100%);
  padding: 1rem 0;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--v37d-shadow);
}

.v37d-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.v37d-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--v37d-white);
  font-weight: bold;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.v37d-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
}

.v37d-header-actions {
  display: flex;
  gap: 0.8rem;
  flex-shrink: 0;
}

.v37d-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--v37d-transition);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.v37d-btn-primary {
  background: var(--v37d-accent);
  color: var(--v37d-dark);
}

.v37d-btn-primary:hover {
  background: #FFD700;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 204, 2, 0.4);
}

.v37d-btn-secondary {
  background: transparent;
  color: var(--v37d-white);
  border: 2px solid var(--v37d-white);
}

.v37d-btn-secondary:hover {
  background: var(--v37d-white);
  color: var(--v37d-dark);
}

.v37d-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--v37d-white);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: var(--v37d-transition);
}

.v37d-menu-toggle:hover {
  color: var(--v37d-accent);
}

/* Mobile Menu with v37d prefix */
.v37d-mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--v37d-dark);
  z-index: 9999;
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 6rem 1.5rem 2rem;
 pointer-events: none;}

.v37d-mobile-menu.v37d-menu-open {
  left: 0;
 pointer-events: auto;}

.v37d-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--v37d-transition);
}

body.v37d-menu-open .v37d-menu-overlay {
  opacity: 1;
  visibility: visible;
}

.v37d-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--v37d-white);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.v37d-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.v37d-menu-link {
  color: var(--v37d-white);
  padding: 1rem;
  border-radius: 0.6rem;
  transition: var(--v37d-transition);
  font-size: 1.5rem;
}

.v37d-menu-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--v37d-accent);
}

/* Carousel with v37d prefix */
.v37d-carousel {
  position: relative;
  margin-bottom: 2rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--v37d-shadow);
}

.v37d-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.v37d-carousel-slide {
  min-width: 100%;
  position: relative;
}

.v37d-carousel-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.v37d-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--v37d-white);
  padding: 2rem 1.5rem 1rem;
}

/* Content Sections with v37d prefix */
.v37d-section {
  background: var(--v37d-white);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px var(--v37d-shadow);
}

.v37d-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--v37d-dark);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.v37d-section-title::before {
  content: '';
  width: 4px;
  height: 2rem;
  background: var(--v37d-accent);
  border-radius: 2px;
}

.v37d-text {
  margin-bottom: 1rem;
  color: var(--v37d-gray);
  line-height: 1.6;
}

.v37d-link {
  color: var(--v37d-dark);
  font-weight: 600;
  text-decoration: underline;
}

.v37d-link:hover {
  color: var(--v37d-accent);
}

/* Game Grid with v37d prefix */
.v37d-game-category {
  margin-bottom: 2rem;
}

.v37d-category-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--v37d-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.v37d-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.v37d-game-item {
  text-align: center;
  cursor: pointer;
  transition: var(--v37d-transition);
}

.v37d-game-item:hover {
  transform: translateY(-4px);
}

.v37d-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.6rem;
  margin-bottom: 0.4rem;
  background: var(--v37d-light);
  box-shadow: 0 2px 8px var(--v37d-shadow);
}

.v37d-game-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--v37d-text-dark);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Component with v37d prefix */
.v37d-card {
  background: var(--v37d-white);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px var(--v37d-shadow);
  border-left: 4px solid var(--v37d-accent);
}

.v37d-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--v37d-dark);
  margin-bottom: 0.8rem;
}

/* FAQ Component with v37d prefix */
.v37d-faq-item {
  border-bottom: 1px solid var(--v37d-border);
  padding: 1rem 0;
}

.v37d-faq-item:last-child {
  border-bottom: none;
}

.v37d-faq-question {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--v37d-dark);
  margin-bottom: 0.6rem;
}

.v37d-faq-answer {
  font-size: 1.3rem;
  color: var(--v37d-gray);
  line-height: 1.6;
}

/* Bottom Navigation with v37d prefix */
.v37d-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--v37d-dark) 0%, #2D2D4A 100%);
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--v37d-shadow);
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.v37d-bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  color: var(--v37d-white);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--v37d-transition);
  border-radius: 0.6rem;
  padding: 0.5rem;
}

.v37d-bottom-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.v37d-bottom-nav-link.v37d-bottom-nav-active {
  color: var(--v37d-accent);
}

.v37d-bottom-nav-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.v37d-bottom-nav-text {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
}

/* Footer with v37d prefix */
.v37d-footer {
  background: var(--v37d-dark);
  color: var(--v37d-white);
  padding: 2rem 0 8rem;
  margin-top: 2rem;
}

.v37d-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.v37d-footer-link {
  color: var(--v37d-white);
  font-size: 1.2rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  transition: var(--v37d-transition);
}

.v37d-footer-link:hover {
  background: var(--v37d-accent);
  color: var(--v37d-dark);
}

.v37d-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.v37d-partner-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--v37d-transition);
}

.v37d-partner-logo:hover {
  opacity: 1;
}

.v37d-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--v37d-gray);
}

/* Promo Links with v37d prefix */
.v37d-promo-link {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--v37d-accent);
  color: var(--v37d-dark);
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0.5rem 0.5rem 0.5rem 0;
  box-shadow: 0 2px 8px var(--v37d-shadow);
}

.v37d-promo-link:hover {
  background: #FFD700;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 204, 2, 0.4);
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .v37d-header-actions {
    display: none;
  }

  .v37d-menu-toggle {
    display: block;
  }

  .v37d-bottom-nav {
    display: flex;
  }

  .v37d-wrapper {
    padding-bottom: 8rem;
  }
}

@media (min-width: 769px) {
  .v37d-bottom-nav {
    display: none;
  }

  .v37d-wrapper {
    padding-bottom: 2rem;
  }
}

/* Utility Classes with v37d prefix */
.v37d-text-center {
  text-align: center;
}

.v37d-mb-1 {
  margin-bottom: 1rem;
}

.v37d-mb-2 {
  margin-bottom: 2rem;
}

.v37d-mt-1 {
  margin-top: 1rem;
}

.v37d-mt-2 {
  margin-top: 2rem;
}
