/**
 * ph99 - Main Theme Stylesheet
 * All classes use v47c- prefix for namespace isolation
 * Mobile-first responsive design
 * Version: 1.0.0
 */

/* CSS Variables */
:root {
  --v47c-primary: #708090;
  --v47c-secondary: #212F3D;
  --v47c-accent: #FFC0CB;
  --v47c-text-dark: #4A4A4A;
  --v47c-text-light: #BAE1FF;
  --v47c-bg-dark: #212F3D;
  --v47c-bg-light: #708090;
  --v47c-white: #ffffff;
  --v47c-shadow: rgba(0, 0, 0, 0.1);
  --v47c-transition: all 0.3s ease;
  --v47c-border-radius: 8px;
  --v47c-container-width: 430px;
}

/* 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, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--v47c-text-dark);
  background-color: var(--v47c-bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

body.v47c-loaded {
  animation: v47c-fadeIn 0.5s ease-in;
}

@keyframes v47c-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Container */
.v47c-container {
  max-width: var(--v47c-container-width);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

.v47c-wrapper {
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .v47c-wrapper {
    padding-bottom: 2rem;
  }
}

/* Header */
.v47c-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--v47c-secondary) 0%, var(--v47c-primary) 100%);
  box-shadow: 0 2px 10px var(--v47c-shadow);
  z-index: 1000;
  padding: 1rem 0;
}

.v47c-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.v47c-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--v47c-white);
  font-size: 1.8rem;
  font-weight: 700;
}

.v47c-logo img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.v47c-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--v47c-white);
  font-size: 2rem;
}

@media (min-width: 769px) {
  .v47c-menu-toggle {
    display: none;
  }
}

.v47c-header-actions {
  display: flex;
  gap: 0.5rem;
}

/* Buttons */
.v47c-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--v47c-border-radius);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--v47c-transition);
  text-align: center;
}

.v47c-btn-primary {
  background: var(--v47c-accent);
  color: var(--v47c-secondary);
}

.v47c-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 192, 203, 0.4);
}

.v47c-btn-secondary {
  background: transparent;
  color: var(--v47c-white);
  border: 2px solid var(--v47c-white);
}

.v47c-btn-secondary:hover {
  background: var(--v47c-white);
  color: var(--v47c-secondary);
}

/* Mobile Menu */
.v47c-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--v47c-secondary);
  box-shadow: -2px 0 10px var(--v47c-shadow);
  transition: right 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 5rem 2rem 2rem;
}

.v47c-mobile-menu.v47c-menu-open {
  right: 0;
}

.v47c-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--v47c-transition);
  z-index: 9998;
}

.v47c-menu-overlay.v47c-active {
  opacity: 1;
  visibility: visible;
}

.v47c-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--v47c-white);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.v47c-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.v47c-menu-link {
  color: var(--v47c-white);
  text-decoration: none;
  padding: 1rem;
  border-radius: var(--v47c-border-radius);
  transition: var(--v47c-transition);
  font-size: 1.6rem;
}

.v47c-menu-link:hover,
.v47c-menu-link.v47c-active {
  background: var(--v47c-accent);
  color: var(--v47c-secondary);
}

/* Desktop Navigation */
@media (min-width: 769px) {
  .v47c-desktop-nav {
    display: flex;
    gap: 2rem;
  }

  .v47c-desktop-nav a {
    color: var(--v47c-white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: var(--v47c-transition);
  }

  .v47c-desktop-nav a:hover,
  .v47c-desktop-nav a.v47c-active {
    color: var(--v47c-accent);
  }
}

@media (max-width: 768px) {
  .v47c-desktop-nav {
    display: none;
  }
}

/* Main Content */
.v47c-main {
  margin-top: 70px;
  padding: 2rem 0;
}

/* Carousel */
.v47c-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--v47c-border-radius);
  margin-bottom: 2rem;
  cursor: pointer;
}

.v47c-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.v47c-carousel-slide.v47c-active {
  opacity: 1;
}

.v47c-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v47c-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.v47c-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--v47c-white);
  opacity: 0.5;
  cursor: pointer;
  transition: var(--v47c-transition);
}

.v47c-carousel-dot.v47c-active {
  opacity: 1;
  transform: scale(1.2);
}

/* Section */
.v47c-section {
  margin-bottom: 3rem;
}

.v47c-section-title {
  color: var(--v47c-white);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Game Grid */
.v47c-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.v47c-game-card {
  background: var(--v47c-white);
  border-radius: var(--v47c-border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--v47c-transition);
  box-shadow: 0 2px 8px var(--v47c-shadow);
}

.v47c-game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.v47c-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.v47c-game-name {
  padding: 0.5rem;
  font-size: 1.1rem;
  text-align: center;
  color: var(--v47c-text-dark);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Text Content */
.v47c-content {
  background: var(--v47c-white);
  padding: 1.5rem;
  border-radius: var(--v47c-border-radius);
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px var(--v47c-shadow);
}

.v47c-content h2 {
  color: var(--v47c-primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.v47c-content h3 {
  color: var(--v47c-secondary);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.v47c-content p {
  margin-bottom: 1rem;
  color: var(--v47c-text-dark);
}

.v47c-content ul,
.v47c-content ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.v47c-content li {
  margin-bottom: 0.5rem;
}

.v47c-content a {
  color: var(--v47c-primary);
  text-decoration: none;
  font-weight: 600;
}

.v47c-content a:hover {
  text-decoration: underline;
  color: var(--v47c-accent);
}

/* Bottom Navigation */
.v47c-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--v47c-primary) 0%, var(--v47c-secondary) 100%);
  box-shadow: 0 -2px 10px var(--v47c-shadow);
  z-index: 1000;
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

@media (min-width: 769px) {
  .v47c-bottom-nav {
    display: none;
  }
}

.v47c-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  color: var(--v47c-white);
  text-decoration: none;
  transition: var(--v47c-transition);
  padding: 0.5rem;
  border-radius: var(--v47c-border-radius);
}

.v47c-bottom-nav-item:hover,
.v47c-bottom-nav-item.v47c-active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.v47c-bottom-nav-icon {
  font-size: 24px;
  line-height: 1;
}

.v47c-bottom-nav-text {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

/* Footer */
.v47c-footer {
  background: var(--v47c-secondary);
  color: var(--v47c-white);
  padding: 3rem 0 8rem;
  text-align: center;
}

@media (min-width: 769px) {
  .v47c-footer {
    padding-bottom: 3rem;
  }
}

.v47c-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.v47c-footer-link {
  color: var(--v47c-accent);
  text-decoration: none;
  font-size: 1.4rem;
  transition: var(--v47c-transition);
}

.v47c-footer-link:hover {
  color: var(--v47c-text-light);
  transform: translateY(-2px);
  display: inline-block;
}

.v47c-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.v47c-partner-logo {
  height: 30px;
  width: auto;
  opacity: 0.8;
  transition: var(--v47c-transition);
}

.v47c-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.v47c-footer-text {
  font-size: 1.2rem;
  color: var(--v47c-text-light);
  margin-bottom: 0.5rem;
}

.v47c-copyright {
  font-size: 1.1rem;
  color: var(--v47c-accent);
}

/* Utility Classes */
.v47c-text-center {
  text-align: center;
}

.v47c-mt-1 { margin-top: 1rem; }
.v47c-mt-2 { margin-top: 2rem; }
.v47c-mt-3 { margin-top: 3rem; }

.v47c-mb-1 { margin-bottom: 1rem; }
.v47c-mb-2 { margin-bottom: 2rem; }
.v47c-mb-3 { margin-bottom: 3rem; }

.v47c-p-1 { padding: 1rem; }
.v47c-p-2 { padding: 2rem; }
.v47c-p-3 { padding: 3rem; }
