/* Font-Face Deklarationen */
@font-face {
  font-family: "Black Mustang";
  src: url("./src/Black Mustang.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "False";
  src: url("./src/False.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

body {
  background-color: #000;
  color: #fff;
  font-family: "Arial", sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Universe Background - VERBESSERT */
.universe-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.universe-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.floating-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.dot {
  position: absolute;
  width: 3px; /* Von 2px auf 3px vergrößert */
  height: 3px;
  background: rgba(96, 247, 255, 0.6); /* Von 0.3 auf 0.6 erhöht */
  border-radius: 50%;
  animation: float 20s infinite linear;
  box-shadow: 0 0 4px rgba(96, 247, 255, 0.4); /* Glow-Effekt hinzugefügt */
}

.dot::before {
  content: "";
  position: absolute;
  top: -2px; /* Von -1px auf -2px */
  left: -2px;
  width: 7px; /* Von 4px auf 7px */
  height: 7px;
  background: rgba(96, 247, 255, 0.25); /* Von 0.1 auf 0.25 erhöht */
  border-radius: 50%;
  animation: pulse 3s infinite ease-in-out;
}

.network-line {
  stroke: rgba(96, 247, 255, 0.4); /* Von 0.2 auf 0.4 erhöht */
  stroke-width: 1; /* Von 0.5 auf 1 erhöht */
  fill: none;
  animation: networkPulse 4s infinite ease-in-out;
  filter: drop-shadow(0 0 2px rgba(96, 247, 255, 0.3)); /* Glow für Linien */
}

@keyframes float {
  0% {
    transform: translateX(-10px) translateY(100vh);
    opacity: 0;
  }
  10% {
    opacity: 0.8; /* Von 1 auf 0.8 für sanfteren Übergang */
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateX(10px) translateY(-10px);
    opacity: 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.2; /* Von 0.1 auf 0.2 erhöht */
    transform: scale(1);
  }
  50% {
    opacity: 0.6; /* Von 0.3 auf 0.6 erhöht */
    transform: scale(1.8); /* Von 1.5 auf 1.8 vergrößert */
  }
}

@keyframes networkPulse {
  0%,
  100% {
    opacity: 0.3; /* Von 0.1 auf 0.3 erhöht */
    stroke-width: 1;
  }
  50% {
    opacity: 0.7; /* Von 0.3 auf 0.7 erhöht */
    stroke-width: 1.5; /* Von 1 auf 1.5 erhöht */
  }
}

/* Zusätzliche Sterne für mehr Präsenz */
.dot:nth-child(3n) {
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
  animation-duration: 25s;
}

.dot:nth-child(5n) {
  background: rgba(96, 247, 255, 0.8);
  width: 4px;
  height: 4px;
  box-shadow: 0 0 8px rgba(96, 247, 255, 0.5);
  animation-duration: 15s;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px; /* 8px * 4 */
}

.logo {
  position: absolute;
  top: 80px; /* 8px * 10 */
  left: 80px; /* 8px * 10 */
  width: 24px; /* 8px * 3 */
  height: 24px; /* 8px * 3 */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px; /* 8px * 3 */
  font-weight: bold;
  color: #000;
}

.logo img {
  width: 120px; /* 8px * 15 */
  border-radius: 50%;
}

.project-grid {
  display: flex;
  gap: 8px; /* Base Grid Unit */
  margin-bottom: 64px; /* 8px * 8 */
  flex-wrap: wrap;
  justify-content: center;
}

.project-item {
  width: 80px; /* 8px * 10 */
  height: 80px; /* 8px * 10 */
  border-radius: 8px; /* Base Grid Unit */
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
}

.project-item:hover {
  transform: scale(1.25);
}

.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Projekt-Namen in den Boxen */
.project-item span {
  font-family: "Black Mustang", "Arial", sans-serif !important;
}

.main-text {
  font-family: "False", "Arial", sans-serif;
  font-size: clamp(128px, 15vw, 320px); /* 8px * 16 bis 8px * 40 */
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.85;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.text-layer {
  position: relative;
  display: inline-block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-white {
  color: #fff;
  font-family: "False", "Arial", sans-serif;
}

.text-red {
  color: #27c3b1;
  color: linear-gradient(
    240deg,
    rgb(19, 109, 98) 0%,
    rgba(149, 248, 215, 1) 100%
  );
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  font-family: "False", "Arial", sans-serif;
  transition: text-shadow 0.3s ease;
}

.main-text.active .text-layer {
  transform: translateY(-100%);
}

.tagline {
  margin-top: 32px; /* 8px * 4 */
  font-size: 20px; /* 8px * 2.5 - aufgerundet zu nächstem logischen Wert */
  color: #888;
  text-align: center;
  max-width: 600px; /* 8px * 75 */
  line-height: 1.6;
  font-family: "Arial", sans-serif;
  position: relative;
  overflow: hidden;
}

.tagline-layer {
  position: relative;
  display: inline-block;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.tagline-default {
  color: #888;
}

.tagline-project {
  color: #27c3b1;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
}

.tagline.active .tagline-layer {
  transform: translateY(-100%);
}

.project-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.project-item:hover::before {
  opacity: 0.8;
}

/* PASSWORT-OVERLAY STYLES */
.password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.password-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.password-container {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(96, 247, 255, 0.3);
  border-radius: 20px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.password-title {
  font-family: "Black Mustang", Arial, sans-serif;
  font-size: 28px;
  color: #27c3b1;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(39, 195, 177, 0.3);
}

.password-subtitle {
  color: #888;
  margin-bottom: 30px;
  font-size: 14px;
}

.password-input {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(96, 247, 255, 0.3);
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  margin-bottom: 20px;
  outline: none;
  transition: all 0.3s ease;
  text-align: center;
  letter-spacing: 2px;
}

.password-input:focus {
  border-color: #27c3b1;
  box-shadow: 0 0 20px rgba(39, 195, 177, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.password-input::placeholder {
  color: #666;
  letter-spacing: normal;
}

.password-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.password-button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #27c3b1 0%, #1e9a8a 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.password-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(39, 195, 177, 0.3);
}

.password-button:active:not(:disabled) {
  transform: translateY(0);
}

.password-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.error-message {
  color: #ff4757;
  font-size: 14px;
  margin-top: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  min-height: 20px;
}

.error-message.show {
  opacity: 1;
}

.attempts-warning {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-radius: 8px;
  padding: 10px;
  margin-top: 15px;
  font-size: 12px;
  color: #ff4757;
}

.lockout-message {
  background: rgba(255, 71, 87, 0.2);
  border: 1px solid rgba(255, 71, 87, 0.5);
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
  font-size: 14px;
  color: #ff4757;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 16px; /* 8px * 2 */
  }

  .project-item {
    width: 64px; /* 8px * 8 */
    height: 64px; /* 8px * 8 */
  }

  .project-grid {
    gap: 8px; /* Bleibt gleich */
    margin-bottom: 48px; /* 8px * 6 */
  }

  .tagline {
    font-size: 16px; /* 8px * 2 */
    padding: 0 16px; /* 8px * 2 */
    margin-top: 24px; /* 8px * 3 */
  }

  .logo {
    top: 40px; /* 8px * 5 */
    left: 40px; /* 8px * 5 */
  }

  .logo img {
    width: 80px; /* 8px * 10 */
  }

  /* Mobile Font-Anpassungen */
  .main-text {
    font-size: clamp(64px, 12vw, 128px); /* 8px * 8 bis 8px * 16 */
  }

  .project-item span {
    font-size: 16px !important; /* 8px * 2 */
  }

  /* Mobile Background Anpassungen */
  .dot {
    width: 2px;
    height: 2px;
    background: rgba(96, 247, 255, 0.5);
    box-shadow: 0 0 3px rgba(96, 247, 255, 0.3);
  }

  .dot::before {
    width: 5px;
    height: 5px;
    top: -1.5px;
    left: -1.5px;
  }

  .network-line {
    stroke-width: 0.8;
    stroke: rgba(96, 247, 255, 0.35);
  }

  /* Mobile Passwort-Overlay Anpassungen */
  .password-container {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .password-title {
    font-size: 24px;
  }
  
  .password-input {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .password-button {
    padding: 12px;
    font-size: 14px;
  }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
  .container {
    padding: 16px; /* 8px * 2 */
  }

  .project-item {
    width: 56px; /* 8px * 7 */
    height: 56px; /* 8px * 7 */
  }

  .project-grid {
    gap: 8px; /* Base Grid bleibt konsistent */
    margin-bottom: 40px; /* 8px * 5 */
  }

  .logo {
    top: 24px; /* 8px * 3 */
    left: 24px; /* 8px * 3 */
  }

  .logo img {
    width: 64px; /* 8px * 8 */
  }

  .tagline {
    font-size: 14px; /* Kleinste lesbare Größe */
    padding: 0 16px;
    margin-top: 24px; /* 8px * 3 */
    line-height: 1.5; /* Bessere Lesbarkeit auf kleinen Screens */
  }

  .main-text {
    font-size: clamp(48px, 10vw, 96px); /* 8px * 6 bis 8px * 12 */
  }

  .project-item span {
    font-size: 14px !important;
  }

  .password-container {
    padding: 25px 15px;
    margin: 15px;
  }
  
  .password-title {
    font-size: 20px;
  }
  
  .password-input {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .password-button {
    padding: 10px;
    font-size: 13px;
  }
}

/* Größere Desktop Screens */
@media (min-width: 1200px) {
  .container {
    padding: 48px; /* 8px * 6 */
  }

  .logo {
    top: 96px; /* 8px * 12 */
    left: 96px; /* 8px * 12 */
  }

  .logo img {
    width: 144px; /* 8px * 18 */
  }

  .project-item {
    width: 96px; /* 8px * 12 */
    height: 96px; /* 8px * 12 */
  }

  .project-grid {
    gap: 0px; /* 8px * 2 */
    margin-bottom: 80px; /* 8px * 10 */
  }

  .tagline {
    font-size: 24px; /* 8px * 3 */
    max-width: 800px; /* 8px * 100 */
    margin-top: 40px; /* 8px * 5 */
  }

  .project-item span {
    font-size: 28px !important; /* 8px * 3.5 - aufgerundet */
  }
}