@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body{
    background-color: #c9d6ff;
    background: linear-gradient(135deg, #c73737 0%, #a1227f 50%, #1153bd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
}

.container{
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}

.container p{
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container span{
    font-size: 12px;
}

.container a{
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.container button{
    background-color: #512da8;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

.container button.hidden{
    background-color: transparent;
    border-color: #fff;
}

.container form{
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}

.container input{
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.form-container{
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in{
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.active .sign-in{
    transform: translateX(100%);
}

.sign-up{
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .sign-up{
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

@keyframes move{
    0%, 49.99%{
        opacity: 0;
        z-index: 1;
    }
    50%, 100%{
        opacity: 1;
        z-index: 5;
    }
}

.social-icons{
    margin: 20px 0;
}

.social-icons a{
    border: 1px solid #ccc;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
}

.toggle-container{
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.container.active .toggle-container{
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.toggle{
    background-color: #512da8;
    height: 100%;
    background: linear-gradient(to right, #5c6bc0, #512da8);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.container.active .toggle{
    transform: translateX(50%);
}

.toggle-panel{
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left{
    transform: translateX(-200%);
}

.container.active .toggle-left{
    transform: translateX(0);
}

.toggle-right{
    right: 0;
    transform: translateX(0);
}

.container.active .toggle-right{
    transform: translateX(200%);
}

.container button {
    transition: background-color 0.6s ease, transform 0.6s ease, box-shadow 0.6s ease !important; /* Sanfter Übergang */
}

.container button:hover {
    background-color: #3ee016; /* Grüner Hintergrund beim Hover */
    color: white; /* Weiße Schriftfarbe beim Hover */
    transition: background-color 0.3s ease, transform 0.3s ease !important; /* Weicher Hover-Effekt */
    transform: scale(1.05); /* Vergrößert den Button leicht */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Leichter Schatten */
}

.form-container button {
    transition: background-color 0.6s ease, transform 0.6s ease, box-shadow 0.6s ease !important; /* Sanfter Übergang */
}

.form-container button:hover {
    background-color: #28ce12; /* Grüner Hintergrund beim Hover */
    color: white; /* Weiße Schriftfarbe beim Hover */
    transform: scale(1.02) !important; /* Vergrößert den Button leicht */
    transition: background-color 0.6s ease, transform 0.6s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Leichter Schatten */
    transition: all 0.3s ease !important; /* Sanfter Übergang */
}

button:hover {
    background-color: #32cd32; /* Grüner Hintergrund beim Hover */
    color: white; /* Weiße Schriftfarbe beim Hover */
    transform: scale(1.05); /* Vergrößert den Button leicht */
    transition: all 0.3s ease; /* Sanfter Übergang */
}

nav {
    background-color: #333; /* Dunkler Hintergrund für die Navigationsleiste */
    padding: 1rem 1.5rem; /* Größerer Innenabstand (oben/unten, links/rechts) */
    position: fixed; /* Fixiert die Navigation am oberen Rand */
    width: 100%; /* Dehnt die Navigation über die gesamte Breite aus */
    top: 0; /* Positionierung oben */
    z-index: 1000; /* Legt die Navigation über andere Elemente */
    display: flex; /* Aktiviert Flexbox für die Navigation */
    align-items: center; /* Zentriert Logo und Links vertikal */
    height: 70px; /* Höhe der Navigationsleiste */
}


nav .logo {
    position: relative; /* Macht die Position des Logos relativ */
    left: 32rem; /* Verschiebt das Logo leicht nach rechts */
    display: flex; /* Flexbox für das Logo (falls später Text hinzugefügt wird) */
    align-items: center; /* Zentriert das Logo vertikal */
}

nav .logo img {
    height: 35px; /* Höhe des Logos */
    width: 35px; /* Breite des Logos */
    border-radius: 50%; /* Macht das Bild rund */
    object-fit: cover; /* Passt das Bild an, ohne es zu verzerren */
}

nav ul {
    list-style-type: none; /* Entfernt Aufzählungspunkte */
    display: flex; /* Richtet Listenelemente horizontal aus */
    justify-content: center; /* Zentriert die Links innerhalb der Navigation */
    margin: 0 auto; /* Zentriert die Liste im Flexbox-Container */
    padding: 0; /* Entfernt Padding */
    flex-grow: 1; /* Nutzt verfügbaren Platz, ohne die Links zu verschieben */
}

nav ul li {
    margin: 0 1rem; /* Abstand zwischen den Navigationselementen */
}

nav ul li a {
    color: white; /* Textfarbe für Links in der Navigation */
    text-decoration: none; /* Entfernt die Unterstreichung */
    font-weight: bold; /* Fettgedruckter Text */
    font-size: 1.1rem; /* Größere Schriftgröße */
    transition: color 0.3s ease; /* Weicher Farbwechsel bei Hover */
}


nav ul li a:hover,
nav ul li a.active {
    color: #00a8ff; /* Farbe für aktive oder gehoverte Links */
}


/* Hamburger-Menü Icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    right: 20px;
    z-index: 1100;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(51, 51, 51, 0.95);
    padding-top: 60px;
    transition: all 0.4s ease-in-out;
    z-index: 1050;
}

/* Aktiver Zustand für Mobile Navigation */
.mobile-nav.active {
    left: 0;
}

/* Hamburger Animation */
.hamburger.active span:first-child {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}




@keyframes fadeIn {
    0% {
        transform: translateY(30px); /* Start mit Bewegung */
    }
    100% {
        transform: translateY(0); /* Endposition */
    }
}

.animate-fade-in {
    opacity: 1; /* Keine Animation für Deckkraft */
    transform: translateY(30px); /* Ausgangszustand */
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; /* Optimierter Übergang */
    will-change: transform; /* Nur transform wird animiert */
}

.animate-fade-in {
    backface-visibility: hidden; /* Reduziert Rendering-Probleme */
    perspective: 1000px; /* Hilft bei der GPU-Beschleunigung */
}


@media (min-width: 1024px) {
    .animate-fade-in {
        animation-duration: 0.4s; /* Kürzere Animationszeit auf großen Bildschirmen */
    }
}


@media (max-width: 768px) {
    body {
        padding: 20px; /* Verhindert, dass der Inhalt den Rand berührt */
    }

    .container {
        width: 100%; /* Container nimmt die volle Breite ein */
        min-height: 600px; /* Passt die minimale Höhe für kleinere Geräte an */
        border-radius: 15px; /* Kleinere Abrundung */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Leichter Schatten */
    }

    .toggle-container {
        border-radius: 0; /* Entfernt die Abrundung auf kleineren Geräten */
    }

    .toggle-panel {
        padding: 10px; /* Weniger Padding für schmalere Bildschirme */
    }

    .container button {
        width: 90%; /* Buttons nehmen fast die gesamte Breite ein */
        font-size: 14px; /* Größere Schrift für bessere Lesbarkeit */
        padding: 12px; /* Mehr Platz für das Tippen */
    }

    .container input {
        font-size: 14px; /* Größere Eingabefelder */
        padding: 12px; /* Mehr Platz in den Feldern */
    }

    h1 {
        font-size: 20px; /* Kleinere Überschriften */
        margin-bottom: 15px;
    }

    .toggle {
        transform: translateX(0); /* Keine Verschiebung auf kleinen Bildschirmen */
    }

    .form-container {
        width: 100%; /* Jede Seite nimmt die gesamte Breite ein */
    }

    .toggle-left, .toggle-right {
        transform: translateX(0); /* Panels bleiben statisch */
    }

    .social-icons a {
        width: 35px;
        height: 35px; /* Kleinere Icons */
        margin: 5px; /* Weniger Abstand zwischen Icons */
    }
}


