* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #e0e0e0, #cfcfcf);
}

/* Topbar voor terugknop en logo */
.top-bar {
    position: absolute;
    top: 20px;
    left: 30%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    z-index: 10;
}

.back-link {
    text-decoration: none;
    color: #5481B7;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #436c99;
}

/* Card container */
.card-container {
    position: relative;
    width: 800px;
    max-width: 95%;
    height: auto;
    min-height: 520px;
    max-height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    perspective: 1500px;
}

/* Panelen */
.panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1), z-index 0.8s;
    position: relative;
    border-radius: 20px;
    overflow-y: auto;
    max-height: 90vh;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f2f2f2;
}

.left::-webkit-scrollbar,
.right::-webkit-scrollbar {
    width: 6px;
}
.left::-webkit-scrollbar-thumb,
.right::-webkit-scrollbar-thumb {
    background-color: #bbb;
    border-radius: 6px;
}

/* Linker paneel */
.left {
    background: #ffffff;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Rechter paneel */
.right {
    background: #5481B7;
    color: white;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Teksten */
h2, h3 {
    margin-bottom: 0.5rem;
}
p {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
}
.right p, .right h3 {
    color: white;
}

/* Algemene inputs en knoppen */
input {
    margin: 0.7rem 0;
    padding: 0.8rem 1rem;
    width: 100%;
    max-width: 260px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
}
input:focus {
    outline: none;
    border-color: #365d87;
    box-shadow: 0 0 6px #5481B7;
}

button {
    margin-top: 1rem;
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
}
.left button {
    background: #5481B7;
    color: white;
}
.left button:hover {
    background: #436c99;
}
.right button {
    background: white;
    color: #5481B7;
}
.right button:hover {
    background: #f2f2f2;
}

/* Inhoud in panelen */
.login, .email-input, .default, .email-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Verborgen secties standaard */
.left .email-input,
.right .email-side {
    display: none;
    opacity: 0;
    pointer-events: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 2rem;
}

/* Animatie: panelen wisselen */
.card-container.show-email .left {
    transform: translateX(100%) scale(1.05) rotateY(5deg);
    z-index: 1;
    box-shadow: 0 0 40px rgba(0,0,0,0.2);
}
.card-container.show-email .right {
    transform: translateX(-100%) scale(1.05) rotateY(-5deg);
    z-index: 2;
}

/* Reset naar originele posities */
.card-container.reset .left {
    transform: translateX(0) scale(1) rotateY(0);
    z-index: 2;
}
.card-container.reset .right {
    transform: translateX(0) scale(1) rotateY(0);
    z-index: 1;
}


/* Toon juiste content */
.card-container.show-email .left .login {
    display: none;
}
.card-container.show-email .left .email-input {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
.card-container.show-email .right .default {
    display: none;
}
.card-container.show-email .right .email-side {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* Reset naar originele posities */
.card-container.reset .left {
    transform: translateX(0) scale(1);
    z-index: 2;
}
.card-container.reset .right {
    transform: translateX(0) scale(1);
    z-index: 1;
}
.card-container.reset .left .login {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
.card-container.reset .left .email-input {
    display: none;
}
.card-container.reset .right .default {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
.card-container.reset .right .email-side {
    display: none;
}

/* Formulier styling */
.email-input form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.input-group input {
    flex: 1;
    min-width: 120px;
}

/* Kleinere teksten */
.email-input small {
    font-size: 0.75rem;
    color: #555;
    text-align: center;
    display: block;
    margin-top: -0.5rem;
}

/* Button styling */
.email-input button {
    align-self: center;
    background-color: #5481B7;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
}
.email-input button:hover {
    background-color: #436c99;
}

/* Responsief gedrag */
@media (max-width: 850px) {
    .card-container {
        flex-direction: column;
        width: 90%;
        height: auto;
        max-height: none;
        perspective: none;
    }

    .panel {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .left, .right {
        transform: none !important;
        z-index: auto !important;
        max-height: none;
    }

    .card-container.show-email .left,
    .card-container.show-email .right {
        transform: none;
    }

    .email-input, .login, .info {
        padding-bottom: 2rem;
    }

    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    input {
        max-width: 100%;
    }
}
.password-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 260px;
}

.password-group input {
    flex: 1;
    padding-right: 2.2rem;
    height: 42px;
    line-height: 42px;
}
.toggle-password:hover{
    background: #ffffff;
}
.password-group .toggle-password {
    position: absolute;
    right: 0.6rem;
    transform: translateY(-60%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}

