/**
 * PhPearl Theme CSS
 * All classes use v7d4- prefix for namespace isolation
 * Mobile-first responsive design with max-width 430px
 */

/* CSS 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: #E0E0E0;
  background-color: #333333;
  overflow-x: hidden;
}

/* CSS Variables */
:root {
  --v7d4-primary: #CD853F;
  --v7d4-secondary: #FF8000;
  --v7d4-accent: #FFE135;
  --v7d4-bg-dark: #333333;
  --v7d4-bg-light: #E0E0E0;
  --v7d4-text-dark: #333333;
  --v7d4-text-light: #E0E0E0;
  --v7d4-teal: #B2DFDB;
}

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

/* Header Styles */
.v7d4-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #333333 0%, #4a4a4a 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease, background 0.3s ease;
}

.v7d4-header-scrolled {
  background: rgba(51, 51, 51, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.v7d4-header-hidden {
  transform: translateY(-100%);
}

.v7d4-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
}

.v7d4-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex: 1;
}

.v7d4-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.v7d4-logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--v7d4-text-light);
}

.v7d4-header-actions {
  display: flex;
  gap: 0.5rem;
}

.v7d4-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.v7d4-btn-register {
  background: linear-gradient(135deg, #FF8000 0%, #CD853F 100%);
  color: #fff;
}

.v7d4-btn-register:hover {
  background: linear-gradient(135deg, #CD853F 0%, #FF8000 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 128, 0, 0.4);
}

.v7d4-btn-login {
  background: transparent;
  color: var(--v7d4-teal);
  border: 1px solid var(--v7d4-teal);
}

.v7d4-btn-login:hover {
  background: var(--v7d4-teal);
  color: var(--v7d4-text-dark);
}

.v7d4-menu-btn {
  background: none;
  border: none;
  color: var(--v7d4-text-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.v7d4-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  max-width: 300px;
  height: 100vh;
  background: linear-gradient(180deg, #333333 0%, #4a4a4a 100%);
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 4rem 0 2rem;
 pointer-events: none;}

.v7d4-menu-open {
  right: 0;
 pointer-events: auto;}

.v7d4-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;
}

.v7d4-overlay-active {
  opacity: 1;
  visibility: visible;
}

.v7d4-menu-list {
  list-style: none;
}

.v7d4-menu-item {
  border-bottom: 1px solid rgba(178, 223, 219, 0.1);
}

.v7d4-menu-link {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--v7d4-text-light);
  text-decoration: none;
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.v7d4-menu-link:hover {
  background: rgba(205, 133, 63, 0.2);
  color: var(--v7d4-primary);
  padding-left: 2rem;
}

/* Main Content */
.v7d4-main {
  padding-top: 60px;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* Carousel */
.v7d4-carousel-container {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.v7d4-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.v7d4-carousel-slide.v7d4-active {
  opacity: 1;
}

.v7d4-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v7d4-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.v7d4-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(224, 224, 224, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.v7d4-carousel-dot.v7d4-active {
  background: var(--v7d4-secondary);
  width: 24px;
  border-radius: 4px;
}

/* Section Styles */
.v7d4-section {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(178, 223, 219, 0.1);
}

.v7d4-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--v7d4-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.v7d4-section-title i {
  color: var(--v7d4-secondary);
}

/* Game Grid */
.v7d4-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.v7d4-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.v7d4-game-item:hover {
  transform: scale(1.05);
}

.v7d4-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, #4a4a4a 0%, #333333 100%);
  border: 1px solid rgba(205, 133, 63, 0.3);
}

.v7d4-game-name {
  font-size: 0.9rem;
  color: var(--v7d4-text-light);
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Styles */
.v7d4-card {
  background: linear-gradient(135deg, rgba(74, 74, 74, 0.5) 0%, rgba(51, 51, 51, 0.8) 100%);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(205, 133, 63, 0.2);
}

.v7d4-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--v7d4-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.v7d4-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--v7d4-text-light);
}

/* FAQ Styles */
.v7d4-faq-item {
  margin-bottom: 1rem;
  border: 1px solid rgba(178, 223, 219, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.v7d4-faq-question {
  background: rgba(205, 133, 63, 0.15);
  padding: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--v7d4-primary);
  transition: background 0.3s ease;
}

.v7d4-faq-question:hover {
  background: rgba(205, 133, 63, 0.25);
}

.v7d4-faq-answer {
  padding: 1rem;
  background: rgba(51, 51, 51, 0.5);
  line-height: 1.6;
  color: var(--v7d4-text-light);
}

/* Promo Links */
.v7d4-promo-link {
  color: var(--v7d4-secondary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.v7d4-promo-link:hover {
  color: var(--v7d4-accent);
  text-decoration: underline;
}

.v7d4-play-btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 1.5rem auto;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #FF8000 0%, #CD853F 100%);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(255, 128, 0, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.v7d4-play-btn:hover {
  background: linear-gradient(135deg, #CD853F 0%, #FF8000 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 128, 0, 0.5);
}

/* Feature List */
.v7d4-feature-list {
  list-style: none;
  padding: 0;
}

.v7d4-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(178, 223, 219, 0.1);
}

.v7d4-feature-item:last-child {
  border-bottom: none;
}

.v7d4-feature-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  color: var(--v7d4-secondary);
  margin-top: 2px;
}

.v7d4-feature-text {
  flex: 1;
  line-height: 1.6;
  color: var(--v7d4-text-light);
}

.v7d4-feature-title {
  font-weight: 600;
  color: var(--v7d4-primary);
  margin-bottom: 0.3rem;
}

/* Footer */
.v7d4-footer {
  background: linear-gradient(180deg, #333333 0%, #2a2a2a 100%);
  padding: 2rem 0 1rem;
  border-top: 2px solid var(--v7d4-primary);
  margin-top: 2rem;
}

.v7d4-footer-description {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: var(--v7d4-text-light);
}

.v7d4-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  padding: 0 1rem 1.5rem;
}

.v7d4-footer-link {
  color: var(--v7d4-teal);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

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

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

.v7d4-partner-logo {
  height: 30px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

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

.v7d4-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: rgba(224, 224, 224, 0.6);
  padding: 1rem;
}

/* Mobile Bottom Navigation */
.v7d4-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #4a4a4a 0%, #333333 100%);
  border-top: 2px solid var(--v7d4-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.v7d4-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--v7d4-text-light);
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.v7d4-nav-item:hover {
  color: var(--v7d4-secondary);
  transform: scale(1.1);
}

.v7d4-nav-item.v7d4-nav-active {
  color: var(--v7d4-secondary);
}

.v7d4-nav-item.v7d4-nav-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--v7d4-secondary);
  border-radius: 0 0 3px 3px;
}

.v7d4-nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.v7d4-nav-text {
  font-size: 10px;
  font-weight: 500;
}

/* Desktop Responsive */
@media (min-width: 769px) {
  .v7d4-bottom-nav {
    display: none;
  }

  .v7d4-main {
    padding-bottom: 2rem;
  }

  .v7d4-container {
    max-width: 1200px;
  }

  .v7d4-game-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* Utilities */
.v7d4-text-center {
  text-align: center;
}

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

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

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

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

.v7d4-highlight {
  color: var(--v7d4-secondary);
  font-weight: 700;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
