/* Ensure consistent box sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Main Form Container */
#signin-form, #register-form {
    max-width: 420px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: linear-gradient(145deg, #1f2937, #111827);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    font-family: 'Inter', sans-serif;
    color: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Title & Subtitle */
.signin-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.signin-subtitle {
    text-align: center;
    font-size: 1rem;
    margin: 0;
    color: #9ca3af;
}

/* Input Fields */
.signin-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.signin-field label {
    font-weight: 500;
    color: #e5e7eb;
}

.signin-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: none;
    background: #374151;
    color: #f9fafb;
    font-size: 1rem;
    transition: 0.3s ease;
    box-shadow: inset 2px 2px 4px #1f2937, inset -2px -2px 4px #4b5563;
}

.signin-input:focus {
    outline: none;
    background-color: #1f2937;
    box-shadow: 0 0 8px 2px #3b82f6;
}

/* Button */
.signin-button {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.5);
    align-self: stretch;
}

.signin-button:hover {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
    transform: translateY(-2px);
}

.signin-button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
}

/* Footer Links */
.signin-footer {
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
    margin-top: -0.5rem;
}

.signin-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signin-footer a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    #signin-form {
        padding: 2rem 1.5rem;
    }

    .signin-title {
        font-size: 1.5rem;
    }
}

.response-message {
    color: #e74c3c; /* bright red */
    margin-top: 10px;
    font-weight: 600;
    display: none; /* hidden by default */
}

.success {
    color: #2ecc71; /* bright green */
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* dunkler Hintergrund */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    animation: fadeIn 1s ease-out;
    pointer-events: none; /* allow clicks to pass through */
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideFadeIn 1s ease-out;
    transform: translateY(50px);
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Fade-in background */
@keyframes fadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(5px); }
}

/* Slide-in from bottom */
@keyframes slideFadeIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}