body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    margin: 0;
    color: #2c3e50;
}

header p {
    margin: 10px 0 0 0;
    color: #7f8c8d;
}

.health-indicator {
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

main {
    display: grid;
    gap: 30px;
}

section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

input[type="email"],
input[type="file"],
input[type="number"] {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

input[type="number"] {
    flex: 0 0 150px;
}

button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.template-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.template-section p {
    margin: 0 0 5px 0;
}

.template-section small {
    color: #6c757d;
    font-size: 14px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    color: #555;
}

.result-value {
    font-weight: 600;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
}

.badge.valid {
    background-color: #d4edda;
    color: #155724;
}

.badge.invalid {
    background-color: #f8d7da;
    color: #721c24;
}

.badge.unknown {
    background-color: #fff3cd;
    color: #856404;
}

.error-message {
    color: #e74c3c;
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.success-message {
    color: #27ae60;
    background-color: #d5f4e6;
    border: 1px solid #a8d5ba;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }

    input[type="email"],
    input[type="file"] {
        min-width: auto;
    }
}