/* Haha77 Theme Styles - All classes use prefix: pg98- */

/* CSS Variables */
:root {
  --pg98-primary: #FF5722;
  --pg98-secondary: #BA55D3;
  --pg98-accent: #DDA0DD;
  --pg98-purple: #9966CC;
  --pg98-dark: #212F3D;
  --pg98-bg-dark: #1a1a2e;
  --pg98-bg-card: #16213e;
  --pg98-text: #ffffff;
  --pg98-text-muted: #b0b0b0;
  --pg98-border: #2a3a4f;
  --pg98-shadow: rgba(0, 0, 0, 0.3);
  --pg98-gradient: linear-gradient(135deg, var(--pg98-primary), var(--pg98-secondary));
  --pg98-gradient-alt: linear-gradient(135deg, var(--pg98-purple), var(--pg98-accent));
}

/* 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.4rem;
  line-height: 1.5;
  color: var(--pg98-text);
  background-color: var(--pg98-bg-dark);
  overflow-x: hidden;
}

/* Container */
.pg98-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.pg98-wrapper {
  min-height: 100vh;
  padding-top: 6rem;
  padding-bottom: 8rem;
}

/* Header */
.pg98-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--pg98-dark);
  border-bottom: 1px solid var(--pg98-border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.pg98-header.pg98-scrolled {
  box-shadow: 0 2px 10px var(--pg98-shadow);
}

.pg98-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6rem;
  padding: 0 1.5rem;
}

.pg98-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg98-text);
}

.pg98-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.6rem;
}

.pg98-logo-text {
  font-size: 2rem;
  font-weight: 700;
  background: var(--pg98-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pg98-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pg98-btn-register,
.pg98-btn-login {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 0.6rem;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.pg98-btn-register {
  background: var(--pg98-gradient);
  color: white;
}

.pg98-btn-login {
  background: transparent;
  color: var(--pg98-primary);
  border: 1px solid var(--pg98-primary);
}

.pg98-menu-btn {
  background: transparent;
  border: none;
  color: var(--pg98-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
}

/* Mobile Menu */
.pg98-mobile-menu {
  position: fixed;
  top: 6rem;
  left: -100%;
  width: 100%;
  height: calc(100vh - 6rem);
  background: var(--pg98-dark);
  z-index: 9999;
  overflow-y: auto;
  transition: left 0.3s ease;
}

.pg98-mobile-menu.pg98-active {
  left: 0;
}

.pg98-nav-list {
  list-style: none;
  padding: 2rem 1.5rem;
}

.pg98-nav-item {
  border-bottom: 1px solid var(--pg98-border);
}

.pg98-nav-link {
  display: block;
  padding: 1.5rem 0;
  color: var(--pg98-text);
  text-decoration: none;
  font-size: 1.6rem;
  transition: color 0.3s ease;
}

.pg98-nav-link:hover {
  color: var(--pg98-primary);
}

/* Carousel */
.pg98-carousel {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto 2rem;
  overflow: hidden;
  border-radius: 1rem;
}

.pg98-carousel-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.pg98-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg98-carousel-slide.pg98-active {
  opacity: 1;
}

.pg98-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.pg98-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 10;
}

.pg98-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg98-carousel-dot.pg98-active {
  background: var(--pg98-primary);
  width: 2.4rem;
  border-radius: 0.4rem;
}

/* Section */
.pg98-section {
  margin-bottom: 3rem;
}

.pg98-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.pg98-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pg98-text);
}

.pg98-section-link {
  font-size: 1.3rem;
  color: var(--pg98-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Game Grid */
.pg98-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.pg98-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.pg98-game-item:active {
  transform: scale(0.95);
}

.pg98-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px var(--pg98-shadow);
}

.pg98-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg98-game-name {
  font-size: 1.2rem;
  color: var(--pg98-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card */
.pg98-card {
  background: var(--pg98-bg-card);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px var(--pg98-shadow);
}

.pg98-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--pg98-text);
}

.pg98-card-content {
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--pg98-text-muted);
}

/* Button */
.pg98-btn {
  display: inline-block;
  padding: 1.2rem 2.4rem;
  border: none;
  border-radius: 0.8rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
}

.pg98-btn-primary {
  background: var(--pg98-gradient);
  color: white;
}

.pg98-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--pg98-shadow);
}

.pg98-btn-secondary {
  background: var(--pg98-gradient-alt);
  color: white;
}

.pg98-btn-outline {
  background: transparent;
  color: var(--pg98-primary);
  border: 2px solid var(--pg98-primary);
}

.pg98-btn-block {
  width: 100%;
  display: block;
}

/* FAQ */
.pg98-faq-list {
  list-style: none;
}

.pg98-faq-item {
  background: var(--pg98-bg-card);
  border-radius: 1rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.pg98-faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pg98-text);
}

.pg98-faq-icon {
  font-size: 2rem;
  transition: transform 0.3s ease;
  color: var(--pg98-primary);
}

.pg98-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.pg98-faq-answer-content {
  padding: 0 1.5rem 1.5rem;
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--pg98-text-muted);
}

/* Footer */
.pg98-footer {
  background: var(--pg98-dark);
  border-top: 1px solid var(--pg98-border);
  padding: 3rem 0 10rem;
  margin-top: 4rem;
}

.pg98-footer-content {
  padding: 0 1.5rem;
}

.pg98-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg98-footer-link {
  color: var(--pg98-text-muted);
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0.5rem 0;
}

.pg98-footer-partners {
  margin: 2rem 0;
}

.pg98-partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.pg98-partner-logo {
  width: 100%;
  height: 4rem;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.6);
  transition: all 0.3s ease;
}

.pg98-partner-logo:hover {
  filter: grayscale(0%) opacity(1);
}

.pg98-footer-copyright {
  text-align: center;
  color: var(--pg98-text-muted);
  font-size: 1.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--pg98-border);
}

/* Bottom Navigation */
.pg98-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #2a2d3a 0%, #1e1e2d 100%);
  border-top: 1px solid rgba(186, 85, 211, 0.3);
  z-index: 1000;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
}

.pg98-bottom-nav-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 6.4rem;
  max-width: 430px;
  margin: 0 auto;
}

.pg98-bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #b0b0b0;
  transition: all 0.3s ease;
  min-width: 6rem;
  min-height: 6rem;
  position: relative;
}

.pg98-bottom-nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--pg98-gradient);
  transition: width 0.3s ease;
  border-radius: 0 0 3px 3px;
}

.pg98-bottom-nav-link.pg98-active::before {
  width: 80%;
}

.pg98-bottom-nav-link.pg98-active {
  color: var(--pg98-primary);
}

.pg98-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
  transition: all 0.3s ease;
}

.pg98-bottom-nav-link.pg98-active .pg98-bottom-nav-icon {
  transform: scale(1.1);
  color: var(--pg98-primary);
  filter: drop-shadow(0 0 8px rgba(255, 87, 34, 0.6));
}

.pg98-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Toast Notification */
.pg98-toast {
  position: fixed;
  bottom: 10rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--pg98-dark);
  color: var(--pg98-text);
  padding: 1.2rem 2.4rem;
  border-radius: 0.8rem;
  box-shadow: 0 4px 12px var(--pg98-shadow);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
}

.pg98-toast.pg98-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Utility Classes */
.pg98-text-center {
  text-align: center;
}

.pg98-text-primary {
  color: var(--pg98-primary);
}

.pg98-mb-1 {
  margin-bottom: 1rem;
}

.pg98-mb-2 {
  margin-bottom: 2rem;
}

.pg98-mb-3 {
  margin-bottom: 3rem;
}

.pg98-mt-2 {
  margin-top: 2rem;
}

/* Responsive */
@media (min-width: 769px) {
  .pg98-bottom-nav {
    display: none;
  }

  .pg98-wrapper {
    padding-bottom: 4rem;
  }
}

@media (max-width: 768px) {
  .pg98-wrapper {
    padding-bottom: 8rem;
  }

  main {
    padding-bottom: 8rem;
  }
}
