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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Achtergrond gradient - subtiel, zeer zachte overgang */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
    z-index: -1;
}

/* Nieuwe achtergrond laag voor zachte crossfade */
.background-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--new-bg, transparent);
    opacity: 0;
    transition: opacity 5s ease-in-out;
}

.background-gradient.transitioning::after {
    opacity: 1;
}

/* Logo of bedrijfsnaam linksboven */
.brand-identity {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 1s ease, transform 1s ease;
    pointer-events: none;
}

.brand-identity.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.brand-identity img {
    display: none;
    height: 70px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.brand-identity img.has-logo {
    display: block;
}

/* Transparante achtergrond voor logo's */
.brand-identity img.remove-bg {
    mix-blend-mode: multiply;
    background: transparent;
}

/* Glass container voor logo's die te veel op achtergrond lijken */
/* Opacity wordt dynamisch bepaald via --glass-opacity CSS variabele */
.brand-identity.glass-container img {
    padding: 16px 20px;
    background: rgba(255, 255, 255, var(--glass-opacity, 0.7));
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Bedrijfsnaam als fallback */
.brand-name-text {
    display: none;
    font-size: 1.6rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.brand-name-text.visible {
    display: block;
}

/* Tekstueel logo (gedetecteerd van website) - groter en meer als logo */
.brand-name-text.text-logo {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-transform: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 550px;
    padding: 20px;
    position: relative;
    min-height: 300px;
}

/* Stappen */
.step {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 510px;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: center;
}

.step.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.step.fade-out {
    opacity: 0;
    transform: translate(-50%, -40%);
}

/* Typografie */
.greeting {
    font-size: 2.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.question {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 300;
    line-height: 1.5;
}

/* Input wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 60px;
    padding: 8px 8px 8px 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: white;
    font-family: inherit;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* URL error message */
.url-error {
    position: absolute;
    bottom: -30px;
    left: 25px;
    font-size: 0.85rem;
    color: #ff6b6b;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
}

.url-error.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-5px); }
}

/* Textarea wrapper */
.textarea-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.textarea-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
}

.textarea-wrapper textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: white;
    font-family: inherit;
    resize: none;
    line-height: 1.6;
}

.textarea-wrapper textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.textarea-wrapper .next-btn {
    align-self: flex-end;
}

/* Volgende button */
.next-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.next-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.next-btn:active {
    transform: scale(0.95);
}

/* Opties grid (medewerkers) */
.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.option-btn {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.option-btn:active {
    transform: translateY(0);
}

.option-btn.selected {
    background: white;
    color: #667eea;
    border-color: white;
}

/* Pincode invoer */
.pin-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.pin-digit {
    width: 50px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.pin-digit:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.pin-digit.filled {
    background: rgba(255, 255, 255, 0.35);
}

.pin-digit.error {
    border-color: #ff6b6b;
    animation: shake 0.3s ease;
}

.pin-digit.success {
    border-color: #51cf66;
    background: rgba(81, 207, 102, 0.3);
}

.pin-error {
    color: #ff6b6b;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-top: 10px;
}

.pin-error.visible {
    opacity: 1;
}

/* Shake animatie */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.shake {
    animation: shake 0.3s ease;
}

/* Responsive */
@media (max-width: 600px) {
    .greeting {
        font-size: 2rem;
    }

    .step {
        padding: 20px;
    }

    .brand-identity {
        top: 20px;
        left: 20px;
    }

    .brand-identity img {
        max-height: 45px;
        max-width: 140px;
    }

    .brand-name-text {
        font-size: 1.2rem;
    }

    .option-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .pin-digit {
        width: 42px;
        height: 52px;
        font-size: 1.5rem;
    }

    .pin-container {
        gap: 8px;
    }
}
