body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.8rem;
}

header p {
    color: #7f8c8d;
    font-size: 1rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea {
    resize: vertical;
}

button {
    width: 100%;
    padding: 14px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
    background-color: #2980b9;
}
button:active {
    transform: scale(0.98);
}
button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.result-container {
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.result-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.result-card .score {
    font-size: 0.9rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 5px;
    float: right;
    background: #eafaf1;
    padding: 3px 8px;
    border-radius: 12px;
}

.result-card .source {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

.result-card pre {
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
    margin: 0;
}


.hidden { display: none; }

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

.error {
    background-color: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #95a5a6;
}