/* Viva Evaluation System - Stylesheet */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #666;
    font-size: 1em;
    font-weight: 300;
}

.viva-form {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 1em;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 30px;
    margin-bottom: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-indicator p {
    color: #666;
    font-size: 1em;
}

/* Results display */
.results {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.results h2 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: 600;
}

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

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

.result-label {
    color: #666;
    font-weight: 500;
    font-size: 1.1em;
}

.result-value {
    color: #333;
    font-weight: 600;
    font-size: 1.3em;
}

/* Grade-specific colors */
.grade {
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

.grade-a {
    background-color: #4caf50;
    color: white;
}

.grade-b {
    background-color: #2196f3;
    color: white;
}

.grade-c {
    background-color: #ff9800;
    color: white;
}

.grade-fail {
    background-color: #f44336;
    color: white;
}

/* Error message */
.error-message {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.error-message p {
    color: #c62828;
    font-weight: 500;
    margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .results {
        padding: 20px;
    }
}
