/* styles.css - Mehr Farbe, VIEL MEHR Zufall & Fix */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 1. ROOT FIX */
html {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
}

/* 2. BODY FIX */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0f172a;
  width: 100%;
  height: 100%;
  overflow-y: auto; 
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar { display: none; }

/* --- Animierter Hintergrund (Angepasst) --- */
.background-shapes {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw; 
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    overflow: hidden;
    pointer-events: none;
    transform: translateZ(0);
}

.shape {
    position: absolute;
    filter: blur(60px);
    opacity: 0.8;
    border-radius: 50%;
    /* Basis-Animation, wird unten spezifisch überschrieben */
    will-change: transform;
}

/* Blob 1 - Teal */
.shape-1 { 
    top: -10%; left: -10%; 
    width: 60vw; height: 60vw; 
    background: rgba(45, 212, 191, 0.6);
    /* Primzahl-Dauer für weniger Wiederholung */
    animation: floatShape1 37s infinite ease-in-out alternate;
}

/* Blob 2 - Blau */
.shape-2 { 
    bottom: -10%; right: -10%; 
    width: 50vw; height: 50vw; 
    background: rgba(59, 130, 246, 0.6);
    animation: floatShape2 43s infinite ease-in-out alternate;
    animation-delay: -13s; 
}

/* Blob 3 - Lila */
.shape-3 { 
    top: 30%; left: 30%; 
    width: 40vw; height: 40vw; 
    background: rgba(139, 92, 246, 0.5);
    animation: floatShape3 31s infinite ease-in-out alternate;
    animation-delay: -23s; 
}

/* --- Viel komplexere & unberechenbarere Keyframes --- */

@keyframes floatShape1 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    20% { transform: translate(250px, -150px) rotate(45deg) scale(1.2); }
    40% { transform: translate(-100px, 200px) rotate(-30deg) scale(0.8); }
    60% { transform: translate(150px, 100px) rotate(60deg) scale(1.1); }
    80% { transform: translate(-200px, -50px) rotate(-90deg) scale(0.9); }
    100% { transform: translate(50px, -100px) rotate(20deg) scale(1.0); }
}

@keyframes floatShape2 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(-200px, 100px) rotate(-50deg) scale(1.1); }
    50% { transform: translate(100px, -200px) rotate(30deg) scale(0.9); }
    75% { transform: translate(-150px, -100px) rotate(-20deg) scale(1.2); }
    100% { transform: translate(150px, 150px) rotate(70deg) scale(0.8); }
}

@keyframes floatShape3 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    30% { transform: translate(180px, 120px) rotate(80deg) scale(0.9); }
    60% { transform: translate(-220px, -180px) rotate(-60deg) scale(1.1); }
    90% { transform: translate(100px, -80px) rotate(40deg) scale(1.0); }
    100% { transform: translate(-120px, 100px) rotate(-30deg) scale(0.9); }
}

/* --- Glassmorphism Basis --- */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 24px;
}

/* Container & Layout */
.container {
  position: relative;
  z-index: 10;
  padding: 1rem;
  width: 100%;
  flex: 1; 
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

#main-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    width: 100%;
    justify-content: center; 
    display: flex; 
}
#main-content.loaded { opacity: 1; transform: translateY(0); }

.homepage-card {
    padding: 3rem 2rem;
    width: 100%;
    max-width: 550px;
    text-align: center;
    margin: 0 auto;
}

/* Icon Animation */
.icon-wrapper {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    background: -webkit-linear-gradient(#2dd4bf, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(45, 212, 191, 0.4));
    display: flex; justify-content: center; align-items: center; width: 100%;
    animation: floatIcon 4s ease-in-out infinite;
}
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.card h1 { 
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1rem; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2;
}
.card p { 
    font-size: clamp(1rem, 3vw, 1.1rem);
    margin-bottom: 2.5rem; color: rgba(255, 255, 255, 0.7); line-height: 1.6; 
}

/* Buttons */
.hero-btn {
    padding: 16px 40px; font-size: 1.1rem; border: none; border-radius: 50px;
    background: linear-gradient(135deg, #2dd4bf, #3b82f6);
    color: white; cursor: pointer; font-weight: bold;
    box-shadow: 0 4px 15px rgba(45, 212, 191, 0.3);
    transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 10px;
    max-width: 100%; justify-content: center;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(45, 212, 191, 0.5); filter: brightness(1.1); }

#header-login-btn {
    position: absolute; 
    top: 20px; right: 20px; z-index: 100;
    padding: 10px 20px; color: #fff; text-decoration: none; font-weight: 600;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px; backdrop-filter: blur(10px);
    transition: all 0.3s; display: none; font-size: 0.9rem;
}
#header-login-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: #fff; }

/* Login Modal */
#login-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(10px);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
    overflow-y: auto; padding: 1rem;
}
#login-modal.open { opacity: 1; visibility: visible; }
.modal-content {
    background: #1e293b; border: 1px solid rgba(255,255,255,0.1); padding: 2rem;
    border-radius: 24px; width: 100%; max-width: 400px; transform: scale(0.9); transition: 0.3s;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); margin: auto;
}
#login-modal.open .modal-content { transform: scale(1); }
.modal-content h2 { text-align: center; margin-bottom: 2rem; font-weight: 700; }
.input-group { position: relative; margin-bottom: 1.5rem; }
.input-group input {
    width: 100%; padding: 14px 16px; font-size: 16px; color: #fff;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; outline: none; transition: 0.3s;
}
.input-group input:focus { border-color: #2dd4bf; background: rgba(0,0,0,0.3); }
.input-group label {
    position: absolute; top: 50%; left: 16px; transform: translateY(-50%);
    font-size: 1rem; color: rgba(255,255,255,0.5); pointer-events: none; transition: 0.3s;
}
.input-group input:focus + label, .input-group input:not(:placeholder-shown) + label {
    top: -8px; left: 12px; font-size: 0.75rem; padding: 0 4px;
    background: #1e293b; color: #2dd4bf; border-radius: 4px;
}
.login-submit-btn {
    width: 100%; padding: 14px; background: #2dd4bf; border: none;
    border-radius: 12px; color: #0f172a; font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: 0.3s; margin-top: 1rem;
}
.login-submit-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; cursor: pointer; opacity: 0.6; transition: 0.2s; }
.close-btn:hover { opacity: 1; color: #fff; }
.login-message { text-align: center; margin-bottom: 1rem; min-height: 1.2rem; font-size: 0.9rem; color: #ef4444; }
.login-message.success { color: #22c55e; }

/* Loader */
#loading-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #0f172a;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 2000; transition: opacity 0.6s;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-content { display: flex; flex-direction: column; align-items: center; width: 100%; }
.loader-icon { font-size: 3.5rem; margin-bottom: 20px; color: #2dd4bf; animation: pulse 1.5s infinite; display: flex; justify-content: center; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.7; } }
.progress-bar { width: 200px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; margin-bottom: 15px; }
.progress-fill { height: 100%; width: 0%; background: #2dd4bf; transition: width 0.1s linear; box-shadow: 0 0 15px #2dd4bf; }
.loading-text { font-size: 0.9rem; opacity: 0.6; letter-spacing: 1px; text-align: center; }

/* Wartungs-Loader */
.loader {
    border: 3px solid rgba(255,255,255,0.1); border-top: 3px solid #2dd4bf;
    border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto 0;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- FOOTER FIX --- */
.footer {
    width: 100%; text-align: center; font-size: 0.75rem; opacity: 0.4;
    padding: 15px 0;
    margin-top: auto; /* Schiebt Footer nach unten */
    flex-shrink: 0;
}

/* Media Queries */
@media (max-width: 480px) {
    .homepage-card { padding: 2rem 1.5rem; }
}