/* YourPlayground.games — Cosmic Midnight Shell, Top Header Bar, Containers & Footer */
.ypg-container {
  width: min(100% - 36px, 1340px);
  margin-inline: auto;
}

.ypg-main {
  flex: 1 0 auto;
  padding-bottom: 0;
}

.ypg-section {
  padding-block: 34px;
}

.ypg-section-tight {
  padding-block: 20px;
}

.ypg-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.ypg-section-header > div {
  min-width: 0;
}

.ypg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #CBD5F5;
  margin-bottom: 10px;
}

.ypg-section-title-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ypg-section-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ypg-section-title {
  font-size: clamp(1.32rem, 2vw, 1.72rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ypg-section-subtitle {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 68ch;
}

/* Sticky Cosmic-Glass Top Header Bar (1:1 to Design 1) */
.ypg-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 10, 26, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: 0 8px 30px rgba(2, 4, 15, 0.45);
}

.ypg-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.ypg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.ypg-brand img {
  height: 40px;
  width: auto;
}

/* Center Navigation */
.ypg-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ypg-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  color: #D9E0F6;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ypg-nav-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ypg-nav-link:hover {
  color: #FFFFFF;
  background: rgba(139, 92, 246, 0.12);
}

/* Exact Design 1 Active Violet Capsule Pill */
.ypg-nav-link.is-active,
.ypg-nav-link[aria-current='page'] {
  color: #FFFFFF;
  background: linear-gradient(180deg, rgba(96, 62, 196, 0.44) 0%, rgba(45, 31, 108, 0.62) 100%);
  border-color: rgba(156, 114, 255, 0.72);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.ypg-nav-mobile-only {
  display: none;
}

/* Right Header Search, Sign In & Play Free Cluster */
.ypg-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ypg-header-actions .ypg-btn {
  flex-shrink: 0;
}

.ypg-icon-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 54, 0.78);
  border: 1px solid rgba(139, 92, 246, 0.36);
  color: #D9E0F6;
  flex-shrink: 0;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.ypg-icon-circle-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan-border);
  background: rgba(30, 36, 78, 0.9);
  box-shadow: 0 0 14px rgba(44, 238, 248, 0.22);
}

.ypg-btn-signin-pill {
  border-radius: var(--radius-pill) !important;
  background: rgba(18, 22, 50, 0.78);
  border: 1px solid rgba(148, 163, 212, 0.36);
  color: #F8FAFC;
  padding: 7px 16px;
  min-height: 38px;
  font-size: 0.86rem;
  font-weight: 600;
}

.ypg-btn-signin-pill:hover {
  border-color: var(--accent-cyan-border);
  color: var(--accent-cyan);
  background: rgba(26, 32, 70, 0.9);
}

.ypg-btn-play-free {
  border-radius: var(--radius-pill) !important;
  min-height: 38px;
  padding: 7px 18px;
  font-size: 0.87rem;
  font-weight: 800;
}

.ypg-play-tri {
  font-size: 0.74em;
  line-height: 1;
  display: inline-block;
}

.ypg-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-pill);
  background: rgba(22, 26, 59, 0.9);
  border: 1px solid var(--accent-cyan-border);
  color: var(--text-strong);
  font-size: 0.84rem;
  font-weight: 600;
  min-width: 0;
  max-width: 196px;
  overflow: hidden;
}

.ypg-user-monogram {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--gradient-cta-pill);
  color: var(--text-inverse);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.ypg-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ypg-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(22, 26, 59, 0.9);
  color: var(--text-strong);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ypg-nav-toggle:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Breadcrumbs */
.ypg-breadcrumbs {
  padding-top: 20px;
  padding-bottom: 4px;
}

.ypg-breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.ypg-breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ypg-breadcrumb-list li + li::before {
  content: '/';
  color: rgba(152, 162, 195, 0.45);
}

.ypg-breadcrumb-list a {
  color: var(--text-body);
}

.ypg-breadcrumb-list a:hover {
  color: var(--accent-cyan);
}

/* Page Hero Headers (Explore, Categories, Leaderboard, Creators, Docs, FAQ) */
.ypg-page-hero {
  padding-block: 26px 28px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.ypg-page-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: center;
}

.ypg-page-hero h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.ypg-page-hero p {
  color: var(--text-body);
  font-size: 1.01rem;
  max-width: 68ch;
}

.ypg-hero-banner-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  background: var(--bg-surface-1);
  aspect-ratio: 16 / 9;
}

.ypg-hero-banner-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cosmic Midnight Footer */
.ypg-footer {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(10, 13, 32, 0.94) 0%, #050713 100%);
  border-top: 1px solid rgba(139, 92, 246, 0.24);
  padding-top: 46px;
  padding-bottom: 84px;
}

.ypg-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.ypg-footer-brand p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.89rem;
  line-height: 1.58;
  max-width: 44ch;
}

.ypg-footer-brand img {
  height: 38px;
  width: auto;
}

.ypg-footer-col h3 {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-strong);
  margin-bottom: 14px;
}

.ypg-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ypg-footer-links a {
  color: var(--text-muted);
  font-size: 0.89rem;
}

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

.ypg-footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.81rem;
  color: var(--text-muted);
}

.ypg-footer-meta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.ypg-cookie-settings-link {
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.81rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ypg-cookie-settings-link:hover {
  color: var(--accent-cyan);
}

/* Tablet & Mobile Responsive Header Breakpoints */
@media (max-width: 1120px) {
  .ypg-hide-mobile-header {
    display: none !important;
  }

  .ypg-header-bar {
    flex-wrap: wrap;
    min-height: 64px;
    padding-block: 12px;
    column-gap: 8px;
    row-gap: 10px;
  }

  .ypg-brand img {
    height: 32px;
  }

  .ypg-nav-toggle {
    display: inline-flex;
  }

  .ypg-nav {
    display: none;
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px 0 6px;
    border-top: 1px solid var(--border-subtle);
  }

  .ypg-header.is-nav-open .ypg-nav {
    display: flex;
  }

  .ypg-nav-mobile-only {
    display: inline-flex;
  }

  .ypg-nav-link {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
  }

  .ypg-page-hero-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .ypg-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 560px) {
  .ypg-container {
    width: min(100% - 28px, 1340px);
  }

  .ypg-header-bar {
    padding-block: 13px;
  }

  .ypg-brand img {
    height: 26px;
  }

  .ypg-hide-xs {
    display: none;
  }

  .ypg-header-actions {
    gap: 6px;
  }

  .ypg-user-badge {
    max-width: 96px;
    padding: 4px 8px 4px 4px;
    gap: 5px;
    font-size: 0.76rem;
  }

  .ypg-user-monogram {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }

  .ypg-nav-toggle {
    width: 38px;
    height: 38px;
  }

  .ypg-footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .ypg-header-bar {
    padding-block: 14px;
  }

  .ypg-brand img {
    height: 24px;
  }

  .ypg-header-actions {
    gap: 5px;
  }

  .ypg-user-badge {
    max-width: 88px;
    padding: 4px 7px 4px 4px;
    gap: 4px;
    font-size: 0.74rem;
  }

  .ypg-header-actions .ypg-btn-sm,
  .ypg-btn-signin-pill {
    padding: 6px 10px;
    min-height: 34px;
    font-size: 0.78rem;
  }

  .ypg-nav-toggle {
    width: 36px;
    height: 36px;
  }
}
