body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    color: #333;
    text-align: center;
}

.upload-section {
    text-align: center;
    margin-bottom: 20px;
}

input[type="file"] {
    margin: 10px 0;
    padding: 8px;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#status {
    margin: 10px 0;
    min-height: 20px;
}

.error {
    color: #dc3545;
}

.success {
    color: #28a745;
}

.slice-viewer {
    text-align: center;
}

.slice-viewer img {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 16px;
}

.slider-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

#sliceSlider {
    width: 320px;
    max-width: 100%;
}

.nav-btn, .summary-nav {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.nav-btn:hover, .summary-nav:hover {
    background-color: #0056b3;
}

.slider-label {
    margin-top: 8px;
    font-size: 14px;
    color: #555;
}

.summary-block {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.summary-section {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 18px 22px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.summary-section h2 {
    margin-top: 0;
    font-size: 20px;
    color: #333;
}

.summary-section ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.summary-section li {
    margin-bottom: 10px;
    color: #444;
    font-size: 14px;
}

.prediction-note {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.overlay-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.legend-item {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    color: #333;
    flex: 1;
    min-width: 220px;
}

.interpretation-panel {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
    border: 1px solid rgba(118, 75, 162, 0.25);
    color: #2f2f55;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
}

.interpretation-panel h3 {
    margin-top: 0;
    font-size: 20px;
    color: #3b2d6e;
}

.interpretation-panel ul {
    list-style: disc;
    padding-left: 22px;
    margin: 12px 0 0;
}

.interpretation-panel li {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.best-slice-summary {
    background-color: #eef2ff;
    border: 1px solid #d1d7ff;
    color: #2c3a72;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 14px;
}

.legend-red {
    border-color: #c82333;
    background-color: #f8d7da;
    color: #721c24;
}

.legend-yellow {
    border-color: #ffeeba;
    background-color: #fff3cd;
    color: #856404;
}

.summary-footer {
    margin-top: 16px;
    color: #777;
    font-size: 13px;
}

#plotContainer {
    margin-top: 20px;
}

#plot {
    width: 100%;
    height: 600px;
}

.interactive-3d {
    margin-top: 30px;
    text-align: center;
}

.interactive-3d h2 {
    color: #333;
    margin-bottom: 20px;
}

/* Slice table styling */
.slice-table { width:100%; border-collapse: collapse; margin-top:8px; }
.slice-table th, .slice-table td { border:1px solid #ddd; padding:6px 8px; text-align:center }
.slice-table th { background:#f5f5f5; }
.slice-table td { color: #222; min-height: 20px; }
.slice-table tbody tr { display: table-row; }