/* =========================================================
   PAPAVEE.COM — Main Stylesheet
   Design: Space-dark theme, Syne + Inter fonts
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --bg-primary:   #07071a;
  --bg-secondary: #0d0d28;
  --bg-card:      rgba(255, 255, 255, 0.04);
  --bg-card-solid: #111130;
  --accent:       #4A90E2;
  --accent-glow:  rgba(74, 144, 226, 0.3);
  --gold:         #FFD700;
  --gold-dark:    #e6c200;
  --text-primary: #eeeeff;
  --text-muted:   #9898bb;
  --border:       rgba(255, 255, 255, 0.08);
  --border-accent: rgba(74, 144, 226, 0.25);
  --green-badge:  #00c96e;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card:  0 8px 40px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255,255,255,0.06) inset;
  --shadow-glow:  0 0 30px rgba(74, 144, 226, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Cookie Banner ───────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #0d0d2e 0%, #131340 100%);
  border-top: 1px solid var(--border-accent);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cookie-banner.visible {
  transform: translateY(0);
}

#cookie-banner.hidden {
  transform: translateY(110%);
}

.cookie-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 700px;
}

.cookie-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-text a:hover {
  color: #7ab3ff;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: var(--gold);
  color: #07071a;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-cookie-accept:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.35);
}

.btn-cookie-reject {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-cookie-reject:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 80px;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(74, 144, 226, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(120, 80, 220, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 100% 50% at 50% 100%, rgba(0, 201, 110, 0.07) 0%, transparent 60%),
    var(--bg-primary);
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 0 60px rgba(74, 144, 226, 0.4), 0 2px 20px rgba(0,0,0,0.6);
}

.hero h1 span {
  background: linear-gradient(135deg, #6ab4ff 0%, #ffffff 50%, #ffe57a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Brand Card Section ──────────────────────────────────── */
.brand-section {
  position: relative;
  z-index: 10;
  padding: 0 24px 60px;
  max-width: 860px;
  margin: -30px auto 0;
}

.brand-card {
  background: linear-gradient(145deg, #14143a 0%, #0e0e2c 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.brand-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.5), transparent);
}

.brand-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 50px rgba(74, 144, 226, 0.3);
  border-color: rgba(74, 144, 226, 0.4);
}

.brand-card-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.badge-recommended {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-badge);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  /* invert black logo to white for dark card background */
  filter: invert(1) brightness(1.2);
}

.brand-center {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-promo {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.brand-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.brand-rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  width: 16px;
  height: 16px;
  fill: var(--gold);
}

.star.empty {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
}

.rating-number {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.btn-play {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold) 0%, #ffaa00 100%);
  color: #07071a;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.btn-play:hover {
  background: linear-gradient(135deg, #ffe44d 0%, #ffcc00 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 215, 0, 0.5);
}

.btn-play:active {
  transform: translateY(0);
}

/* ── Article Sections ────────────────────────────────────── */
.articles-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.article-section:last-child {
  border-bottom: none;
}

.article-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.article-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.article-section p {
  font-size: 0.97rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.75;
}

.article-section p:last-child {
  margin-bottom: 0;
}

/* ── 18+ Disclaimer ──────────────────────────────────────── */
.disclaimer-section {
  background: linear-gradient(135deg, #0a0a20 0%, #0d0d28 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}

.disclaimer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.disclaimer-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.disclaimer-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  opacity: 0.8;
}

.disclaimer-text a {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  padding: 60px 24px 30px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-col h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.footer-col p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-col p:last-child {
  margin-bottom: 0;
}

/* ── Footer Logos Row ────────────────────────────────────── */
.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  opacity: 0.75;
  transition: var(--transition);
  filter: brightness(0.9);
}

.footer-logo-link:hover {
  opacity: 1;
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.footer-logo-link img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* ── Responsible Gaming Row ──────────────────────────────── */
.footer-responsible {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.responsible-link {
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: var(--transition);
}

.responsible-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.responsible-link img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

/* ── Footer Bottom ───────────────────────────────────────── */
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
}

.footer-links a {
  font-size: 0.83rem;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ── Scroll Fade-in (generic) ────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Policy Pages ────────────────────────────────────────── */
.page-header {
  background: var(--bg-secondary);
  padding: 60px 24px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 30% 50%, rgba(74, 144, 226, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 70% 50%, rgba(120, 80, 220, 0.08) 0%, transparent 60%);
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 1;
}

.page-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.page-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin: 36px 0 12px;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.8;
}

.page-content ul {
  margin: 10px 0 14px 20px;
}

.page-content ul li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 6px;
}

/* ── Page Nav (back link) ────────────────────────────────── */
.page-nav {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 24px 0;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

.page-nav a:hover {
  color: #7ab3ff;
  gap: 8px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .brand-section {
    margin: 0;
    padding: 0 0 40px;
  }

  .brand-card {
    margin-top: -80px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 20px 16px;
  }

  .brand-card-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .brand-left {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .brand-right {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .rating-number {
    font-size: 1.3rem;
  }

  .hero {
    padding: 80px 20px 120px;
    min-height: 360px;
  }

  .articles-wrapper {
    padding: 0 16px 40px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-logos {
    gap: 16px;
  }

  .footer-logo-link img {
    height: 32px;
  }

  .responsible-link img {
    height: 38px;
  }

  #cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 16px 20px;
  }

  .cookie-text {
    font-size: 0.82rem;
  }

  .cookie-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .btn-cookie-accept,
  .btn-cookie-reject {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 11px 12px;
    font-size: 0.85rem;
  }

  .footer-links {
    gap: 10px 16px;
  }

  .disclaimer-inner {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .brand-right {
    flex-wrap: wrap;
    gap: 10px;
  }

  .btn-play {
    width: 100%;
    text-align: center;
  }

  .footer-responsible {
    gap: 14px;
  }
}

/* ── Particle Canvas ─────────────────────────────────────── */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ── Shimmer animation on brand card ────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.brand-card-inner::after {
  content: none;
}

/* ── Pulse glow on CTA ───────────────────────────────────── */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 4px 32px rgba(255, 215, 0, 0.6); }
}

.btn-play {
  animation: pulse-glow 2.5s ease-in-out infinite;
}

.btn-play:hover {
  animation: none;
}

/* ── Section heading accent line ─────────────────────────── */
.article-section h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: linear-gradient(180deg, var(--accent), rgba(74,144,226,0.3));
  border-radius: 2px;
  margin-right: 12px;
  vertical-align: -0.1em;
  flex-shrink: 0;
}

.article-section h2 {
  display: flex;
  align-items: baseline;
}
