:root {
  --page-bg: #10161d;
  --panel-bg: rgba(9, 0, 20, 0.86);
  --panel-bg-strong: rgba(4, 0, 12, 0.94);
  --text: #e8e3ea;
  --muted: #c5c3c0;
  --pink: #ff2f9f;
  --pink-soft: rgba(255, 47, 159, 0.65);
  --pink-glow: rgba(255, 47, 159, 0.55);
  --shadow: rgba(0, 0, 0, 0.55);
  --max-width: 980px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--page-bg);
  overflow-x: hidden;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at center, rgba(255, 47, 159, 0.08), transparent 42%),
    linear-gradient(to bottom, rgba(7, 10, 16, 0.28), rgba(7, 10, 16, 0.78));
  pointer-events: none;
}

.site-header {
  width: 100%;
  min-height: 126px;
  padding: 24px 20px 22px;
  background: #10171f;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.brand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.brand-stack a {
  color: var(--muted);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: min(310px, 76vw);
  height: auto;
}

.author-line {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.author-line a {
  color: var(--muted);
  text-decoration: none;
}

.author-line a:hover {
  text-decoration: underline;
}

.external-icon {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.page-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 70px auto 100px;
}

.clean-section {
  width: 100%;
  margin: 0 0 34px;
  background: var(--panel-bg);
  box-shadow: 0 24px 60px var(--shadow);
}

.section-title {
  margin: 0;
  min-height: 40px;
  padding: 9px 18px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  background:
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.88),
      rgba(55, 0, 45, 0.82),
      rgba(0, 0, 0, 0.88)
    );
  border: 2px solid var(--pink);
  box-shadow:
    0 0 7px var(--pink-glow),
    0 0 18px rgba(255, 47, 159, 0.55),
    inset 0 0 14px rgba(255, 47, 159, 0.34);
}

.section-body {
  padding: 46px 36px;
  background: var(--panel-bg);
  text-align: center;
}

.compact-body {
  min-height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.intro-copy {
  max-width: 640px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.55;
}

.intro-copy p {
  margin: 0 0 22px;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.preview-body {
  min-height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-unavailable {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.usage-body {
  padding-top: 42px;
  padding-bottom: 34px;
  font-size: 17px;
  line-height: 1.55;
}

.usage-body p {
  margin: 0 0 22px;
}

.url-example {
  width: 100%;
  margin: 22px auto 0;
  padding: 18px 20px;
  color: #f2edf4;
  background: rgba(0, 0, 0, 0.42);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.arrow-down {
  margin: 16px 0 0;
  color: var(--pink);
  font-size: 26px;
  line-height: 1;
}

/* Temporarily removed support panel */
.support-hidden-layout {
  display: block !important;
  grid-template-columns: 1fr !important;
}

.support-hidden-layout > * {
  width: 100% !important;
  max-width: 100% !important;
  border-left: 0 !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Compact first section after support panel removal */
.clean-section[data-section="what"] .support-hidden-layout,
.clean-section[data-section="what"] .section-body,
.clean-section[data-section="what"] .section-content {
  min-height: 0 !important;
  height: auto !important;
}

.clean-section[data-section="what"] .support-hidden-layout {
  padding-top: 34px !important;
  padding-bottom: 28px !important;
}

/* Browser preview for Instagram posts/reels */
.site-instagram-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(100%, 420px);
  margin: 24px auto 0;
  padding: 0 0 28px;
}

.site-preview-media {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.site-preview-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.site-preview-link:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .site-header {
    min-height: 106px;
    padding: 20px 14px 18px;
  }

  .brand-logo {
    width: min(250px, 78vw);
  }

  .author-line {
    font-size: 15px;
  }

  .page-shell {
    width: min(100% - 20px, var(--max-width));
    margin-top: 44px;
    margin-bottom: 70px;
  }

  .clean-section {
    margin-bottom: 28px;
  }

  .section-title {
    font-size: 15px;
    min-height: 36px;
    padding: 8px 12px;
  }

  .section-body {
    padding: 34px 20px;
  }

  .intro-copy,
  .usage-body {
    font-size: 16px;
  }

  .site-instagram-preview {
    width: min(100%, 360px);
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: calc(100% - 14px);
  }

  .section-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .url-example {
    font-size: 12px;
    padding: 14px 12px;
  }

  .site-instagram-preview {
    width: min(100%, 330px);
  }
}

/* Permanent background video layering fix */
html {
  background: #10161d !important;
}

body {
  background: transparent !important;
}

.bg-video {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

.bg-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.site-header,
.page-shell {
  position: relative !important;
  z-index: 2 !important;
}

/* Final Steam-profile style */
.bg-video {
  opacity: 1 !important;
  filter: none !important;
}

/* Steam page background parents are effectively transparent.
   Do not darken the whole page globally. */
.bg-overlay {
  background: none !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Steam parent panel layer: profile_customization */
.clean-section {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 3px !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* Steam header bar */
.section-title {
  margin: 0 !important;
  padding: 5px 10px !important;

  min-height: 30px !important;
  height: auto !important;

  display: block !important;

  font-family: "Motiva Sans", Arial, Helvetica, sans-serif !important;
  font-weight: 200 !important;
  font-size: 16px !important;
  line-height: 30px !important;

  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;

  color: #ddbed2 !important;
  text-shadow: 0 0 6px #e5abc89c !important;

  background: linear-gradient(
    90deg,
    rgb(87 89 123 / 0%) 0%,
    rgb(149 1 169 / 19%) 90%
  ) !important;

  border: 0 !important;
  border-radius: 3px !important;

  box-shadow:
    0 0 2px 0px #fff,
    inset 0 0 2px #fff,
    0px 0px 3px 2px #f13292,
    inset 0 0 10px 1px #f13292,
    0 0 3px #f13292,
    inset 0 0 4px #f13292 !important;
}

/* Steam child body layer: showcase_content_bg */
.section-body,
.preview-body,
.what-body,
.usage-body {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #969696 !important;

  font-family: "Motiva Sans", Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;

  border: 0 !important;
  border-radius: 5px !important;
  box-shadow: none !important;

  padding: 8px !important;
  word-wrap: break-word !important;
  overflow: hidden !important;
}

/* No extra frames inside preview */
.site-instagram-preview,
.site-preview-media {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Embedded usage/code blocks */
.usage-step,
.usage-box,
.code-box,
.clean-code,
.url-example,
.url-box,
pre,
code {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Final Steam background asset alignment */
.bg-video {
  opacity: 1 !important;
  filter: none !important;
}

.bg-overlay {
  background: none !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Final saved panel blur */
.clean-section {
  background: rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(16px) brightness(0.98) saturate(1.10) !important;
  -webkit-backdrop-filter: blur(16px) brightness(0.98) saturate(1.10) !important;
}

.section-body,
.preview-body,
.what-body,
.usage-body {
  background: rgba(0, 0, 0, 0.34) !important;
  backdrop-filter: blur(16px) brightness(0.98) saturate(1.10) !important;
  -webkit-backdrop-filter: blur(16px) brightness(0.98) saturate(1.10) !important;
}

/* Basic Usage intro text matches What section text */
.clean-section[data-section="usage"] .usage-body > p {
  color: rgb(150, 150, 150) !important;
  font-family: "Motiva Sans", Arial, Helvetica, sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 27.9px !important;
  text-shadow: none !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
}

/* Keep the first line bold because the HTML uses <strong>, but match size/color */
.clean-section[data-section="usage"] .usage-body > p > strong {
  color: rgb(150, 150, 150) !important;
  font-family: "Motiva Sans", Arial, Helvetica, sans-serif !important;
  font-size: 18px !important;
  line-height: 27.9px !important;
  text-shadow: none !important;
}

/* Add one visual line before Basic Usage intro */
.clean-section[data-section="usage"] .usage-body > p:first-of-type {
  margin-top: 27.9px !important;
}

/* Preview media: 50% page size */
.site-instagram-preview {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.site-preview-media {
  width: 50% !important;
  max-width: 50% !important;
  height: auto !important;
  max-height: 62vh !important;
  object-fit: contain !important;
}

/* Fix video controls hit-testing after media resize */
.site-instagram-preview {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  position: relative !important;

  /* wrapper must not catch clicks meant for the video */
  pointer-events: none !important;
}

.site-preview-media {
  display: block !important;
  position: relative !important;
  z-index: 5 !important;

  width: auto !important;
  max-width: 50% !important;
  max-height: 62vh !important;
  height: auto !important;
  object-fit: contain !important;

  pointer-events: auto !important;
}

video.site-preview-media,
video.site-preview-media *,
video.site-preview-media source {
  pointer-events: auto !important;
}

.site-preview-link {
  position: relative !important;
  z-index: 6 !important;
  pointer-events: auto !important;
}

/* Video preview only: reduce height another 15%; images unchanged */
video.site-preview-media {
  max-height: 52.7vh !important;
  height: auto !important;
  width: auto !important;
  max-width: 50% !important;
  object-fit: contain !important;
}

/* Video preview only: reduce rendered size another 15%; images unchanged */
video.site-preview-media {
  width: auto !important;
  max-width: 42.5% !important;
  max-height: 52.7vh !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Move section stack upward for better vertical balance */
.page-shell {
  margin-top: 28px !important;
  padding-top: 0 !important;
  padding-bottom: 28px !important;
}

/* Move section stack half-step back downward */
.page-shell {
  margin-top: 42px !important;
  padding-top: 0 !important;
  padding-bottom: 28px !important;
}

/* Remove empty bottom scroll area */
html,
body {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.page-shell {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.page-shell > .clean-section:last-child {
  margin-bottom: 0 !important;
}

.clean-section[data-section="usage"] {
  margin-bottom: 0 !important;
}

.clean-section[data-section="usage"] .usage-body {
  padding-bottom: 8px !important;
}
