/**
 * PhoneJoy App - Theme Styles
 * All classes prefixed with 'pg78-' for namespace isolation
 */

/* CSS Variables */
:root {
  --pg78-primary: #00E5FF;
  --pg78-secondary: #26A69A;
  --pg78-dark: #2D2D2D;
  --pg78-accent: #00B8D4;
  --pg78-light: #E9ECEF;
  --pg78-white: #FFFFFF;
  --pg78-text-dark: #2D2D2D;
  --pg78-text-light: #E9ECEF;
  --pg78-shadow: rgba(0, 0, 0, 0.1);
}

/* 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.6rem;
  line-height: 1.5;
  color: var(--pg78-text-dark);
  background-color: var(--pg78-light);
  min-width: 320px;
  max-width: 430px;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* Container */
.pg78-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Styles */
.pg78-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--pg78-dark) 0%, var(--pg78-secondary) 100%);
  padding: 1rem 1.5rem;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--pg78-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pg78-logo-section {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pg78-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.pg78-site-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg78-white);
  text-decoration: none;
  white-space: nowrap;
}

.pg78-header-buttons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.pg78-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.pg78-btn-register {
  background: var(--pg78-primary);
  color: var(--pg78-dark);
}

.pg78-btn-register:hover {
  background: var(--pg78-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.4);
}

.pg78-btn-login {
  background: transparent;
  color: var(--pg78-white);
  border: 2px solid var(--pg78-primary);
}

.pg78-btn-login:hover {
  background: var(--pg78-primary);
  color: var(--pg78-dark);
}

/* Menu Toggle */
.pg78-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.pg78-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--pg78-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.pg78-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--pg78-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

.pg78-mobile-menu.pg78-menu-active {
  right: 0;
}

.pg78-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: all 0.3s ease;
}

.pg78-menu-overlay.pg78-menu-active {
  opacity: 1;
  visibility: visible;
}

.pg78-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--pg78-secondary);
}

.pg78-menu-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pg78-primary);
}

.pg78-menu-close {
  background: none;
  border: none;
  color: var(--pg78-white);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
}

.pg78-menu-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pg78-menu-link {
  color: var(--pg78-white);
  text-decoration: none;
  font-size: 1.6rem;
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pg78-menu-link:hover {
  background: var(--pg78-secondary);
  color: var(--pg78-primary);
}

/* Main Content */
.pg78-main {
  margin-top: 70px;
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* Carousel */
.pg78-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px var(--pg78-shadow);
}

.pg78-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg78-carousel-slide.pg78-slide-active {
  opacity: 1;
}

.pg78-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg78-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
}

.pg78-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg78-carousel-dot.pg78-dot-active {
  background: var(--pg78-primary);
  width: 25px;
  border-radius: 5px;
}

/* Page Title */
.pg78-page-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--pg78-dark);
  margin-bottom: 2rem;
  line-height: 1.3;
  text-align: center;
}

/* Section Styles */
.pg78-section {
  background: var(--pg78-white);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px var(--pg78-shadow);
}

.pg78-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pg78-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pg78-section-title i {
  color: var(--pg78-primary);
}

/* Game Grid */
.pg78-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg78-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.pg78-game-item:hover {
  transform: scale(1.05);
}

.pg78-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: var(--pg78-light);
  box-shadow: 0 2px 8px var(--pg78-shadow);
}

.pg78-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg78-game-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pg78-text-dark);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

/* Text Links */
.pg78-text-link {
  color: var(--pg78-secondary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid var(--pg78-primary);
  transition: all 0.3s ease;
}

.pg78-text-link:hover {
  color: var(--pg78-primary);
  border-color: var(--pg78-accent);
}

/* Featured Link */
.pg78-featured-link {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--pg78-primary) 0%, var(--pg78-accent) 100%);
  color: var(--pg78-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.4rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
  text-align: center;
  margin: 1rem 0;
}

.pg78-featured-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
}

/* List Styles */
.pg78-list {
  list-style: none;
  padding: 0;
}

.pg78-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--pg78-light);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.pg78-list li:last-child {
  border-bottom: none;
}

.pg78-list i {
  color: var(--pg78-primary);
  font-size: 1.8rem;
  margin-top: 0.2rem;
}

/* Footer */
.pg78-footer {
  background: var(--pg78-dark);
  color: var(--pg78-white);
  padding: 3rem 1.5rem 1rem;
  margin-top: 3rem;
}

.pg78-footer-intro {
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.pg78-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg78-footer-link {
  color: var(--pg78-primary);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pg78-footer-link:hover {
  color: var(--pg78-accent);
  text-decoration: underline;
}

.pg78-footer-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pg78-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.pg78-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
}

.pg78-footer-nav a {
  color: var(--pg78-light);
  text-decoration: none;
  font-size: 1.3rem;
  transition: color 0.3s ease;
}

.pg78-footer-nav a:hover {
  color: var(--pg78-primary);
}

/* Partner Logos */
.pg78-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  justify-items: center;
}

.pg78-partner-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: grayscale(100%) brightness(200%);
  transition: all 0.3s ease;
}

.pg78-partner-logo:hover {
  filter: grayscale(0%) brightness(100%);
}

.pg78-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--pg78-light);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Bottom Navigation */
.pg78-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--pg78-dark) 0%, var(--pg78-secondary) 100%);
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--pg78-shadow);
  padding: 0 0.5rem;
}

.pg78-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--pg78-light);
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.5rem;
}

.pg78-bottom-nav a:hover {
  background: rgba(0, 229, 255, 0.1);
  transform: scale(1.1);
}

.pg78-bottom-nav a.pg78-nav-active {
  color: var(--pg78-primary);
  background: rgba(0, 229, 255, 0.15);
}

.pg78-bottom-nav i {
  font-size: 22px;
  margin-bottom: 4px;
}

.pg78-bottom-nav span {
  font-size: 10px;
  font-weight: 600;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .pg78-bottom-nav {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .pg78-main {
    padding: 1.5rem 0;
  }

  .pg78-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
  }

  .pg78-section {
    padding: 1.5rem;
  }
}
