* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

html,
body {
    width: 100%;
    height: 100%;
    background-color: #020406;
    overflow: hidden;
    font-family:
        ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas,
        monospace;
    touch-action: none;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Das interaktive Portal (Tunnel-Zentrum) */
#pore-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#pore-container.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

#signal-input {
    background: rgba(2, 6, 12, 0.75);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-bottom: 2px solid rgba(0, 240, 255, 0.7);
    border-radius: 4px;
    color: #e0fbfc;
    font-family: inherit;
    font-size: 16px;
    letter-spacing: 0.15em;
    text-align: center;
    padding: 12px 18px;
    width: 260px;
    outline: none;
    caret-color: #00f0ff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(4px);
}

#signal-input::placeholder {
    color: rgba(0, 240, 255, 0.3);
    letter-spacing: 0.25em;
}

.pore-hint {
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(0, 240, 255, 0.4);
}

/* Audio Status & Toggle unten links */
#audio-toggle {
    position: fixed;
    bottom: 16px;
    left: 18px;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: rgba(0, 240, 255, 0.35);
    cursor: pointer;
    z-index: 20;
    padding: 6px 10px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 3px;
    background: rgba(2, 4, 6, 0.6);
    transition: all 0.3s ease;
}

#audio-toggle:hover {
    color: rgba(0, 240, 255, 0.8);
    border-color: rgba(0, 240, 255, 0.4);
}

#audio-toggle.active {
    color: rgba(0, 240, 255, 0.85);
    border-color: rgba(0, 240, 255, 0.45);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

#watermark {
    position: fixed;
    bottom: 18px;
    right: 18px;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(0, 240, 255, 0.18);
    pointer-events: none;
}

/* Der schwebende Daten-Reader */
#reader-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 85%;
    max-width: 600px;
    max-height: 80vh;
    background: rgba(2, 6, 12, 0.65);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #b4fafc;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    flex-direction: column;
}

#reader-container.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

#reader-close {
    text-align: right;
    padding: 12px 18px;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(0, 240, 255, 0.5);
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    transition: color 0.3s;
}

#reader-close:hover {
    color: #00f0ff;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

#reader-content {
    padding: 24px 24px 32px 24px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

/* Scrollbar im Reader passend stylen */
#reader-content::-webkit-scrollbar {
    width: 4px;
}

#reader-content::-webkit-scrollbar-track {
    background: transparent;
}

#reader-content::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 4px;
}
/* Styling für das Kontakt-Modul im Glas-Portal */
#reader-content form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}
#reader-content input, 
#reader-content textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 4px;
  color: #e0fbfc;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
#reader-content input:focus, 
#reader-content textarea:focus {
  border-color: rgba(0, 240, 255, 0.8);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}
#reader-content button,
#reader-content input[type="submit"] {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: #00f0ff;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
#reader-content button:hover,
#reader-content input[type="submit"]:hover {
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  text-shadow: 0 0 8px #00f0ff;
}