/* ===== CSS Variables - Navy & Egg White Theme ===== */
:root {
    --primary-color: #1e3a5f;
    --primary-hover: #152a45;
    --primary-light: #2d5a8a;
    --secondary-color: #3d8b6e;
    --accent-color: #c9a227;
    --danger-color: #c53030;
    --background-color: #faf8f5;
    --card-background: #fffef9;
    --text-primary: #1a2a3a;
    --text-secondary: #4a5568;
    --border-color: #d8d4cc;
    --navy-dark: #0d1b2a;
    --navy-medium: #1b3a57;
    --navy-light: #415a77;
    --egg-white: #fefcf3;
    --egg-cream: #f5f0e1;
    --shadow-sm: 0 1px 2px 0 rgb(30 58 95 / 0.08);
    --shadow-md: 0 4px 6px -1px rgb(30 58 95 / 0.12), 0 2px 4px -2px rgb(30 58 95 / 0.08);
    --shadow-lg: 0 10px 15px -3px rgb(30 58 95 / 0.15), 0 4px 6px -4px rgb(30 58 95 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }
}

/* ===== Header ===== */
.header {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-medium));
    border-radius: var(--radius-lg);
    color: var(--egg-white);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.header-brand .brand-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header p {
    font-size: clamp(0.875rem, 2vw, 1.1rem);
    opacity: 0.9;
}

.header-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.header-github {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--egg-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.header-github:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.header-github i {
    font-size: 1.2rem;
}

/* ===== Card ===== */
.card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

@media (min-width: 768px) {
    .card {
        padding: 2rem;
    }
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    flex-wrap: wrap;
}

.card h2 i {
    color: var(--primary-color);
}

/* ===== Upload Section ===== */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--egg-white), var(--egg-cream));
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e8eef5, #d4dfe9);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: var(--radius-md);
    display: none;
}

.file-info.show {
    display: block;
}

.file-info .success {
    color: var(--secondary-color);
    font-weight: 600;
}

.options {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.options select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: var(--border-color);
    color: var(--text-primary);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
}

.btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover), #6d28d9);
}

/* ===== Data Preview ===== */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:hover {
    background: #f8fafc;
}

.numeric-cell {
    font-family: 'Consolas', 'Monaco', monospace;
    text-align: right;
}

/* ===== Column Selection ===== */
.column-selection {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.column-selection h3 {
    margin-bottom: 0.5rem;
}

.hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

#columnSelector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.column-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.column-checkbox:hover {
    background: #e2e8f0;
}

.column-checkbox input:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.column-checkbox.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.column-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

/* ===== Step Sections ===== */
.step-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.step-section:nth-child(1) { animation-delay: 0.1s; }
.step-section:nth-child(2) { animation-delay: 0.2s; }
.step-section:nth-child(3) { animation-delay: 0.3s; }
.step-section:nth-child(4) { animation-delay: 0.4s; }
.step-section:nth-child(5) { animation-delay: 0.5s; }
.step-section:nth-child(6) { animation-delay: 0.6s; }
.step-section:nth-child(7) { animation-delay: 0.7s; }
.step-section:nth-child(8) { animation-delay: 0.8s; }
.step-section:nth-child(9) { animation-delay: 0.9s; }
.step-section:nth-child(10) { animation-delay: 1.0s; }

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

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-medium));
    color: var(--egg-white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-header h2 {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
}

.step-content {
    padding-left: 0;
}

@media (min-width: 768px) {
    .step-content {
        padding-left: 3.5rem;
    }
}

.explanation {
    background: linear-gradient(135deg, var(--egg-white), #e8eef5);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.formula {
    background: #fffbeb;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
    margin-bottom: 1.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

.formula small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* ===== Stats Display ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-card .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-card .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Consolas', 'Monaco', monospace;
}

/* ===== Matrix Display ===== */
.matrix-container {
    overflow-x: auto;
    margin: 1rem 0;
}

.matrix-table {
    min-width: 100%;
}

.matrix-table th {
    background: linear-gradient(135deg, #374151, #4b5563);
}

.matrix-table td {
    font-family: 'Consolas', 'Monaco', monospace;
    text-align: center;
}

.positive {
    color: var(--secondary-color);
}

.negative {
    color: var(--danger-color);
}

/* ===== Visualization Tabs ===== */
.visualization-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--egg-cream);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.tab-btn:hover {
    background: #d8d4cc;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-medium));
    color: var(--egg-white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.plot-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.plot-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plot-controls select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
}

/* ===== Plotly Charts ===== */
.js-plotly-plot {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* ===== Export Section ===== */
.export-section {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.export-buttons .btn {
    background: white;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.export-buttons .btn:hover {
    background: var(--secondary-color);
    color: white;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-medium));
    color: var(--egg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-brand i {
    font-size: 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--egg-white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-links a i {
    font-size: 1rem;
}

.footer-copyright {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

/* ===== Loading Spinner ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
    .options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    th, td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== Matrix Cell Colors ===== */
.heat-low { background-color: rgba(239, 68, 68, 0.2); }
.heat-medium-low { background-color: rgba(251, 191, 36, 0.2); }
.heat-medium { background-color: rgba(250, 250, 250, 0.2); }
.heat-medium-high { background-color: rgba(74, 222, 128, 0.2); }
.heat-high { background-color: rgba(34, 197, 94, 0.2); }

/* ===== Before/After Container ===== */
.before-after-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 992px) {
    .before-after-container:not(.vertical) {
        grid-template-columns: 1fr 1fr;
    }
}

.before-after-container.vertical {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.before-after-plot {
    background: linear-gradient(135deg, var(--egg-white), var(--egg-cream));
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.before-after-plot h4 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.before-after-plot h4 i {
    color: var(--primary-color);
}

.before-after-plot .plot-subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ===== PCA Intuition Info Box ===== */
.snr-info {
    background: linear-gradient(135deg, #fef9e7, #fdf4d3);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
    margin: 1rem 0;
}

.snr-info strong {
    color: var(--text-primary);
}

/* ===== Dimension Reduction Box ===== */
.dimension-reduction-box {
    background: linear-gradient(135deg, var(--egg-white), var(--egg-cream));
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
}

.dimension-reduction-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dimension-reduction-box p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.pca-benefits {
    list-style: none;
    padding: 0;
}

.pca-benefits li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.pca-benefits li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.pca-benefits li strong {
    color: var(--primary-color);
}

/* ===== Feature Importance Section ===== */
.feature-importance-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (min-width: 992px) {
    .feature-importance-container {
        grid-template-columns: 1fr 1fr;
    }
}

.importance-section {
    background: var(--egg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.importance-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.importance-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.importance-bar-label {
    min-width: 120px;
    font-weight: 500;
    color: var(--text-primary);
}

.importance-bar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.importance-bar-track {
    flex: 1;
    height: 24px;
    background: var(--egg-cream);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.importance-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--navy-medium), var(--primary-light));
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
    min-width: 4px;
}

.importance-bar-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 50px;
    text-align: right;
}

.importance-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

.importance-rank.top-3 {
    background: var(--accent-color);
}

.importance-rank.other {
    background: var(--text-secondary);
}

.importance-insights {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--egg-white), #e8eef5);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
}

.importance-insights h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.importance-insights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.importance-insights li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.importance-insights li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.importance-insights .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Elbow Point Annotation ===== */
.elbow-annotation {
    background: #fef3c7;
    border: 2px solid var(--accent-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ===== Interpretation Guide ===== */
.interpretation-guide {
    background: linear-gradient(135deg, var(--egg-white), var(--egg-cream));
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.interpretation-guide > h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.guide-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.guide-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.guide-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.guide-icon.clusters {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.guide-icon.outliers {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.guide-icon.spread {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.guide-icon.correlation {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.guide-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.guide-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.guide-examples {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.guide-examples h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-examples ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-examples li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--egg-cream);
}

.guide-examples li:last-child {
    border-bottom: none;
}

.guide-examples li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.guide-examples li strong {
    color: var(--primary-color);
}

.plot-interpretation {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--egg-white), #e8eef5);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--secondary-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.biplot-guide {
    padding: 1rem;
    background: linear-gradient(135deg, #fef9e7, #fdf4d3);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.biplot-guide i {
    color: var(--accent-color);
}

/* ===== Scatter Analysis Styles ===== */
.scatter-analysis {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--egg-white), #f0f4f8);
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary-lighter);
}

.scatter-analysis h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.scatter-analysis h4 i {
    color: var(--secondary-color);
}

.scatter-insights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.insight-item i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.insight-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.insight-success i {
    color: #059669;
}

.insight-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.insight-info i {
    color: #2563eb;
}

.insight-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.insight-warning i {
    color: #d97706;
}

.scatter-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--primary-lighter);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 120px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .scatter-stats {
        flex-direction: column;
    }
    
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        min-width: 100%;
    }
}

/* ===== Print Styles ===== */
@media print {
    .upload-section,
    .export-section,
    .visualization-tabs,
    .plot-controls,
    .interpretation-guide,
    .footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
}
