* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative; /* Tillagd för att positionera profilbilden */
}

/* NY CSS FÖR PROFILBILDEN */
.profile-pic {
    position: absolute;
    top: 20px;
    left: 30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover; /* Säkerställer att bilden täcker ytan snyggt */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.main-content {
    padding: 40px;
}

.upload-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: #667eea;
    background: #f1f3f9;
}

.upload-area {
    text-align: center;
    cursor: pointer;
    position: relative;
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 10px;
}

.upload-hint {
    color: #6c757d;
    font-size: 0.9rem;
}

#fileInput {
    display: none;
}

.image-preview {
    margin-top: 20px;
    text-align: center;
    display: none;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.category-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.category-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.category-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.category-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.category-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.category-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

.evaluate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.evaluate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.evaluate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results {
    display: none;
    margin-top: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.score-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.score-category {
    font-weight: 600;
    color: #2c3e50;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.score-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 10px;
}

.professional-review {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.review-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.review-text {
    line-height: 1.6;
    color: #495057;
}

@media (max-width: 768px) {
    /* JUSTERINGAR FÖR MINDRE SKÄRMAR */
    .profile-pic {
        width: 60px;
        height: 60px;
        top: 15px;
        left: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}