/* ============= Allgemeine Styles ============= */
body {
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1e272e; /* Dunkles Grau - Beinahe Schwarz */
    color: #ffffff; /* Weiß */
    overflow: hidden; /* Inhalt wird bis zum Laden gerendert */
}

/* ============= Typografie ============= */
.site-title {
    font-size: 2.75rem;
    color: #a29bfe; /* Helles Violett */
    text-shadow: 0 0 8px rgba(162, 155, 254, 0.5);
    letter-spacing: -0.05em;
    margin: 0.5em 0;
}

/* ============= Ladebildschirm ============= */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1e272e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: #ffffff;
}

/* Zahnradanimation */
.gear, .gear.inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
}

.gear {
    margin-bottom: 20px; /* Abstand */
    animation: rotate 4s linear infinite;
}

.gear.inner {
    width: 40px;
    height: 40px;
    animation: rotate 2s linear reverse;
    top: 10px;
    left: 10px;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.tooth {
    position: absolute;
    width: 10px;
    height: 20px;
    background-color: #a29bfe;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tooth:nth-child(1) { transform: rotate(0deg) translateY(-25px); }
.tooth:nth-child(2) { transform: rotate(90deg) translateY(-25px); }
.tooth:nth-child(3) { transform: rotate(180deg) translateY(-25px); }
.tooth:nth-child(4) { transform: rotate(270deg) translateY(-25px); }

.loading-text {
    margin-top: 20px;
    font-size: 1.1em;
    opacity: 0.7; /* Erhält Text subtil */
}

/* ============= Login-Modal-Styles ============= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 39, 46, 0.8);
    z-index: 10;
    justify-content: center;
    align-items: center;
    overflow: auto; /* Führt zur Benutzerfreundlichkeit, wenn es zusätzlichen Inhalt gibt */
}

.modal-content {
    background-color: #2c3e50; /* Dunklere Farbpalette */
    padding: 2.5rem;
    border-radius: 14px;
    width: 90%;
    max-width: 520px; /* Moderat grösser */
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

/* ============= Input Styles ============= */
.input-group {
    margin-bottom: 2rem;
    position: relative; /* Ermöglicht absolute Positionierung des Focus-Background */
}

.input-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 400;
    color: #fff;
    opacity: 0.8; /* Klarheit bei Verwendung mit dunklerer Farbpalette */
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.08); /* Subtilerer Farbton */
    color: #fff;
    transition: box-shadow 0.3s; /* Bessere Übergänge */
    position: relative; /* Positionierung der Inhalte */
    overflow: hidden;
}

.input-group input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(162, 155, 254, 0.6);
}

.focus-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;  /* Volle Breite des Eingabefelds */
    height: 100%; /* Volle Höhe des Eingabefelds */
    background: rgba(162, 155, 254, 0.15); /* Hervorgehobener Hintergrundeffekt */
    z-index: -1;
    border-radius: 6px;
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.input-group input:focus + .focus-bg {
    opacity: 1;
    transform: scaleX(1);
}

/* ============= Login-Button Styles ============= */
.styled-button {
    background-color: #a29bfe; /* Die aktive Farbe in Login behalten */
    color: #1e272e;
    padding: 1.1rem 1.6rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.5);
}

.styled-button:hover {
    background-color: #9189ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(162, 155, 254, 0.5);
}

/* ============= Footer für Log-in und Footer-Bereich ============= */
.error-message {
    color: #ff7675; /* Gut lesbarer Alarmfarbton */
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.copyright {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.8rem;
    color: #ccc; /* Bleibt konsistent mit dunklen Modi */
    opacity: 0.6;
}

/* ============= Animation ============= */
@keyframes neon-glow {
    from {
        text-shadow:
            0 0 8px #fff,
            0 0 12px #a29bfe,
            0 0 24px #a29bfe;
    }
    to {
        text-shadow:
            0 0 4px #fff,
            0 0 6px #a29bfe,
            0 0 12px #a29bfe;
    }
}

.neon-text {
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow:
        0 0 8px #fff,
        0 0 12px #a29bfe,
        0 0 24px #a29bfe;
    animation: neon-glow 1.6s ease-in-out infinite alternate;
    letter-spacing: -0.03em;
}