:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --background-gradient: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --input-bg: #f3f4f6;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --font-main: 'Outfit', 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: var(--background-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 800px;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.brand-logo i {
    font-size: 1.8rem;
}

.main-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.instructions {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.instructions h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions ul {
    list-style-position: inside;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--input-bg);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background-color: #fff;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    opacity: 0.95;
    transform: translateY(-2px);
}

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

/* Loading State */
.loading-overlay {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Results Section */
.results-section {
    display: none; /* Hidden by default */
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.score-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 700;
    color: white;
    background: var(--primary-color);
    margin-bottom: 1rem;
}

.correction-content h4 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.correction-text {
    color: var(--text-muted);
    white-space: pre-line;
}

.resources-list li {
    margin-bottom: 0.5rem;
}

.resources-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.resources-list a:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}
