/* Tripo GameForge — WebGL loader template (Vexstorm Studios).
 * Desktop-first, self-contained (no external CDN/fonts). Macro-driven values are injected
 * from index.html's inline <style> block; this file stays macro-free so it never needs
 * template preprocessing. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

body {
  background: #0d0f14;
  color: #e8eaf0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#gf-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100%;
  width: 100%;
  padding: 20px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(94, 129, 255, 0.18), transparent 60%),
    #0d0f14;
}

#gf-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 0 4px 0;
  flex: 0 0 auto;
}

/*
 * Site navigation. Absolutely positioned against the header so the logo + title block stays optically
 * centered exactly as it was before the nav existed; below 760px it drops back into normal flow and the
 * header wraps, so the links can never sit on top of the title.
 */
#gf-header-nav {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
}

.gf-navlink {
  padding: 7px 14px;
  border: 1px solid rgba(94, 129, 255, 0.35);
  border-radius: 8px;
  background: rgba(94, 129, 255, 0.08);
  color: #c7d3f5;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gf-navlink:hover,
.gf-navlink:focus-visible {
  background: rgba(94, 129, 255, 0.18);
  border-color: rgba(94, 129, 255, 0.65);
  color: #f4f6fb;
}

@media (max-width: 760px) {
  #gf-header {
    flex-wrap: wrap;
  }

  #gf-header-nav {
    position: static;
    transform: none;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
}

#gf-header-logo {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
}

#gf-header-text {
  text-align: left;
}

#gf-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #f4f6fb;
}

#gf-subtitle {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #7f8aa8;
}

#gf-stage {
  position: relative;
  flex: 0 1 auto;
  width: 100%;
  /* Raised from 960px so the game reads as a showcase on a desktop monitor rather than a small inset panel.
     max-height still binds first on short windows, and the inline aspect-ratio keeps the shape exact.
     PAIRED CHANGE: index.html's devicePixelRatio cap is derived from this number - it was a constant 1.5
     tuned to the old 960 cap, and leaving it constant here would have raised the drawing buffer from
     1440 px to 2400 px wide (~2.8x the fill cost). Change one, change the other. */
  max-width: 1600px;
  max-height: 82vh;
  margin: 16px 0;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--gf-canvas-bg, #14161c);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}

#gf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(13, 15, 20, 0.92);
  z-index: 5;
}

#gf-loading-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f4f6fb;
}

#gf-progress-track {
  width: 62%;
  max-width: 420px;
  height: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

#gf-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #5e81ff, #8f6bff);
  transition: width 0.15s ease-out;
}

#gf-progress-text {
  font-size: 13px;
  font-weight: 500;
  color: #b7c0d8;
}

#gf-unsupported {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  background: rgba(13, 15, 20, 0.96);
  z-index: 6;
}

#gf-unsupported-title {
  font-size: 22px;
  font-weight: 700;
  color: #f4f6fb;
}

#gf-unsupported-body {
  max-width: 460px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #aab3cc;
}

#gf-warning {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  z-index: 10;
  font-size: 13px;
  color: #fff;
}

.gf-warning-item {
  padding: 10px 14px;
  text-align: center;
}

.gf-warning-warning {
  background: #b8860b;
}

.gf-warning-error {
  background: #a52a2a;
}

.gf-warning-info {
  background: #2c3550;
}

#gf-footer {
  flex: 0 0 auto;
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 2px 4px;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #6b748f;
}
