
/* =========================
   BASE
========================= */

:root {
  --ui-top-gap: 120px;
  --ui-bottom-gap: 60px;
  --ui-side-gap: 20px;
}

body {
  background: #000;
  margin: 0;
  padding: 0;
  overflow: hidden;
}


.renderer-donut {
    position: fixed;
    left: 50%;
    top: 50%;

    width: 60px;
    height: 60px;

    margin-left: -30px;
    margin-top: -30px;

    border: 6px solid rgba(255,255,255,0.15);
    border-top-color: rgba(255,255,255,0.9);

    border-radius: 50%;

    animation: renderer-spin 1s linear infinite;

    z-index: 10000;
}

@keyframes renderer-spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================
   SPACE HUD BACKGROUND
   (GRID + SCANLINES)
========================= */


/*
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);

  background-size: 60px 60px;

  opacity: 0.25;
}


body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.03) 1px,
    transparent 2px,
    transparent 4px
  );

  opacity: 0.12;
  mix-blend-mode: overlay;
}
*/

/* =========================
   3D / WEBGL LAYER
========================= */

#container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}


/* =========================
   MAIN UI
========================= */

#ui {
  position: fixed;
  top: 20px;
  right: 40px;

  display: flex;
  align-items: center;
  gap: 10px;

  z-index: 1000;
}

#ui button {
  background: transparent;
  border: none;

  color: #DADADA;
  font-size: 16px;

  cursor: pointer;
  padding: 6px 10px;

  position: relative;
  transition: 0.2s ease;
}

/* ACTIVE NAV */
#ui button.nav.active::after {
  content: "";
  position: absolute;

  left: 10px;
  right: 10px;
  bottom: -2px;

  height: 1px;
  background: #4DA3FF;

  opacity: 0.8;
}

/* SUPPORT BUTTON */
#ui .support {
  margin-left: 20px;

  border: 1px solid rgba(218, 218, 218, 0.35);
  border-radius: 6px;

  padding: 8px 16px;
}

/* =========================
   BRAND
========================= */

#brand {
  position: fixed;
  top: 20px;
  left: 20px;

  display: flex;
  align-items: center;
  gap: 12px;

  z-index: 1000;
  color: #DADADA;
}

#brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-text .title {
  font-size: 20px;
  letter-spacing: 0.5px;
}

.brand-text .subtitle {
  font-size: 16px;
  color: rgba(218, 218, 218, 0.6);
  margin-top: 2px;
}

/* =========================
   SYSTEM STATUS
========================= */

#system-status {
  position: fixed;
  top: 70px;
  right: 20px;

  font-size: 11px;
  letter-spacing: 1px;

  color: rgba(218, 218, 218, 0.5);

  z-index: 1000;
}

#status-text {
  color: #4DA3FF;
  text-shadow: 0 0 8px rgba(77, 163, 255, 0.5);
}

/* =========================
   OVERLAY SYSTEM
========================= */


/* =========================
   OVERLAY SYSTEM (PAGE)
========================= */

#page {
  position: fixed;
  inset: 0;
  z-index: 10;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding-top: var(--ui-top-gap);
  padding-bottom: var(--ui-bottom-gap);
  padding-right: var(--ui-side-gap);
  padding-left: var(--ui-side-gap);

  overflow-y: auto;
  overflow-x: hidden;

  background: rgba(0, 0, 0, 0.6);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.25s ease;
}

/* ACTIVE STATE */
#page.show {
  opacity: 1;
  pointer-events: auto;
}

/* CENTER MODE (Support / small modal) */
#page.center {
  align-items: center;
  padding-top: 0;
}

/* =========================
   MODAL SYSTEM
========================= */

.modal {
  background: rgba(10, 10, 10, 0.9);

  border: 1px solid rgba(77, 163, 255, 0.25);
  border-radius: 12px;

  padding: 28px;
  min-width: 320px;

  /*text-align: center;*/
  color: #DADADA;

  box-shadow: 0 0 30px rgba(77, 163, 255, 0.1);
}

/* TYPO */
.modal h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.modal p {
  font-size: 16px;
  color: rgba(218, 218, 218, 0.7);
  line-height: 1.5;
}

/* =========================
   MODAL BUTTONS
========================= */

.modal button {
  margin-top: 20px;

  padding: 10px 16px;

  background: rgba(77, 163, 255, 0.15);
  border: 1px solid rgba(77, 163, 255, 0.5);

  color: #DADADA;

  border-radius: 8px;
  cursor: pointer;

  transition: 0.2s ease;
}

.modal button:hover {
  background: rgba(77, 163, 255, 0.3);
  transform: translateY(-1px);
}

/* =========================
   DONATE BUTTON
========================= */

#donateBtn {
  margin-top: 20px;

  padding: 10px 18px;

  background: rgba(77, 163, 255, 0.12);
  border: 1px solid rgba(77, 163, 255, 0.5);

  color: #DADADA;

  border-radius: 8px;
  cursor: pointer;

  font-size: 14px;
  letter-spacing: 0.5px;

  transition: 0.2s ease;
}

#donateBtn:hover {
  background: rgba(77, 163, 255, 0.25);
  border-color: rgba(77, 163, 255, 0.9);
  transform: translateY(-1px);
}

/* =========================
   FOOTER (IMPRINT)
========================= */

#ui-footer {
  position: fixed;
  bottom: 18px;
  right: 20px;

  z-index: 1000;

  font-size: 12px;
  letter-spacing: 0.5px;
}

#ui-footer .nav {
  background: none;
  border: none;

  color: rgba(218, 218, 218, 0.5);
  cursor: pointer;

  padding: 4px 6px;

  transition: 0.2s ease;
}

#ui-footer .nav:hover {
  color: #4DA3FF;
}

/* =========================
   LINK SYSTEM
========================= */

.ui-link {
  background: none;
  border: none;

  color: rgba(218, 218, 218, 0.7);
  cursor: pointer;

  font-size: 13px;
  letter-spacing: 0.3px;

  position: relative;

  transition: 0.2s ease;
}

.ui-link:hover {
  color: #4DA3FF;
  text-shadow: 0 0 8px rgba(77, 163, 255, 0.6);
}

.ui-link::after {
  content: "";
  position: absolute;

  left: 0;
  bottom: -2px;

  width: 0%;
  height: 1px;

  background: #4DA3FF;

  transition: width 0.25s ease;
}

.ui-link:hover::after {
  width: 100%;
}



#ui .support {
  border: 1px solid rgba(218, 218, 218, 0.35);
  border-radius: 6px;

  padding: 8px 16px;
  transition: 0.2s ease;

  color: #DADADA;
  background: transparent;
}

#ui .support:hover {
  border-color: #4DA3FF;
  color: #4DA3FF;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(77, 163, 255, 0.25);
}


/* =========================
   INPUT / DEBUG
========================= */

input {
  border: none;
  background: #222;
  color: green;
  width: 9em;
}

.label {
  color: #bbb;
  font-size: 12px;
  text-shadow: -1px 1px 1px rgb(0, 8, 0);
}





#loading {
  position: fixed;
  inset: 0;
  background: black;
}

#bar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);

  width: 300px;
  height: 4px;

  background: rgba(0, 180, 255, 0.15);
  border: 1px solid rgba(0, 180, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

#bar-fill {
  height: 100%;
  width: 0%;
  background: #00b4ff;
  transition: width 0.1s linear;
}

#text {
  position: absolute;
  top: 55%;
  width: 100%;
  text-align: center;
  color: white;
}


/*---------------------------------------------------------*/



.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}


.modal-overlay.closing {
  opacity: 0;
  pointer-events: none;
}

/* =========================
   OVERLAY
========================= */
.modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 99999;

  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.75);

  opacity: 1;
  transition: opacity 0.2s ease;
}

/* =========================
   MODAL BOX
========================= */
.modal-box {
  position: relative;

  max-width: 700px;
  width: 90%;
  max-height: 85vh;

  display: flex;
  flex-direction: column;

  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);

  border-radius: 12px;

  overflow: hidden;
}

/* =========================
   CLOSE BUTTON (✕ FIX)
========================= */
#modal-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(40, 40, 40, 0.9);
  color: #ddd;

  border: none;
  border-radius: 6px;

  cursor: pointer;

  transition: background 0.2s ease;
}

#modal-close:hover {
  background: rgba(70, 70, 70, 0.9);
}

/* =========================
   CONTENT AREA
========================= */
#modal-content {
  overflow-y: auto;

  max-height: 65vh;

  padding: 28px 30px;

  color: #cfcfcf;
  line-height: 1.6;

  text-align: center;
}

/* =========================
   TYPO
========================= */
#modal-content h1,
#modal-content h2,
#modal-content h3 {
  color: #e6e6e6;
  margin-bottom: 10px;
}

#modal-content p {
  margin-bottom: 12px;
  color: #bdbdbd;
}

/* =========================
   LINKS
========================= */
#modal-content a {
  color: #4da3ff;
  text-decoration: none;
}

#modal-content a:hover {
  text-decoration: underline;
}


#modal-content ul {
  text-align: left;
  display: inline-block; /* sorgt dafür, dass Liste zentriert bleibt als Block */
  margin: 0 auto;
  padding-left: 20px;
}

#modal-content li {
  margin-bottom: 6px;
  color: #bdbdbd;
}




/* =========================
   BUTTONS (falls im Content)
========================= */
#modal-content button {
  margin-top: 20px;
  padding: 10px 16px;

  background: rgba(77, 163, 255, 0.15);
  border: 1px solid rgba(77, 163, 255, 0.5);
  color: #ddd;

  border-radius: 8px;
  cursor: pointer;

  transition: 0.2s ease;
}

#modal-content button:hover {
  background: rgba(77, 163, 255, 0.25);
}

/* =========================
   SCROLLBAR (DARK UI FIX)
========================= */
#modal-content::-webkit-scrollbar {
  width: 8px;
}

#modal-content::-webkit-scrollbar-track {
  background: rgba(20, 20, 20, 0.6);
}

#modal-content::-webkit-scrollbar-thumb {
  background: rgba(80, 80, 80, 0.8);
  border-radius: 4px;
}

#modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 120, 120, 0.9);
}



.legal-content {
  font-family: system-ui, sans-serif;
  color: #ddd;
  max-width: 600px;
  line-height: 1.5;
}

.legal-content h1 {
  font-size: 18px;
  margin-bottom: 10px;
}

.legal-content p {
  margin-bottom: 8px;
}




/*---------------------------------------------------------*/







/* =========================
   LEGAL GATE (FULLSCREEN)
========================= */

#legal-gate {
  position: fixed;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.85);

  z-index: 99999;

  opacity: 1;
  transition: opacity 0.25s ease;
}

/* =========================
   MODAL BASE
========================= */

.legal-modal .modal {
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid rgba(77, 163, 255, 0.25);
  border-radius: 12px;

  padding: 28px;
  min-width: 320px;

  color: #DADADA;

  box-shadow: 0 0 30px rgba(77, 163, 255, 0.1);

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  gap: 6px;
}

/* =========================
   RESET SPACING (CONTROLLED)
========================= */

.legal-modal .modal * {
  margin: 0;
  padding: 0;
}

/* =========================
   TYPO
========================= */

.legal-modal .modal h1 {
  margin-bottom: 6px;
}

.legal-modal .modal p {
  margin-bottom: 6px;
}

/* =========================
   LINKS
========================= */

.legal-modal .ui-link {
  color: #4DA3FF;
  text-decoration: none;
}

.legal-modal .ui-link:hover {
  text-decoration: underline;
}

/* =========================
   CHECKBOX ROW
========================= */

.legal-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  margin-top: 6px;
}

.legal-checkbox input {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.legal-checkbox span {
  line-height: 1;
  user-select: none;
}

/* =========================
   START BUTTON
========================= */

#startBtn {
  margin-top: 10px;

  padding: 10px 18px;

  background: rgba(77, 163, 255, 0.12);
  border: 1px solid rgba(77, 163, 255, 0.5);

  color: #DADADA;

  border-radius: 8px;

  cursor: pointer;

  font-size: 14px;
  letter-spacing: 0.4px;

  line-height: 1;

  transition: 0.2s ease;
}

#startBtn:hover:not(:disabled) {
  background: rgba(77, 163, 255, 0.25);
  border-color: rgba(77, 163, 255, 0.9);
  transform: translateY(-1px);
}

#startBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}