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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Section */
.header-section {
    width: 100%;
    position: relative;
    margin-bottom: 40px;
}

.header-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content {
    text-align: center;
    color: white;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Card Styling */
.login-card, .main-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.main-card {
    display: grid;
    gap: 30px;
}

/* Logo styling */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 100px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

/* Info icon and popover styles */
.info-icon {
    display: inline-block;
    margin-left: 8px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    position: relative;
}

.info-icon:hover {
    opacity: 1;
}

.info-popover {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: #2c3e50;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 250px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    width: max-content;
}

.info-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2c3e50;
}

.info-popover.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

input[type="password"],
input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input[type="password"]:focus,
input[type="number"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #e74c3c;
    background: white;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 8px;
    color: white;
    margin-bottom: 30px;
}

.user-info strong {
    color: #e74c3c;
    font-weight: 600;
}

.logout-btn {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

.status-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.status-message.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Spinner animation */
.spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading screen styles */
.loading-spinner-container {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-spinner-container p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Submit button with spinner */
#submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form Section */
.form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    border: 1px solid #e9ecef;
}

/* Ingevulde vragen overzicht */
.filled-questions-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 8px;
    padding: 25px;
    color: white;
}

.filled-questions-section h3 {
    margin: 0 0 20px 0;
    color: white;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.filled-questions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.question-badge {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    transition: transform 0.2s ease;
}

.question-badge:hover {
    transform: translateY(-2px);
}

.question-badge.empty {
    background: #6c757d;
    color: #fff;
}

.loading-text, .no-questions-text {
    color: #bdc3c7;
    font-style: italic;
    margin: 0;
    text-align: center;
    font-size: 16px;
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .header-image {
        height: 250px;
    }
    
    .login-card, .main-card {
        padding: 25px;
    }
    
    .logo {
        max-width: 80px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logout-btn {
        width: 100%;
    }
    
    .filled-questions-list {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .header-image {
        height: 200px;
    }
    
    .login-card, .main-card {
        padding: 20px;
    }
}
