:root {
    --primary-color: #2563eb;
    --success-color: #10b981;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-color: #d1d5db;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-color);
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: var(--card-bg);
    width: 100%;
    max-width: 800px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

h1 { text-align: center; color: var(--primary-color); margin-bottom: 30px; }

.form-group { margin-bottom: 20px; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fafafa;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Row & Col */
.row { display: flex; gap: 20px; }
.col { flex: 1; }

/* Job Details Box */
.job-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-card {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.detail-card h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.detail-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #e0f2fe;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-wrapper:hover {
    background: #e0f2fe;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon { font-size: 2rem; margin-bottom: 5px; }
.upload-text { color: var(--text-color); font-weight: 600; }

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: #f0fdf4;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}
.checkbox-label input { width: auto; }

/* AI Result */
.ai-result {
    background: #f0f9ff;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

.ai-result h3 { color: var(--primary-color); margin-bottom: 15px; }

.result-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.8;
    white-space: pre-line;
}

.match-percentage {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.match-high { background: #dcfce7; color: #166534; }
.match-medium { background: #fef9c3; color: #854d0e; }
.match-low { background: #fee2e2; color: #991b1b; }

/* Loading */
.loading { text-align: center; padding: 30px; }
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    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); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}
.btn-submit:hover { background: #059669; transform: translateY(-2px); }

/* Responsive */
@media (max-width: 768px) {
    .row { flex-direction: column; gap: 0; }
    .container { padding: 25px; }
    .job-details { grid-template-columns: 1fr; }
}