/**
 * ph365login.click - Theme Stylesheet
 * All classes use pgab- prefix for namespace isolation
 * Color palette: #FAFAFA (light) | #1E1E1E (dark bg) | #E91E63 (accent)
 */

/* CSS Variables */
:root {
  --pgab-primary: #E91E63;
  --pgab-primary-dark: #B0144A;
  --pgab-primary-light: #FF5A8A;
  --pgab-bg: #1E1E1E;
  --pgab-bg-light: #2A2A2A;
  --pgab-bg-card: #262626;
  --pgab-bg-hover: #333333;
  --pgab-text: #FAFAFA;
  --pgab-text-muted: #A0A0A0;
  --pgab-text-dim: #707070;
  --pgab-border: #3A3A3A;
  --pgab-accent-gold: #FFD700;
  --pgab-accent-green: #4CAF50;
  --pgab-accent-blue: #2196F3;
  --pgab-shadow: rgba(0, 0, 0, 0.3);
  --pgab-radius: 8px;
  --pgab-radius-lg: 12px;
  --pgab-radius-full: 50px;
  --pgab-header-h: 56px;
  --pgab-bottom-nav-h: 62px;
  font-size: 62.5%;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--pgab-bg);
  color: var(--pgab-text);
  font-size: 1.6rem;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--pgab-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--pgab-primary-light); }

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

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

.pgab-wrapper {
  width: 100%;
  overflow-x: hidden;
}

/* Header */
.pgab-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--pgab-header-h);
  background: var(--pgab-bg);
  border-bottom: 1px solid var(--pgab-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  backdrop-filter: blur(10px);
}

.pgab-header-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pgab-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.pgab-site-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pgab-text);
  letter-spacing: 0.5px;
}

.pgab-site-name span {
  color: var(--pgab-primary);
}

.pgab-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pgab-btn-register,
.pgab-btn-login {
  padding: 0.5rem 1.2rem;
  border-radius: var(--pgab-radius-full);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  min-height: 32px;
}

.pgab-btn-register {
  background: var(--pgab-primary);
  color: #fff;
}

.pgab-btn-register:hover {
  background: var(--pgab-primary-dark);
  transform: scale(1.03);
}

.pgab-btn-login {
  background: transparent;
  color: var(--pgab-text);
  border: 1.5px solid var(--pgab-border);
}

.pgab-btn-login:hover {
  border-color: var(--pgab-primary);
  color: var(--pgab-primary);
}

.pgab-menu-toggle {
  background: none;
  border: none;
  color: var(--pgab-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
}

/* Mobile Menu */
.pgab-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
}

.pgab-overlay-active { display: block; }

.pgab-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--pgab-bg-light);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.6rem;
  overflow-y: auto;
}

.pgab-menu-active { right: 0; }

.pgab-menu-close {
  background: none;
  border: none;
  color: var(--pgab-text);
  font-size: 2.4rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1.2rem;
}

.pgab-menu-list {
  list-style: none;
  margin-top: 3rem;
}

.pgab-menu-list li {
  border-bottom: 1px solid var(--pgab-border);
}

.pgab-menu-list a {
  display: block;
  padding: 1.2rem 0;
  color: var(--pgab-text);
  font-size: 1.5rem;
  transition: color 0.2s;
}

.pgab-menu-list a:hover {
  color: var(--pgab-primary);
}

/* Bottom Navigation */
.pgab-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--pgab-bottom-nav-h);
  background: var(--pgab-bg-light);
  border-top: 1.5px solid var(--pgab-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 0.4rem;
}

.pgab-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 54px;
  background: none;
  border: none;
  color: var(--pgab-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.3rem;
  border-radius: var(--pgab-radius);
}

.pgab-bottom-nav-btn:hover,
.pgab-bottom-nav-btn.pgab-nav-active {
  color: var(--pgab-primary);
}

.pgab-bottom-nav-btn.pgab-nav-active {
  background: rgba(233, 30, 99, 0.1);
}

.pgab-bottom-nav-btn.pgab-btn-pressed {
  transform: scale(0.92);
  background: rgba(233, 30, 99, 0.15);
}

.pgab-bottom-nav-btn i,
.pgab-bottom-nav-btn .material-icons {
  font-size: 2.4rem;
  margin-bottom: 0.1rem;
}

.pgab-bottom-nav-btn ion-icon {
  font-size: 2.4rem;
  margin-bottom: 0.1rem;
}

.pgab-bottom-nav-btn span {
  font-size: 1rem;
  font-weight: 500;
}

/* Main content area */
.pgab-main {
  padding-top: calc(var(--pgab-header-h) + 1rem);
  min-height: 100vh;
}

@media (max-width: 768px) {
  .pgab-main {
    padding-bottom: calc(var(--pgab-bottom-nav-h) + 1.5rem);
  }
}

/* Slider */
.pgab-slider {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--pgab-radius-lg);
  margin-bottom: 2rem;
}

.pgab-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  cursor: pointer;
}

.pgab-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.pgab-slide-active { opacity: 1; }

.pgab-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.pgab-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.pgab-dot-active {
  background: var(--pgab-primary);
  width: 24px;
  border-radius: 4px;
}

/* Section Titles */
.pgab-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pgab-text);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--pgab-primary);
  display: inline-block;
}

.pgab-section-subtitle {
  font-size: 1.4rem;
  color: var(--pgab-text-muted);
  margin-bottom: 1.5rem;
}

/* Game Grid */
.pgab-game-section {
  margin-bottom: 2.5rem;
}

.pgab-game-category-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--pgab-text);
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--pgab-primary);
}

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

.pgab-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0.4rem;
  border-radius: var(--pgab-radius);
}

.pgab-game-item:hover {
  transform: translateY(-2px);
  background: var(--pgab-bg-hover);
}

.pgab-game-img {
  width: 72px;
  height: 72px;
  border-radius: var(--pgab-radius);
  object-fit: cover;
  margin-bottom: 0.4rem;
  border: 1.5px solid var(--pgab-border);
}

.pgab-game-name {
  font-size: 1.1rem;
  color: var(--pgab-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cards */
.pgab-card {
  background: var(--pgab-bg-card);
  border-radius: var(--pgab-radius-lg);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--pgab-border);
}

.pgab-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pgab-text);
  margin-bottom: 1rem;
}

.pgab-card-text {
  font-size: 1.4rem;
  color: var(--pgab-text-muted);
  line-height: 1.6;
}

/* Buttons */
.pgab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--pgab-radius-full);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  min-height: 44px;
  text-decoration: none;
}

.pgab-btn-primary {
  background: var(--pgab-primary);
  color: #fff;
}

.pgab-btn-primary:hover {
  background: var(--pgab-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

.pgab-btn-outline {
  background: transparent;
  color: var(--pgab-primary);
  border: 1.5px solid var(--pgab-primary);
}

.pgab-btn-outline:hover {
  background: var(--pgab-primary);
  color: #fff;
}

.pgab-btn-lg {
  padding: 1.2rem 3rem;
  font-size: 1.6rem;
}

/* Footer */
.pgab-footer {
  background: var(--pgab-bg-light);
  padding: 2rem 1.2rem;
  border-top: 1px solid var(--pgab-border);
}

.pgab-footer-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pgab-footer-brand p {
  font-size: 1.3rem;
  color: var(--pgab-text-muted);
  line-height: 1.5;
}

.pgab-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.pgab-footer-links a {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: var(--pgab-bg-hover);
  color: var(--pgab-text);
  border-radius: var(--pgab-radius);
  font-size: 1.2rem;
  transition: all 0.2s;
}

.pgab-footer-links a:hover {
  background: var(--pgab-primary);
  color: #fff;
}

.pgab-footer-copy {
  text-align: center;
  font-size: 1.2rem;
  color: var(--pgab-text-dim);
  padding-top: 1rem;
  border-top: 1px solid var(--pgab-border);
}

/* Promo text links */
.pgab-promo-text {
  color: var(--pgab-primary);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.pgab-promo-text:hover {
  color: var(--pgab-primary-light);
  text-decoration: underline;
}

/* Utility */
.pgab-text-center { text-align: center; }
.pgab-mt-1 { margin-top: 1rem; }
.pgab-mt-2 { margin-top: 2rem; }
.pgab-mb-1 { margin-bottom: 1rem; }
.pgab-mb-2 { margin-bottom: 2rem; }
.pgab-hidden { display: none; }

/* Highlight badge */
.pgab-badge {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  background: var(--pgab-primary);
  color: #fff;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Winner marquee */
.pgab-winners-bar {
  background: var(--pgab-bg-card);
  border: 1px solid var(--pgab-border);
  border-radius: var(--pgab-radius);
  padding: 0.8rem 1.2rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

.pgab-winners-title {
  font-size: 1.2rem;
  color: var(--pgab-accent-gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pgab-winners-list {
  font-size: 1.3rem;
  color: var(--pgab-text-muted);
  line-height: 1.8;
}

.pgab-winners-list span {
  color: var(--pgab-accent-green);
  font-weight: 600;
}

/* FAQ accordion */
.pgab-faq-item {
  border-bottom: 1px solid var(--pgab-border);
  padding: 1rem 0;
}

.pgab-faq-q {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pgab-text);
  margin-bottom: 0.5rem;
}

.pgab-faq-a {
  font-size: 1.3rem;
  color: var(--pgab-text-muted);
  line-height: 1.6;
}

/* CTA section */
.pgab-cta-section {
  background: linear-gradient(135deg, var(--pgab-primary-dark), var(--pgab-primary));
  border-radius: var(--pgab-radius-lg);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.pgab-cta-section h3 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.8rem;
}

.pgab-cta-section p {
  font-size: 1.4rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
}

/* Responsive - Desktop */
@media (min-width: 769px) {
  .pgab-bottom-nav { display: none; }
  .pgab-container { max-width: 430px; }
  .pgab-header { max-width: 100%; }
}

/* Responsive - small mobile */
@media (max-width: 360px) {
  .pgab-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pgab-game-img {
    width: 60px;
    height: 60px;
  }
  .pgab-btn-register,
  .pgab-btn-login {
    padding: 0.4rem 0.8rem;
    font-size: 1.1rem;
  }
}
