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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* User info and logout styles */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.logout-btn {
    background-color: #f8f9fa;
    color: #666;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.logout-btn:hover {
    background-color: #e9ecef;
    color: #333;
}

h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

h2, h3 {
    color: #34495e;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    text-align: center;
    color: #666;
}

.upload-form {
    margin-top: 2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"], input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="file"]:focus {
    outline: none;
    border-color: #3498db;
}

.submit-btn, .btn, .save-btn {
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.submit-btn, .btn {
    background-color: #3498db;
}

.submit-btn:hover, .btn:hover {
    background-color: #2980b9;
}

.save-btn {
    background-color: #27ae60;
    margin-left: 10px;
}

.save-btn:hover {
    background-color: #229954;
}

.result-summary {
    background-color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.status {
    color: #f39c12;
    font-weight: 600;
    text-align: left;
}

.results-section {
    margin-bottom: 2rem;
}

.placeholder-results {
    background-color: #f8f9fa;
    padding: 1rem;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.placeholder-results ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.placeholder-results li {
    margin-bottom: 0.5rem;
}

.actions {
    text-align: center;
    margin-top: 2rem;
}

/* Processing page styles */
.processing-info {
    text-align: center;
    margin-bottom: 2rem;
}

.job-id {
    font-family: monospace;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

.progress-indicator {
    margin: 2rem 0;
    text-align: center;
}

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

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

.processing-steps {
    margin: 2rem 0;
}

.steps-list {
    list-style: none;
    padding: 0;
}

.step {
    padding: 0.5rem 0;
    margin: 0.5rem 0;
    border-radius: 4px;
    padding-left: 1rem;
}

.step.processing {
    background-color: #fff3cd;
    color: #856404;
}

.step.pending {
    background-color: #f8f9fa;
    color: #6c757d;
}

.estimated-time {
    background-color: #e7f3ff;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 2rem;
    text-align: center;
}

/* Error page styles */
.error-message {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background-color: #f8d7da;
    border-radius: 8px;
    color: #721c24;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-text {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.error-help {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* Results page styles */
.status.completed {
    color: #27ae60;
}

.overall-score {
    text-align: center;
    margin: 2rem 0;
}

.score-display {
    margin: 1rem 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.abcd-breakdown {
    margin: 2rem 0;
}

.abcd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.abcd-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.abcd-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.score-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.score-fill {
    height: 100%;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
}

.score-text {
    font-weight: 600;
    color: #2c3e50;
}

.feature-details {
    margin: 2rem 0;
}

.features-list {
    margin-top: 1rem;
}

.feature-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #3498db;
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.feature-header h4 {
    margin: 0;
    color: #2c3e50;
}

.feature-category {
    background-color: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.feature-score {
    font-weight: 600;
    color: #27ae60;
}

.feature-description {
    color: #666;
    margin: 0;
    text-align: left;
}

.recommendations {
    margin: 2rem 0;
    background-color: #e7f3ff;
    padding: 1.5rem;
    border-radius: 8px;
}

.recommendations-list {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.recommendations-list li {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.btn-secondary {
    background-color: #6c757d;
    margin-left: 1rem;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Advanced Configuration Styles */
.advanced-config {
    margin: 2rem 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.config-header {
    background-color: #f8f9fa;
    padding: 1rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.config-header:hover {
    background-color: #e9ecef;
}

.advanced-fields {
    padding: 1.5rem;
}

.config-section {
    margin-bottom: 2rem;
}

.config-section h4 {
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.config-section h5 {
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group-small {
    margin-bottom: 1rem;
}

.form-group-small label {
    font-size: 0.9rem;
}

.form-group-small input,
.form-group-small select {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
    padding: 0;
}

.checkmark {
    margin-left: 0.25rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.feature-category {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.feature-category .checkbox-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #3498db;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .feature-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .feature-category,
    .feature-score {
        margin-top: 0.5rem;
    }
    
    .abcd-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}