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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 1.1em;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-around;
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    opacity: 0.4;
    transition: all 0.3s;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 0.7;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ccc;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.step.active .step-number {
    background: #667eea;
    transform: scale(1.2);
}

.step.completed .step-number {
    background: #4caf50;
}

.step-label {
    font-size: 0.9em;
    color: #666;
}

.step.active .step-label {
    color: #667eea;
    font-weight: bold;
}

/* Main Content */
main {
    padding: 40px;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8em;
}

h3 {
    color: #555;
    margin: 20px 0 15px 0;
    font-size: 1.3em;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9ff;
}

.upload-area:hover {
    background: #eef2ff;
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.3em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #999;
}

/* Preview */
.preview-container {
    margin-top: 30px;
    text-align: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin: 20px 0;
}

.file-info {
    color: #666;
    margin: 10px 0 20px 0;
}

/* Quality Score */
.quality-score {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 30px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: white;
    color: #333;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.score-value {
    font-size: 3em;
    font-weight: bold;
}

.score-max {
    font-size: 1.2em;
    color: #999;
}

.score-rating {
    font-size: 1.3em;
    opacity: 0.9;
}

/* Issues List */
.issues-list {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 8px;
}

.issue-item {
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.issue-item.high {
    border-left: 4px solid #dc3545;
}

.issue-item.moderate {
    border-left: 4px solid #ffc107;
}

.issue-item.mild {
    border-left: 4px solid #28a745;
}

.issue-severity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 10px;
}

.severity-high {
    background: #dc3545;
    color: white;
}

.severity-moderate {
    background: #ffc107;
    color: #333;
}

.severity-mild {
    background: #28a745;
    color: white;
}

/* Recommendation Box */
.recommendation-box {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 25px;
    border-radius: 8px;
}

.recommendation-box h4 {
    color: #2196F3;
    font-size: 1.4em;
    margin-bottom: 10px;
}

/* Profile Cards */
.profile-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.profile-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.profile-card.selected {
    border-color: #667eea;
    background: #f8f9ff;
}

.profile-card.recommended {
    border-color: #ffc107;
    background: #fffef5;
}

.profile-badge {
    position: absolute;
    top: -12px;
    right: 15px;
    background: #ffc107;
    color: #333;
    padding: 5px 15px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.85em;
}

.profile-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.profile-card h4 {
    color: #333;
    margin-bottom: 10px;
}

.profile-card p {
    color: #666;
    margin-bottom: 15px;
}

.profile-card ul {
    list-style: none;
    padding: 0;
}

.profile-card li {
    padding: 5px 0;
    color: #666;
}

.profile-card li:before {
    content: "✓ ";
    color: #4caf50;
    font-weight: bold;
}

/* Comparison Image */
.comparison-view {
    text-align: center;
    margin: 30px 0;
}

.comparison-image {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

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

.btn-tertiary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-tertiary:hover {
    background: #f8f9ff;
}

.btn-large {
    font-size: 1.2em;
    padding: 20px 40px;
}

.btn-format {
    background: white;
    color: #667eea;
    border: 2px solid #e0e0e0;
    padding: 12px 25px;
}

.btn-format.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 60px;
}

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

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

/* Footer */
footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .progress-bar {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .step {
        flex: 1 1 30%;
    }
    
    main {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
