/**
 * NuStar PH Login - Core Stylesheet
 * All classes prefixed with pg4a- for namespace isolation
 * Color palette: Midnight Purple #7B68EE / Obsidian #0A0A0A / Dark Gold #B8860B
 */

:root {
  --pg4a-primary: #7B68EE;
  --pg4a-primary-light: #9B8BFF;
  --pg4a-primary-dark: #5A45D6;
  --pg4a-bg: #0A0A0A;
  --pg4a-bg-card: #141420;
  --pg4a-bg-surface: #1A1A2E;
  --pg4a-bg-hover: #22223A;
  --pg4a-gold: #B8860B;
  --pg4a-gold-light: #DAA520;
  --pg4a-gold-dark: #996F08;
  --pg4a-text: #F0E6D3;
  --pg4a-text-muted: #A09888;
  --pg4a-text-dim: #706858;
  --pg4a-accent: #FF6B6B;
  --pg4a-accent-green: #4ECB71;
  --pg4a-border: #2A2A3E;
  --pg4a-shadow: rgba(123, 104, 238, 0.25);
  --pg4a-radius: 8px;
  --pg4a-radius-lg: 12px;
  --pg4a-max-width: 430px;
}

/* Reset & Base */
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--pg4a-bg);
  color: var(--pg4a-text);
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--pg4a-gold-light);
}

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

/* Layout */
.pg4a-page-wrap {
  max-width: var(--pg4a-max-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--pg4a-bg);
}

/* ========== HEADER ========== */
.pg4a-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--pg4a-max-width);
  height: 56px;
  background: linear-gradient(180deg, #0F0F1A 0%, #0A0A0A 100%);
  border-bottom: 1px solid var(--pg4a-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  z-index: 1000;
  box-sizing: border-box;
}

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

.pg4a-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
}

.pg4a-brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pg4a-gold-light);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

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

.pg4a-btn-register,
.pg4a-btn-login {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.pg4a-btn-register {
  background: linear-gradient(135deg, var(--pg4a-gold) 0%, var(--pg4a-gold-light) 100%);
  color: #0A0A0A;
}

.pg4a-btn-register:hover {
  background: linear-gradient(135deg, var(--pg4a-gold-light) 0%, #FFD700 100%);
  transform: scale(1.03);
}

.pg4a-btn-login {
  background: transparent;
  color: var(--pg4a-primary-light);
  border: 1px solid var(--pg4a-primary);
}

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

.pg4a-menu-toggle {
  background: none;
  border: none;
  color: var(--pg4a-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

/* ========== MOBILE MENU ========== */
.pg4a-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.pg4a-overlay-active {
  opacity: 1;
  pointer-events: auto;
}

.pg4a-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: linear-gradient(180deg, #12121E 0%, #0A0A0A 100%);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.6rem;
  box-sizing: border-box;
  overflow-y: auto;
}

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

.pg4a-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--pg4a-border);
}

.pg4a-menu-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pg4a-gold-light);
}

.pg4a-menu-close {
  background: none;
  border: none;
  color: var(--pg4a-text);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

.pg4a-menu-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pg4a-menu-nav li {
  margin-bottom: 0.4rem;
}

.pg4a-menu-nav a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.8rem;
  border-radius: var(--pg4a-radius);
  color: var(--pg4a-text);
  font-size: 1.3rem;
  font-weight: 500;
  transition: all 0.2s;
}

.pg4a-menu-nav a:hover {
  background: var(--pg4a-bg-hover);
  color: var(--pg4a-primary-light);
}

.pg4a-menu-nav .material-icons,
.pg4a-menu-nav .pg4a-menu-icon {
  font-size: 20px;
  color: var(--pg4a-primary);
}

/* ========== CAROUSEL ========== */
.pg4a-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 56px;
  border-radius: 0 0 var(--pg4a-radius-lg) var(--pg4a-radius-lg);
}

.pg4a-carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
}

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

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

.pg4a-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.pg4a-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.pg4a-dot-active {
  background: var(--pg4a-gold-light);
  width: 20px;
  border-radius: 4px;
}

/* ========== MAIN CONTENT ========== */
.pg4a-main {
  padding: 1.2rem;
  padding-top: 0.8rem;
}

.pg4a-main-with-bottom {
  padding-bottom: 80px;
}

/* Section titles */
.pg4a-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pg4a-gold-light);
  margin: 1.6rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pg4a-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pg4a-section-title .material-icons,
.pg4a-section-title .pg4a-title-icon {
  font-size: 20px;
  color: var(--pg4a-primary);
}

/* ========== GAME GRID ========== */
.pg4a-game-section {
  margin-bottom: 1.6rem;
}

.pg4a-game-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pg4a-primary-light);
  margin: 1rem 0 0.8rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, var(--pg4a-bg-surface) 0%, transparent 100%);
  border-left: 3px solid var(--pg4a-primary);
}

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

.pg4a-game-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  text-decoration: none;
  display: block;
}

.pg4a-game-card:hover {
  transform: scale(1.05);
}

.pg4a-game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--pg4a-radius);
  border: 1px solid var(--pg4a-border);
}

.pg4a-game-card span {
  display: block;
  font-size: 1rem;
  color: var(--pg4a-text);
  margin-top: 0.3rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== CONTENT MODULES ========== */
.pg4a-content-block {
  background: var(--pg4a-bg-card);
  border-radius: var(--pg4a-radius-lg);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--pg4a-border);
}

.pg4a-content-block h2 {
  font-size: 1.5rem;
  color: var(--pg4a-gold-light);
  margin: 0 0 0.8rem;
}

.pg4a-content-block h3 {
  font-size: 1.3rem;
  color: var(--pg4a-primary-light);
  margin: 1rem 0 0.6rem;
}

.pg4a-content-block p {
  font-size: 1.2rem;
  line-height: 1.8rem;
  color: var(--pg4a-text);
  margin: 0 0 0.8rem;
}

.pg4a-content-block ul,
.pg4a-content-block ol {
  padding-left: 1.6rem;
  margin: 0.6rem 0;
}

.pg4a-content-block li {
  font-size: 1.2rem;
  line-height: 1.8rem;
  color: var(--pg4a-text);
  margin-bottom: 0.3rem;
}

/* Promo link in content */
.pg4a-promo-link {
  color: var(--pg4a-gold-light);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: underline;
}

.pg4a-promo-link:hover {
  color: #FFD700;
}

/* ========== BUTTONS ========== */
.pg4a-btn-promo {
  display: inline-block;
  background: linear-gradient(135deg, var(--pg4a-gold) 0%, var(--pg4a-gold-light) 100%);
  color: #0A0A0A;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  text-align: center;
}

.pg4a-btn-promo:hover {
  background: linear-gradient(135deg, var(--pg4a-gold-light) 0%, #FFD700 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--pg4a-shadow);
  color: #0A0A0A;
}

.pg4a-btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--pg4a-primary) 0%, var(--pg4a-primary-light) 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  text-align: center;
}

.pg4a-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--pg4a-shadow);
  color: #fff;
}

/* ========== CTA SECTION ========== */
.pg4a-cta-box {
  background: linear-gradient(135deg, var(--pg4a-bg-surface) 0%, #1E1035 100%);
  border: 1px solid var(--pg4a-primary);
  border-radius: var(--pg4a-radius-lg);
  padding: 1.6rem;
  text-align: center;
  margin: 1.4rem 0;
}

.pg4a-cta-box h3 {
  font-size: 1.5rem;
  color: var(--pg4a-gold-light);
  margin: 0 0 0.6rem;
}

.pg4a-cta-box p {
  font-size: 1.2rem;
  color: var(--pg4a-text);
  margin: 0 0 1rem;
}

/* ========== RTP TABLE ========== */
.pg4a-rtp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.1rem;
  margin: 0.8rem 0;
}

.pg4a-rtp-table th {
  background: var(--pg4a-bg-surface);
  color: var(--pg4a-gold-light);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--pg4a-primary);
}

.pg4a-rtp-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--pg4a-border);
  color: var(--pg4a-text);
}

.pg4a-rtp-table tr:hover td {
  background: var(--pg4a-bg-hover);
}

/* ========== TESTIMONIALS ========== */
.pg4a-testimonial {
  background: var(--pg4a-bg-surface);
  border-radius: var(--pg4a-radius);
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--pg4a-gold);
}

.pg4a-testimonial-text {
  font-size: 1.1rem;
  color: var(--pg4a-text);
  font-style: italic;
  margin: 0 0 0.5rem;
}

.pg4a-testimonial-author {
  font-size: 1rem;
  color: var(--pg4a-primary-light);
  font-weight: 600;
}

/* ========== WINNER SHOWCASE ========== */
.pg4a-winner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--pg4a-border);
  font-size: 1.1rem;
}

.pg4a-winner-name {
  color: var(--pg4a-text);
  font-weight: 500;
}

.pg4a-winner-game {
  color: var(--pg4a-text-muted);
  font-size: 1rem;
}

.pg4a-winner-amount {
  color: var(--pg4a-accent-green);
  font-weight: 700;
}

/* ========== PAYMENT METHODS ========== */
.pg4a-payment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.pg4a-payment-item {
  background: var(--pg4a-bg-surface);
  border: 1px solid var(--pg4a-border);
  border-radius: var(--pg4a-radius);
  padding: 0.6rem 1.2rem;
  font-size: 1.1rem;
  color: var(--pg4a-text);
  text-align: center;
}

/* ========== FOOTER ========== */
.pg4a-footer {
  background: linear-gradient(180deg, var(--pg4a-bg-card) 0%, #050510 100%);
  border-top: 1px solid var(--pg4a-border);
  padding: 1.6rem 1.2rem 2rem;
  margin-top: 2rem;
}

.pg4a-footer-brand {
  text-align: center;
  margin-bottom: 1.2rem;
}

.pg4a-footer-brand p {
  font-size: 1.1rem;
  color: var(--pg4a-text-muted);
  line-height: 1.6rem;
  margin: 0.4rem 0;
}

.pg4a-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.pg4a-footer-links a {
  font-size: 1rem;
  color: var(--pg4a-primary-light);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.pg4a-footer-links a:hover {
  background: var(--pg4a-bg-hover);
  color: var(--pg4a-gold-light);
}

.pg4a-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1rem 0;
}

.pg4a-footer-copyright {
  text-align: center;
  font-size: 1rem;
  color: var(--pg4a-text-dim);
  margin-top: 1.2rem;
}

/* ========== BOTTOM NAVIGATION ========== */
.pg4a-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--pg4a-max-width);
  height: 60px;
  background: linear-gradient(180deg, #0F0F1A 0%, #0A0A14 100%);
  border-top: 1px solid var(--pg4a-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-sizing: border-box;
}

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

.pg4a-bottom-nav-btn:hover {
  color: var(--pg4a-primary-light);
}

.pg4a-bottom-nav-btn .pg4a-bottom-icon {
  font-size: 22px;
  margin-bottom: 2px;
  transition: transform 0.2s;
}

.pg4a-bottom-nav-btn:hover .pg4a-bottom-icon {
  transform: scale(1.15);
}

.pg4a-bottom-nav-btn .pg4a-bottom-label {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

.pg4a-bottom-active {
  color: var(--pg4a-gold-light) !important;
}

.pg4a-bottom-active .pg4a-bottom-icon {
  transform: scale(1.1);
}

/* ========== FAQ ========== */
.pg4a-faq-item {
  background: var(--pg4a-bg-surface);
  border-radius: var(--pg4a-radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
  border: 1px solid var(--pg4a-border);
}

.pg4a-faq-q {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pg4a-primary-light);
  margin: 0 0 0.4rem;
}

.pg4a-faq-a {
  font-size: 1.1rem;
  color: var(--pg4a-text);
  line-height: 1.6rem;
  margin: 0;
}

/* ========== FEATURES LIST ========== */
.pg4a-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--pg4a-border);
}

.pg4a-feature-icon {
  font-size: 22px;
  color: var(--pg4a-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.pg4a-feature-text h4 {
  font-size: 1.2rem;
  color: var(--pg4a-text);
  margin: 0 0 0.2rem;
}

.pg4a-feature-text p {
  font-size: 1.1rem;
  color: var(--pg4a-text-muted);
  margin: 0;
  line-height: 1.5rem;
}

/* ========== INTERNAL LINK ========== */
.pg4a-internal-link {
  color: var(--pg4a-primary-light);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

.pg4a-internal-link:hover {
  color: var(--pg4a-gold-light);
}

/* ========== RESPONSIVE ========== */
@media (min-width: 769px) {
  .pg4a-bottom-nav {
    display: none;
  }
  .pg4a-page-wrap {
    border-left: 1px solid var(--pg4a-border);
    border-right: 1px solid var(--pg4a-border);
  }
}

@media (max-width: 768px) {
  .pg4a-main {
    padding-bottom: 80px;
  }
  .pg4a-footer {
    padding-bottom: 80px;
  }
}

/* ========== UTILITY ========== */
.pg4a-text-center { text-align: center; }
.pg4a-text-gold { color: var(--pg4a-gold-light); }
.pg4a-text-primary { color: var(--pg4a-primary-light); }
.pg4a-text-muted { color: var(--pg4a-text-muted); }
.pg4a-mt-1 { margin-top: 0.8rem; }
.pg4a-mt-2 { margin-top: 1.6rem; }
.pg4a-mb-1 { margin-bottom: 0.8rem; }
.pg4a-mb-2 { margin-bottom: 1.6rem; }
.pg4a-p-1 { padding: 0.8rem; }
.pg4a-hidden { display: none; }
