/* Reset & body */

:root {
  /* PGUltra Theme */
  --bg: #0F1020;
  --surface: #151C35;
  --surface-2: #1B2450;

  --primary: #FFD54F;
  --primary-hover: #FFE680;
  --secondary: #5B3DF5;
  --accent-blue: #1E88FF;

  --text: #F8FAFC;
  --muted: #A7B0C5;
  --card: #ffffff;
  --soft-bg: #F4F7FF;
  --shadow: rgba(0,0,0,.22);

  --pg-glow-purple: rgba(91,61,245,.45);
  --pg-glow-blue: rgba(30,136,255,.35);
  --pg-glow-gold: rgba(255,213,79,.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: 72px;
  padding-bottom: 89px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

/* Fixed header */
.fixed-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}

.topbar {
  background: linear-gradient(90deg, var(--surface), var(--surface-2));
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  height: 50px;
  object-fit: contain;
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

.btn-register,
.btn-login {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
}

.btn-register { background: var(--primary); color: var(--bg); }
.btn-login { background: linear-gradient(135deg, var(--secondary), var(--accent-blue)); color: #fff; }

/* Menu bar */
.menu-bar {
  background: rgba(15,16,32,.96);
  border-top: 1px solid rgba(91,61,245,.28);
  padding: 3px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-links{
  display:flex;
  flex-wrap:nowrap;
  overflow-x:auto;
  scrollbar-width:none;
}

.menu-links::-webkit-scrollbar{
  display:none;
}

.provider-btn {
  border: none;
  background: transparent;
  color: white;
  font-weight: bold;
  cursor: pointer;
  padding: 8px 10px;

  display: flex;
  align-items: center;
  gap: 6px;
}

.provider-logo {
  display: none;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.provider-btn.active .provider-logo {
  display: block;
}

.provider-btn.active,
.provider-btn:hover {
  color: var(--primary);
}

.provider-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) {

  .provider-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 6px;
  }

}

.provider-article {
  max-width: 1050px;
  margin: 50px auto;
  padding: 40px 50px;
}

.hero-provider-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-provider-link img {
  width: 144px;
  height: auto;
  border-radius: 12px;
  transition: transform .2s ease;
}

.hero-provider-link:hover img {
  transform: scale(1.05);
}

/* Hero */
.hero {
  min-height: 320px;
  background: radial-gradient(circle at top, rgba(91,61,245,.45), transparent 38%), linear-gradient(135deg, var(--bg), var(--surface));
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 30px 20px; /* account for fixed header */
}

.hero h1 { font-size: 42px; margin: 0 0 10px; }

/* Games section */
.games {
  padding: 20px;
  margin-top: 20px;
  padding-bottom: 34px;
}

.game-search-area {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.search-box {
  width: 300px;
  padding: 10px 15px;
  border-radius: 25px;
  border: none;
  outline: none;
}
.pdf-feature-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 30px;
  box-shadow: 0 10px 25px rgba(0,0,0,.12);
}

.pdf-feature-card img {
  width: 100%;
  display: block;
  border-radius: 14px;
  cursor: pointer;
}

.faq-list {
  display: grid;
  gap: 14px;
  margin-bottom: 30px;
}

.faq-item {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.faq-item h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.faq-item p {
  margin: 0;
  line-height: 1.7;
}

/* Game cards */
.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  max-width: 1200px;
  margin: auto;
}

.game-card {
  background: white;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 5px 18px rgba(0,0,0,.08);
  overflow: hidden;
  box-sizing: border-box;
}

.game-card img {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 20px;
  display: block;
  margin: 0 auto;
}

.game-card h3 {
  color: var(--secondary);
  margin: 10px 0 6px;
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-play {
  background: var(--primary);
  color: var(--bg);
  border: none;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}

.btn-play:hover {
  background: var(--primary-hover);
}

/* Mobile */
@media (max-width: 768px) {

  .game-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 8px;
  }

  .game-card {
    padding: 8px;
    border-radius: 12px;
  }

  .game-card img {
    max-width: 100%;
    border-radius: 12px;
  }

  .game-card h3 {
    font-size: 13px;
    margin: 8px 0;
    line-height: 1.3;
  }

  .btn-play {
    width: 100%;
    padding: 8px;
    font-size: 13px;
  }

}

/* Footer fixed */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

.footer {
  background: linear-gradient(90deg, var(--surface), var(--surface-2));
  padding: 14px 12px;
}

.footer-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.footer-btn {
  background: var(--primary);
  color: #111;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 6px;
  border-radius: 12px;
  transition: .3s;
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.footer-btn:hover { 
  transform: translateY(-3px);
  background: var(--primary-hover);
}

/* =========================
   Game Detail Page
========================= */

.detail-hero {
  min-height: 620px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-top: 0;
}

.detail-hero-overlay {
  min-height: 620px;
  background: linear-gradient(
    90deg,
    rgba(15,16,32,.96),
    rgba(91,61,245,.58)
  );
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px;
  overflow: hidden;
  position: relative;
}

.detail-hero-text {
  max-width: 620px;
  color: #fff;
  z-index: 2;
}

.detail-game-logo {
  max-width: 360px;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  margin-bottom: 18px;
}

.detail-hero-text h1 {
  font-size: 48px;
  margin: 0 0 15px;
}

.detail-hero-text p {
  font-size: 18px;
  line-height: 1.8;
}

.detail-character-img {
  max-width: 42%;
  max-height: 560px;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.45));
}

.game-main-play {
  background: linear-gradient(135deg, var(--primary), #F59E0B);
  color: var(--bg);
  border: none;
  padding: 16px 30px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
}

.game-main-play:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--primary-hover), #F59E0B);
}

.game-main-play.disabled {
  background: #999;
  color: #fff;
  cursor: not-allowed;
}

.detail-info-row {
  max-width: 1050px;
  margin: -45px auto 30px;
  padding: 0 20px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.detail-info-card {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
}

.detail-info-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.detail-info-card strong {
  color: var(--secondary);
  font-size: 22px;
}

.detail-content {
  max-width: 1150px;
  margin: 0 auto 120px;
  background: #fff;
  padding: 36px;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.detail-content h2 {
  color: var(--secondary);
  margin-top: 30px;
}

.detail-content p,
.detail-content li {
  line-height: 1.85;
  font-size: 16px;
}

.feature-list {
  padding-left: 22px;
}

.detail-screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.detail-screenshot-grid img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(0,0,0,.12);
  transition: .25s;
  cursor: pointer;
}

.detail-screenshot-grid img:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}

.detail-screenshot-grid img:active {
  transform: scale(.98);
}

.detail-symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 16px;
  align-items: center;
  margin-top: 18px;
}

.detail-symbol-grid img {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  background: #f7f7f7;
  border-radius: 14px;
  padding: 10px;
}

.detail-play-bottom {
  text-align: center;
  margin-top: 40px;
}

.game-not-found {
  min-height: 70vh;
  padding-top: 180px;
  text-align: center;
}

.game-iframe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  z-index: 99998;
}

.iframe-close {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 99999;
  background: var(--secondary);
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

@media (max-width: 768px) {
  body {
    padding-top: 62px;
  }

  .detail-hero {
    margin-top: 0 !important;
  }


  .detail-hero-overlay {
    flex-direction: column;
    text-align: center;
    padding: 35px 20px;
  }

  .detail-hero-text h1 {
    font-size: 36px;
  }

  .detail-character-img {
    max-width: 90%;
    margin-top: 25px;
  }

  .detail-info-row {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .detail-content {
    margin: 0 15px 120px;
    padding: 24px;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 99997;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
}

.lightbox img {
  max-width: 95%;
  max-height: 90%;
  border-radius: 16px;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  background: var(--secondary);
  color: white;
  padding: 10px 15px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  z-index: 99998;
}


.related-games {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 768px) {

  .related-games {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .related-card h3 {
    font-size: 11px;
    padding: 6px;
    line-height: 1.2;
  }

}

.related-card {
  cursor: pointer;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 5px 16px rgba(0,0,0,.1);
  transition: transform .25s ease,
              box-shadow .25s ease;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.related-card a {
  text-decoration: none;
  color: inherit;
}

.related-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform .35s ease;
}

.related-card:hover img {
  transform: scale(1.06);
}

.related-card h3 {
  padding: 12px;
  font-size: 15px;
  text-align: center;
  color: var(--secondary);
  transition: color .25s ease;
}

.related-card:hover h3 {
  color: var(--primary);
}


/* =========================
   Hero Symbols ใต้ปุ่ม
========================= */

.hero-symbols{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:20px;
  align-items:center;
}

.hero-symbol{
  width:60px;
  height:60px;
  object-fit:contain;
  animation:float 3s ease-in-out infinite;
  filter:drop-shadow(0 8px 15px rgba(0,0,0,.3));
}

.hero-symbol:nth-child(2){ animation-delay:.4s; }
.hero-symbol:nth-child(3){ animation-delay:.8s; }
.hero-symbol:nth-child(4){ animation-delay:1.2s; }
.hero-symbol:nth-child(5){ animation-delay:1.6s; }

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* =========================
   Hero ใหม่: ใช้ Game Icon + Symbols + PDF Page 2
   แทน Logo / Character ที่บางเกมมีพื้นหลังดำหรือเขียว
========================= */

.detail-game-logo,
.detail-character-img {
  display: none !important;
}

.hero-icon-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.detail-app-icon {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 14px 35px rgba(0,0,0,.38);
  background: rgba(255,255,255,.12);
}

.hero-icon-stack .hero-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  align-items: center;
  justify-content: center;
  max-width: 360px;
}

.hero-icon-stack .hero-symbol {
  width: 54px;
  height: 54px;
  object-fit: contain;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 15px rgba(0,0,0,.35));
}

.hero-pdf-preview {
  width: 330px;
  max-width: 38%;
  background: rgba(255,255,255,.96);
  border-radius: 24px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.38);
  text-align: center;
  z-index: 2;
}

.hero-pdf-preview img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  cursor: zoom-in;
}

.hero-pdf-preview span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: #64748b;
  font-weight: 700;
}

@media (max-width: 768px) {
  .detail-hero,
  .detail-hero-overlay {
    min-height: auto;
  }

  .detail-hero-overlay {
    flex-direction: column;
    gap: 24px;
    text-align: center;
    padding: 34px 18px 42px;
  }

  .detail-app-icon {
    width: 118px;
    height: 118px;
    border-radius: 24px;
  }

  .hero-icon-stack .hero-symbols {
    max-width: 300px;
    gap: 8px;
  }

  .hero-icon-stack .hero-symbol {
    width: 44px;
    height: 44px;
  }

  .hero-pdf-preview {
    width: 100%;
    max-width: 420px;
    padding: 12px;
  }

  .hero-pdf-preview img {
    max-height: 420px;
  }
}


.detail-app-icon {
  animation: heroFloat 3.5s ease-in-out infinite;
  will-change: transform;
}

.hero-pdf-preview {
  will-change: auto;
}

.hero-symbol:nth-child(1){
  animation: float 2.8s ease-in-out infinite;
}

.hero-symbol:nth-child(2){
  animation: float 3.3s ease-in-out infinite;
}

.hero-symbol:nth-child(3){
  animation: float 2.5s ease-in-out infinite;
}

.hero-symbol:nth-child(4){
  animation: float 3.8s ease-in-out infinite;
}

.hero-symbol:nth-child(5){
  animation: float 3.1s ease-in-out infinite;
}

@keyframes heroFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}
.detail-app-icon {
  cursor: pointer;
  transition: filter .25s ease;
}

.detail-app-icon:hover {
  filter: brightness(.9);
}

/* =========================
   Game Insights
========================= */

.game-insights-panel {
  background: linear-gradient(180deg, #fff, var(--soft-bg));
  border-radius: 22px;
  padding: 26px;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  border: 1px solid rgba(91,61,245,.12);
}

.game-insights-header h2 {
  margin: 0 0 8px;
  color: var(--secondary);
}

.game-insights-header p {
  margin: 0 0 20px;
  color: #64748b;
  line-height: 1.75;
}

.game-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.game-insight-box {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 5px 16px rgba(0,0,0,.07);
}

.game-insight-box h3 {
  margin: 0 0 12px;
  color: var(--secondary);
  font-size: 20px;
}

.game-insight-box ul {
  margin: 0;
  padding-left: 20px;
}

.game-insight-box li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.game-insight-meta {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.game-insight-tags,
.game-special-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-insight-tag,
.game-special-feature {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.game-insight-tag {
  background: #EEF4FF;
  color: var(--secondary);
}

.game-special-feature {
  background: #FFF4CC;
  color: #92400e;
}

@media (max-width: 768px) {
  .game-insights-panel {
    padding: 20px;
  }

  .game-insights-grid {
    grid-template-columns: 1fr;
  }
}

.insights-section{
    margin:20px 0;
    padding:20px;
    background:#1a1a1a;
    border-radius:12px;
}

.insights-section h2{
    margin-bottom:12px;
    font-size:20px;
}

.insights-list{
    list-style:none;
    padding:0;
    margin:0;
}

.insights-list li{
    padding:8px 0;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.insights-list li:last-child{
    border-bottom:none;
}
/* =========================
   v9.1 Game Insights Premium
========================= */

.game-insights-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 30px;
}

.insight-card {
  background: linear-gradient(135deg, var(--soft-bg), #ffffff);
  border: 1px solid rgba(91,61,245,.18);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

.insight-card-head h2 {
  margin: 0 0 16px;
  color: var(--secondary);
  font-size: 22px;
}

.insight-chip-list {
  display: grid;
  gap: 10px;
}

.insight-chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(91,61,245,.08);
  border: 1px solid rgba(91,61,245,.12);
  border-radius: 14px;
  padding: 12px 14px;
  line-height: 1.65;
  color: var(--bg);
  font-size: 15px;
}

.insight-chip-icon {
  width: 26px;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.insight-highlights {
  border-top: 5px solid var(--primary);
}

.insight-players {
  border-top: 5px solid var(--secondary);
}

@media (max-width: 768px) {
  .game-insights-wrap {
    grid-template-columns: 1fr;
  }

  .insight-card {
    padding: 18px;
    border-radius: 18px;
  }

  .insight-card-head h2 {
    font-size: 20px;
  }
}

.related-reason {
  margin: -4px 10px 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 215, 0, .18);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

.community-card{
    background:#fff;
    border-radius:20px;
    padding:24px;
    margin-bottom:24px;

    box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.community-card h2{
    margin-bottom:16px;
    color:var(--secondary);
}

.community-score{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-bottom:20px;
}

.community-rating{
    font-size:42px;
    font-weight:700;
    color:var(--secondary);
}

.community-rating span{
    font-size:18px;
    color:var(--muted);
}

.community-meta{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.community-tags h3{
    margin-bottom:12px;
}

.community-tag-list{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.community-tag{
    background:#FFF4CC;
    border:1px solid #FFD54F;
    border-radius:999px;
    padding:8px 12px;
    font-size:14px;
    font-weight:600;
}

@media(max-width:768px){

    .community-score{
        flex-direction:column;
        align-items:flex-start;
    }

    .community-rating{
        font-size:34px;
    }

}

/* =========================
   PGUltra Theme Polish
========================= */

.game-card,
.detail-content,
.detail-info-card,
.pdf-feature-card,
.faq-item,
.related-card,
.community-card,
.game-insight-box,
.hero-pdf-preview {
  color: var(--bg);
}

.provider-article {
  color: var(--text);
}

.search-box {
  background: #ffffff;
  color: var(--bg);
  box-shadow: 0 8px 20px rgba(0,0,0,.14);
}

.btn-register:hover,
.btn-play:hover,
.footer-btn:hover {
  filter: brightness(1.03);
}

.btn-login:hover {
  background: var(--secondary);
  filter: brightness(1.08);
}

.topbar,
.footer {
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

.game-card,
.detail-content,
.detail-info-card,
.community-card,
.insight-card {
  border: 1px solid rgba(91,61,245,.18);
}

.iframe-close,
.lightbox-close {
  background: var(--secondary);
}

.insights-section {
  background: var(--surface);
  color: var(--text);
}

.insights-list li {
  border-bottom: 1px solid rgba(255,255,255,.10);
}

@media (max-width: 768px) {

  .topbar {
    padding: 10px 14px;
    gap: 14px;
  }

  .site-logo {
    height: 42px;
    max-width: 130px;
  }

  .auth-buttons {
    gap: 8px;
    margin-right: 4px;
    flex-shrink: 0;
  }

  .btn-register,
  .btn-login {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

}

/* =========================
   PGUltra Final Neon Polish
========================= */

body {
  background:
    radial-gradient(circle at top left, rgba(91,61,245,.28), transparent 34%),
    radial-gradient(circle at top right, rgba(30,136,255,.18), transparent 32%),
    var(--bg);
}

.topbar,
.footer,
.menu-bar {
  backdrop-filter: blur(12px);
}

.provider-btn.active,
.provider-btn:hover {
  color: var(--primary);
  text-shadow: 0 0 12px var(--pg-glow-gold);
}

.btn-register,
.btn-play,
.footer-btn,
.game-main-play {
  background: linear-gradient(135deg, var(--primary), #F59E0B);
  color: #111827;
  box-shadow: 0 0 18px var(--pg-glow-gold);
}

.btn-login,
.iframe-close,
.lightbox-close {
  background: linear-gradient(135deg, var(--secondary), var(--accent-blue));
  color: #fff;
  box-shadow: 0 0 16px var(--pg-glow-purple);
}

.game-card,
.related-card,
.detail-content,
.detail-info-card,
.pdf-feature-card,
.faq-item,
.community-card,
.game-insight-box,
.insight-card,
.hero-pdf-preview {
  border: 1px solid rgba(91,61,245,.18);
  box-shadow: 0 10px 28px rgba(0,0,0,.12), 0 0 18px rgba(91,61,245,.10);
}

.game-card:hover,
.related-card:hover,
.detail-screenshot-grid img:hover {
  box-shadow: 0 14px 34px rgba(0,0,0,.20), 0 0 22px rgba(30,136,255,.20);
}

.game-card h3,
.related-card h3,
.detail-content h2,
.community-card h2,
.game-insights-header h2,
.game-insight-box h3,
.insight-card-head h2,
.detail-info-card strong,
.community-rating {
  color: var(--secondary);
}

.btn-play {
  color: #111827;
}

.search-box:focus {
  box-shadow: 0 0 0 3px rgba(91,61,245,.25), 0 8px 20px rgba(0,0,0,.14);
}

.detail-hero-overlay {
  background:
    radial-gradient(circle at right, rgba(30,136,255,.32), transparent 32%),
    linear-gradient(90deg, rgba(15,16,32,.96), rgba(91,61,245,.58));
}

.hero-pdf-preview,
.detail-app-icon {
  box-shadow: 0 16px 40px rgba(0,0,0,.38), 0 0 28px rgba(30,136,255,.18);
}

.insight-highlights {
  border-top: 5px solid var(--primary);
}

.insight-players {
  border-top: 5px solid var(--accent-blue);
}

.related-card:hover h3 {
  color: var(--accent-blue);
}


/* =========================================================
   PGULTRA.NET FINAL FRONTEND SYSTEM
   Production-ready preview theme
   Scope: CSS only visuals; keeps existing JS selectors/links working.
========================================================= */

:root {
  --bg: #0F1020;
  --bg-deep: #080A16;
  --surface: #151C35;
  --surface-2: #1B2450;
  --surface-glass: rgba(21, 28, 53, .78);

  --primary: #FFD54F;
  --primary-hover: #FFE680;
  --secondary: #5B3DF5;
  --accent-blue: #1E88FF;

  --text: #F8FAFC;
  --muted: #A7B0C5;
  --card: #ffffff;
  --soft-bg: #F4F7FF;

  --pg-purple: #5B3DF5;
  --pg-blue: #1E88FF;
  --pg-gold: #FFD54F;

  --pg-glow-purple: rgba(91,61,245,.45);
  --pg-glow-blue: rgba(30,136,255,.35);
  --pg-glow-gold: rgba(255,213,79,.38);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;

  --shadow-soft: 0 12px 34px rgba(0,0,0,.16);
  --shadow-card: 0 16px 42px rgba(4,8,24,.18), 0 0 22px rgba(91,61,245,.10);
  --shadow-glow: 0 0 26px rgba(91,61,245,.20), 0 0 34px rgba(30,136,255,.12);
}

html {
  scroll-behavior: smooth;
}

body {
  padding-top: 96px;
  padding-bottom: 92px;
  background:
    radial-gradient(circle at 6% 0%, rgba(91,61,245,.36), transparent 31%),
    radial-gradient(circle at 92% 3%, rgba(30,136,255,.24), transparent 30%),
    linear-gradient(180deg, #0F1020 0%, #0B0D1B 58%, #0F1020 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 80%);
}

a,
button,
input {
  -webkit-tap-highlight-color: transparent;
}

.fixed-header {
  z-index: 1000;
}

.topbar {
  min-height: 64px;
  padding: 12px 40px;
  background: linear-gradient(90deg, rgba(15,16,32,.88), rgba(21,28,53,.82));
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 32px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.site-logo {
  height: 48px;
  max-width: 172px;
  object-fit: contain;
}

.brand-fallback {
  display: none;
  font-weight: 950;
  letter-spacing: .04em;
  color: #fff;
  text-shadow: 0 0 18px rgba(91,61,245,.42);
}

.brand-fallback span {
  background: linear-gradient(135deg, var(--pg-purple), var(--pg-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-buttons {
  gap: 10px;
  align-items: center;
}

.btn-register,
.btn-login,
.btn-play,
.footer-btn,
.game-main-play,
.hero-cta {
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .01em;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease, background .22s ease;
}

.btn-register,
.btn-play,
.footer-btn,
.game-main-play,
.hero-cta.primary {
  background: linear-gradient(135deg, #FFE680, var(--pg-gold) 48%, #F59E0B);
  color: #111827;
  box-shadow: 0 8px 20px rgba(245,158,11,.22), 0 0 18px rgba(255,213,79,.22);
}

.btn-login,
.hero-cta.secondary,
.iframe-close,
.lightbox-close {
  background: linear-gradient(135deg, var(--pg-purple), var(--pg-blue));
  color: #fff;
  box-shadow: 0 8px 20px rgba(91,61,245,.22), 0 0 18px rgba(30,136,255,.18);
}

.btn-register:hover,
.btn-login:hover,
.btn-play:hover,
.footer-btn:hover,
.game-main-play:hover,
.hero-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn-register:active,
.btn-login:active,
.btn-play:active,
.footer-btn:active,
.game-main-play:active,
.hero-cta:active {
  transform: translateY(0);
}

.menu-bar {
  padding: 7px 40px;
  background: rgba(8,10,22,.82);
  border-top: 1px solid rgba(91,61,245,.18);
  border-bottom: 1px solid rgba(30,136,255,.10);
  backdrop-filter: blur(16px);
}

.menu-links {
  gap: 8px;
  padding: 2px 0;
}

.provider-btn {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(248,250,252,.82);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.045);
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.provider-btn.active,
.provider-btn:hover {
  transform: translateY(-1px);
  color: #111827;
  background: linear-gradient(135deg, #FFE680, var(--pg-gold));
  border-color: rgba(255,213,79,.72);
  box-shadow: 0 0 20px rgba(255,213,79,.22);
  text-shadow: none;
}

.provider-btn.active .provider-logo {
  display: block;
}

.provider-logo {
  width: 22px;
  height: 22px;
}

/* Home Hero */
.hero,
.provider-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 20% 20%, rgba(91,61,245,.48), transparent 33%),
    radial-gradient(circle at 82% 18%, rgba(30,136,255,.34), transparent 30%),
    radial-gradient(circle at 50% 110%, rgba(255,213,79,.14), transparent 32%),
    linear-gradient(135deg, #0F1020, #151C35 58%, #0A0D1C);
}

.hero::before,
.provider-hero::before,
.detail-hero-overlay::before {
  content: "";
  position: absolute;
  inset: -2px;
  opacity: .55;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 20%, rgba(255,255,255,.08) 21%, transparent 24% 100%);
  transform: translateX(-18%);
}

.pgnext-home-hero {
  min-height: 520px;
  padding: 92px 20px 58px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 16px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--pg-gold);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(255,213,79,.10);
}

.hero h1,
.provider-hero h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 92px);
  line-height: .95;
  letter-spacing: -.06em;
  font-weight: 1000;
  color: #fff;
  text-shadow: 0 0 32px rgba(91,61,245,.42), 0 0 42px rgba(30,136,255,.18);
}

.hero-lead,
.hero p,
.provider-hero p {
  max-width: 760px;
  margin: 18px auto 0;
  color: rgba(248,250,252,.82);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.75;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 780px;
  margin: 28px auto 0;
}

.hero-stat {
  padding: 15px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 28px rgba(0,0,0,.12);
  backdrop-filter: blur(10px);
}

.hero-stat strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.hero-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 13px 20px;
}

.hero-provider-links {
  margin-top: 28px;
}

.hero-provider-link img {
  width: 168px;
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(0,0,0,.24), 0 0 28px rgba(91,61,245,.20);
}

.hero-provider-link:hover img {
  transform: translateY(-4px) scale(1.04);
}

/* Sections */
.games,
.provider-games-section,
.provider-faq,
.provider-search-section {
  width: min(1220px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.games {
  padding: 38px 0 44px;
}

.pgnext-games-panel,
.provider-games-section,
.provider-faq {
  position: relative;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin: 0 auto 20px;
}

.section-head h2,
.games h2,
.provider-games-section h2,
.provider-faq h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -.03em;
}

.section-head p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.game-search-area,
.provider-search-section {
  display: flex;
  justify-content: center;
  margin: 22px auto 28px;
}

.search-shell {
  width: min(680px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(91,61,245,.18);
  box-shadow: 0 12px 32px rgba(0,0,0,.20), 0 0 24px rgba(91,61,245,.10);
}

.search-shell span {
  font-size: 18px;
}

.search-box,
.provider-search {
  width: 100%;
  min-height: 42px;
  padding: 8px 4px;
  border: none;
  outline: none;
  background: transparent;
  color: #111827;
  font-size: 15px;
  box-shadow: none;
}

.search-box::placeholder,
.provider-search::placeholder {
  color: #64748b;
}

/* Cards */
.game-cards,
.provider-game-grid {
  gap: 22px;
}

.game-card,
.related-card,
.detail-content,
.detail-info-card,
.pdf-feature-card,
.faq-item,
.community-card,
.game-insight-box,
.insight-card,
.hero-pdf-preview {
  background: linear-gradient(180deg, #ffffff 0%, #F8FAFF 100%);
  border: 1px solid rgba(91,61,245,.16);
  box-shadow: var(--shadow-card);
  color: #111827;
}

.game-card,
.related-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.game-card::before,
.related-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(91,61,245,.10), transparent 38%, rgba(30,136,255,.08));
  opacity: 0;
  transition: opacity .24s ease;
}

.game-card:hover,
.related-card:hover {
  transform: translateY(-6px);
  border-color: rgba(30,136,255,.38);
  box-shadow: 0 20px 46px rgba(0,0,0,.22), 0 0 28px rgba(30,136,255,.22);
}

.game-card:hover::before,
.related-card:hover::before {
  opacity: 1;
}

.game-card img,
.related-card img {
  transition: transform .3s ease, filter .3s ease;
}

.game-card:hover img,
.related-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.03);
}

.game-card h3,
.related-card h3,
.detail-content h2,
.detail-content h3,
.community-card h2,
.game-insights-header h2,
.game-insight-box h3,
.insight-card-head h2,
.detail-info-card strong,
.community-rating {
  color: var(--pg-purple);
}

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

/* Provider page */
.provider-hero {
  min-height: 430px;
  padding: 100px 20px 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.provider-stats {
  margin-top: 24px;
}

.provider-games-section,
.provider-faq,
.provider-article {
  padding: 34px 0;
}

.provider-article {
  width: min(1050px, calc(100% - 32px));
  color: rgba(248,250,252,.86);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  padding: 36px;
}

.provider-article h2,
.provider-article h3 {
  color: #fff;
}

.provider-article p {
  line-height: 1.9;
  color: rgba(248,250,252,.78);
}

.faq-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-item {
  border-radius: 20px;
}

/* Detail page */
.pgnext-detail-shell {
  min-height: 70vh;
}

.detail-hero {
  min-height: 650px;
  isolation: isolate;
}

.detail-hero-overlay {
  min-height: 650px;
  background:
    radial-gradient(circle at 78% 18%, rgba(30,136,255,.36), transparent 30%),
    radial-gradient(circle at 18% 18%, rgba(91,61,245,.46), transparent 32%),
    linear-gradient(90deg, rgba(8,10,22,.97), rgba(15,16,32,.88) 54%, rgba(91,61,245,.40));
}

.detail-hero-text {
  max-width: 680px;
}

.detail-hero-text h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: -.04em;
  text-shadow: 0 0 28px rgba(91,61,245,.32);
}

.detail-hero-text p {
  color: rgba(248,250,252,.84);
}

.detail-app-icon {
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 44px rgba(0,0,0,.44), 0 0 32px rgba(30,136,255,.22);
}

.hero-symbol {
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.36)) drop-shadow(0 0 10px rgba(255,213,79,.16));
}

.hero-pdf-preview {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.72);
}

.detail-info-row {
  margin-top: -50px;
}

.detail-info-card {
  border-radius: 22px;
}

.detail-info-card span {
  color: #64748b;
  font-weight: 750;
}

.detail-content {
  border-radius: 28px;
}

.detail-content p,
.detail-content li {
  color: #263244;
}

.detail-screenshot-grid img,
.detail-symbol-grid img {
  border: 1px solid rgba(91,61,245,.10);
}

.game-insights-panel,
.insight-card {
  border-radius: 26px;
}

.insight-chip {
  background: rgba(91,61,245,.07);
}

.game-insight-tag {
  background: rgba(91,61,245,.09);
}

.game-special-feature,
.community-tag,
.related-reason {
  background: rgba(255,213,79,.24);
  border-color: rgba(255,213,79,.58);
  color: #7C4A03;
}

.insights-section {
  background: linear-gradient(135deg, rgba(21,28,53,.96), rgba(27,36,80,.90));
  border: 1px solid rgba(255,255,255,.08);
}

/* Footer */
.footer {
  padding: 12px;
  background: rgba(8,10,22,.86);
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -12px 30px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
}

.footer-buttons {
  max-width: 520px;
  gap: 10px;
}

.footer-btn {
  min-height: 44px;
  padding: 12px 10px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Tablet */
@media (max-width: 900px) {
  body {
    padding-top: 92px;
  }

  .topbar {
    padding: 10px 16px;
  }

  .menu-bar {
    padding: 7px 12px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .faq-list {
    grid-template-columns: 1fr;
  }

  .provider-article {
    padding: 26px 20px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  body {
    padding-top: 62px;
    padding-bottom: 82px;
  }

  .topbar {
    min-height: 62px;
    padding: 9px 12px;
  }

  .site-logo {
    height: 40px;
    max-width: 124px;
  }

  .brand-fallback {
    display: inline-block;
    font-size: 18px;
  }

  .site-logo[src="images/pgnext.webp"] {
    max-width: 118px;
  }

  .auth-buttons {
    gap: 7px;
  }

  .btn-register,
  .btn-login {
    padding: 8px 10px;
    font-size: 12px;
  }

  .menu-bar {
    display: none;
  }

  .pgnext-home-hero,
  .provider-hero {
    min-height: auto;
    padding: 58px 16px 36px;
  }

  .hero h1,
  .provider-hero h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .hero-lead,
  .hero p,
  .provider-hero p {
    font-size: 15px;
  }

  .hero-badge,
  .section-kicker {
    font-size: 10px;
    letter-spacing: .08em;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    width: 100%;
  }

  .games,
  .provider-games-section,
  .provider-faq,
  .provider-search-section {
    width: min(100% - 20px, 1220px);
  }

  .games {
    padding-top: 24px;
  }

  .search-shell {
    padding: 7px 12px;
    border-radius: 18px;
  }

  .search-box,
  .provider-search {
    font-size: 14px;
  }

  .game-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
  }

  .provider-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
  }

  .game-card {
    padding: 8px;
    border-radius: 16px;
  }

  .game-card h3 {
    font-size: 12px;
  }

  .btn-play {
    min-height: 36px;
    font-size: 12px;
    border-radius: 12px;
  }

  .detail-hero,
  .detail-hero-overlay {
    min-height: auto;
  }

  .detail-hero-overlay {
    padding: 34px 16px 42px;
  }

  .detail-hero-text h1 {
    font-size: 34px;
  }

  .detail-hero-text p {
    font-size: 15px;
  }

  .detail-info-row {
    gap: 10px;
    margin-top: 14px;
    padding: 0 12px;
  }

  .detail-content {
    margin: 0 10px 110px;
    padding: 20px;
    border-radius: 22px;
  }

  .provider-article {
    width: min(100% - 20px, 1050px);
    margin: 20px auto 110px;
    border-radius: 22px;
  }

  .footer {
    padding: 9px 8px;
  }

  .footer-buttons {
    max-width: 100%;
    gap: 7px;
  }

  .footer-btn {
    min-height: 42px;
    padding: 10px 5px;
    border-radius: 14px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .brand-fallback {
    font-size: 15px;
  }

  .btn-register,
  .btn-login {
    padding: 7px 8px;
    font-size: 11px;
  }

  .game-cards,
  .provider-game-grid {
    gap: 8px;
  }
}
