.expert-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.expert-header {
    text-align: center;
    margin-bottom: 2rem;
}

.expert-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.expert-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Upload Area */
.upload-area {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 2rem;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: #f0f0ff;
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.upload-area p {
    color: #666;
    margin-bottom: 1rem;
}

.file-input-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.file-input-label i {
    margin-right: 0.5rem;
}

#imageInput {
    display: none;
}

/* Preview Section */
.preview-section {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.preview-section.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h3 {
    margin: 0;
    color: #2c3e50;
}

.reset-preview {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.reset-preview:hover {
    transform: scale(1.1);
}

.image-preview-container {
    text-align: center;
    margin-bottom: 1rem;
}

#imagePreview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-info {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 1rem;
}

.analyze-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results Section */
.results-section {
    display: none;
    animation: slideUp 0.5s ease;
}

.results-section.show {
    display: block;
}

/* Image Comparison */
.image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.image-card {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.image-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.image-card img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

/* No Polyp Found */
.no-polyp {
    text-align: center;
    padding: 2rem;
    background: #fed7d7;
    color: #c53030;
    border-radius: 10px;
    margin-bottom: 2rem;
}

/* Result Cards */
.result-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.card-header h2 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge.hyperplastic {
    background: #c6f6d5;
    color: #22543d;
}

.badge.adenoma {
    background: #fed7d7;
    color: #c53030;
}

/* Probability Bars */
.prob-chart {
    margin-top: 1rem;
}

.prob-item {
    margin-bottom: 1rem;
}

.prob-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.prob-bar {
    background: #e2e8f0;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.prob-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    transition: width 1s ease;
    width: 0%;
}

.prob-fill.hyperplastic {
    background: linear-gradient(90deg, #48bb78, #38a169);
}

.prob-value {
    margin-left: 0.5rem;
    font-weight: bold;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 0.25rem;
}

.coverage-visual {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.coverage-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    transition: width 1s ease;
    width: 0%;
}

/* AI Assessment */
.ai-card {
    border-left: 4px solid #667eea;
}

.ai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    margin-bottom: 1rem;
}

.detail-title {
    font-size: 0.8rem;
    color: #718096;
    display: block;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
}

.detail-value.adenomatous {
    color: #e53e3e;
}

.detail-value.hyperplastic {
    color: #38a169;
}

.detail-value.unable {
    color: #ed8936;
}

.agreement-high {
    color: #38a169;
}

.agreement-low {
    color: #ed8936;
}

.description {
    line-height: 1.6;
    color: #4a5568;
}

.recommendations,
.reference {
    margin-top: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
}

.recommendations h3,
.reference h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.recommendations p,
.reference p {
    color: #4a5568;
    line-height: 1.6;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    color: white;
    font-size: 1.2rem;
}

.loading-subtext {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Error Message */
.error-message {
    display: none;
    background: #fed7d7;
    color: #c53030;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    border-left: 4px solid #c53030;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: block;
}

/* Points Warning */
.points-warning {
    background: #fef3c7;
    color: #d97706;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .expert-container {
        padding: 1rem;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .image-comparison {
        grid-template-columns: 1fr;
    }

    .ai-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}