@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { margin: 0px; padding: 0px;  line-height: 1.1; font-family: 'Cinzel', sans-serif; width: 100%; height: 100%; overflow: hidden; background: #000; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

* { margin:0; padding:0; box-sizing:border-box; }
html, body {
  width:100%; height:100vh;
  background: radial-gradient(ellipse at 50% 45%, #f59030 0%, #e87018 60%, #cc5510 100%);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; color:white;
}
canvas { display:block; cursor:grab; touch-action:none; }
canvas:active { cursor:grabbing; }
#log { display:none; color:red; font:11px monospace; position:fixed; top:0; left:0; white-space:pre; pointer-events:none; z-index:999; max-width:90vw; max-height:50vh; overflow:auto; background:rgba(0,0,0,0.8); }
#loader {
  position:fixed; top:0; left:0; width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  z-index:900; pointer-events:none;
  transition: opacity 0.5s ease;
}
#loader.hidden { opacity:0; }
.spinner {
  width:36px; height:36px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: rgba(255,255,255,0.7);
  border-radius:50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }
.loading-text {
  font: 400 13px 'Helvetica Neue', Arial, sans-serif;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
}
.loading-text .dot {
  animation: dotFade 1.4s ease-in-out infinite;
  opacity:0;
}
.loading-text .dot:nth-child(1) { animation-delay: 0.0s; }
.loading-text .dot:nth-child(2) { animation-delay: 0.2s; }
.loading-text .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotFade {
  0%, 80%, 100% { opacity:0; }
  40% { opacity:1; }
}
/* ── Tweakpane host ── */
#pane-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 256px;
}
#pane-container .tp-dfwv {
  width: 256px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 8px 48px rgba(0,0,0,0.55);
  overflow: hidden;
}

a {
  color: #D0D0D0;
  text-decoration: none;
}
/* ── Tweakpane dark theme ── */
:root {
  --tp-base-background-color:             hsl(222,22%,7%);
  --tp-base-shadow-color:                 hsla(0,0%,0%,0.35);
  --tp-button-background-color:           hsl(222,18%,15%);
  --tp-button-background-color-active:    hsl(222,18%,22%);
  --tp-button-background-color-focus:     hsl(222,18%,20%);
  --tp-button-background-color-hover:     hsl(222,18%,19%);
  --tp-button-foreground-color:           hsl(155,90%,62%);
  --tp-container-background-color:        hsl(222,18%,11%);
  --tp-container-background-color-active: hsl(222,18%,15%);
  --tp-container-background-color-focus:  hsl(222,18%,14%);
  --tp-container-background-color-hover:  hsl(222,18%,13%);
  --tp-container-foreground-color:        hsla(155,90%,62%,0.65);
  --tp-groove-foreground-color:           hsl(222,18%,22%);
  --tp-input-background-color:            hsl(222,18%,13%);
  --tp-input-background-color-active:     hsl(222,18%,20%);
  --tp-input-background-color-focus:      hsl(222,18%,17%);
  --tp-input-background-color-hover:      hsl(222,18%,16%);
  --tp-input-foreground-color:            hsl(155,90%,74%);
  --tp-label-foreground-color:            hsl(220,16%,52%);
  --tp-monitor-background-color:          hsl(222,18%,10%);
  --tp-monitor-foreground-color:          hsla(155,90%,62%,0.85);
}

/* ── Vignette ── */
#vignette {
  pointer-events: none;
  background: transparent;
  height: 100%;
  width: 100%;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.63);
  position: fixed;
  z-index: 98;
}

/* ── FPS counter ── */
#fps {
  position: fixed;
  bottom: 16px;
  right: 16px;
  font: 500 10px/1 'Cinzel', monospace;
  color: rgba(61,255,160,0.0);
  letter-spacing: .08em;
  pointer-events: none;
  z-index: 1200;
}

#title-text {
  position: fixed;  
  max-width:250px;
  overflow-wrap: break-word;
  top: 118px;
  left: 28px;  
  max-width: 250px;
  z-index: 201;
  color:white;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}

/* ── Title block (top-left) ── */
#title-block {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 200;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#title-eyebrow {
  font: 400 16px/1 'Cinzel', monospace;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}
#title-headline {
  font: 600 28px/1 'Cinzel', system-ui, sans-serif;
  color: #ffffff;
  text-shadow: 3px 3px 10px rgba(0,0,0,0.8);
}

p {
  font: 400 12px/1 'Cinzel', monospace;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
  line-height: 1.5;
}

/* ── Nav link (bottom-left) ── */
#nav-prev {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 200;
  font: 400 14px/1 'Cinzel', monospace;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}
#nav-prev:hover {
  text-shadow: 3px 3px 10px rgba(0,0,0,0.9);
}

@media (max-width: 968px) {
  #pane-container {
    position: fixed;
    top: 16px;
    right: 6px;
    z-index: 100;
    width: 190px;
  }
  #pane-container .tp-dfwv {
    width: 190px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 8px 48px rgba(0,0,0,0.55);
    overflow: hidden;
  }
  #title-eyebrow {
    font: 400 11px/1 'Cinzel', monospace;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
  }
  #title-headline {
    font: 600 23px/1 'Cinzel', system-ui, sans-serif;
    color: #ffffff;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.8);
  }  
  #title-text {
    font: 400 11px/1 'Cinzel', monospace;
    position: fixed;  
    max-width:200px;
    width:200px;
    overflow-wrap: break-word;
    top: 98px;
    left: 28px;  
    z-index: 201;
    color:white;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
  }  
}
