:root {
  --bg-abyss: #020610;
  --bg-deep-sea: #041224;
  --text-main: #f0fdfa;
  --text-muted: #94a3b8;
  --text-dim: #475569;
  --accent-teal: #14b8a6;
  --accent-cyan: #06b6d4;
  --accent-aqua: #38bdf8;
  --accent-foam: #e0f2fe;
  --border-subtle: rgba(6, 182, 212, 0.12);
  --border-hover: rgba(56, 189, 248, 0.28);
  --glass-modal: rgba(4, 16, 30, 0.88);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-abyss);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Background canvas */
#canvas-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: crosshair;
}

/* Oceanic ambient background light & caustics */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 50% 10%, rgba(6, 182, 212, 0.08) 0%, transparent 65%),
    radial-gradient(circle at 80% 85%, rgba(20, 184, 166, 0.06) 0%, transparent 55%),
    radial-gradient(circle at 20% 75%, rgba(2, 132, 199, 0.07) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-deep-sea) 0%, var(--bg-abyss) 100%);
}

/* UI Layout Layer */
.ui-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 2.5rem;
  pointer-events: none;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-main);
  pointer-events: auto;
}

.wave-symbol {
  font-size: 1rem;
  color: var(--accent-cyan);
  opacity: 0.9;
  animation: wave-float 3s ease-in-out infinite alternate;
}

@keyframes wave-float {
  0% { transform: translateY(-1px) rotate(-3deg); }
  100% { transform: translateY(2px) rotate(3deg); }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 10px var(--accent-teal);
  animation: pulse-ocean 2.5s infinite ease-in-out;
}

@keyframes pulse-ocean {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 16px var(--accent-cyan); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  pointer-events: auto;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover {
  color: var(--accent-aqua);
  transform: translateY(-1px);
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(6, 182, 212, 0.08);
  padding-top: 1.25rem;
}

.copyright {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  pointer-events: auto;
}

.btn-impressum {
  background: rgba(6, 182, 212, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.45rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  backdrop-filter: blur(8px);
}

.btn-impressum:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--border-hover);
  color: var(--accent-foam);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.2);
}

/* Impressum Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  background: var(--glass-modal);
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  padding: 2.5rem;
  overflow-y: auto;
  box-shadow: 
    0 24px 60px -10px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(6, 182, 212, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: text;
}

.modal-backdrop.is-open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.modal-title-group h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-foam);
  margin-bottom: 0.3rem;
}

.modal-title-group span {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1.25rem;
  line-height: 1;
}

.btn-close:hover {
  background: rgba(6, 182, 212, 0.2);
  color: var(--text-main);
  transform: rotate(90deg);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  font-weight: 700;
}

.modal-section p, .modal-section address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.25rem;
  font-size: 0.92rem;
}

.contact-label {
  color: var(--text-dim);
  font-weight: 500;
}

.contact-value a {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px dashed rgba(6, 182, 212, 0.3);
  transition: border-color 0.2s, color 0.2s;
}

.contact-value a:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.disclaimer-text {
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-dim);
}

/* Custom Scrollbar */
.modal-card::-webkit-scrollbar {
  width: 6px;
}
.modal-card::-webkit-scrollbar-track {
  background: transparent;
}
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.2);
  border-radius: 3px;
}
.modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .ui-layer {
    padding: 1.25rem 1.25rem;
  }
  .modal-card {
    padding: 1.75rem;
  }
  .footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
}
