﻿.analysis-grid {
    display: grid;
    grid-template-columns: 260px minmax(380px, 1fr) 360px;
    gap: 1.5rem;
    align-items: start;
}

.legend-col { width: 260px; }
.measurements-col { width: 360px; }

/* Force explicit column placement to avoid stacking */
.analysis-grid > .legend-col { grid-column: 1; }
.analysis-grid > .center-col { grid-column: 2; }
.analysis-grid > .measurements-col { grid-column: 3; }

@media (max-width: 1024px) {
    .analysis-grid { display: flex; flex-direction: column; gap: 1rem; }
    .legend-col, .center-col, .measurements-col { width: 100%; }
}
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #111827;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode styles */
body.dark {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark header {
    color: #f1f5f9;
}

body.dark .subtitle {
    color: #cbd5e1;
}

body.dark .upload-area {
    background: #1e293b;
    border-color: #334155;
}

body.dark .upload-area:hover {
    border-color: #6366f1;
}

body.dark .upload-content h3 {
    color: #f1f5f9;
}

body.dark .upload-content p {
    color: #94a3b8;
}

body.dark .url-input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark .url-input:focus {
    border-color: #6366f1;
    background: #0f172a;
}

body.dark .upload-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

body.dark .upload-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

body.dark .preview-card,
body.dark .paired-legend,
body.dark .metrics-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark .paired-legend .legend-title {
    color: #f1f5f9;
}

body.dark .legend-list li {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark .visualization-controls label {
    color: #f1f5f9;
}

body.dark select {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark .results-table,
body.dark table {
    background: #1e293b;
}

body.dark th {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark tbody tr:nth-child(odd) {
    background: #1e293b;
}

body.dark tbody tr:hover {
    background: #334155;
}

body.dark td {
    color: #f1f5f9;
    border-bottom-color: #334155;
}

body.dark .analysis-section h2 {
    color: #f1f5f9;
}

body.dark .processing {
    color: #cbd5e1;
}

body.dark .image-preview,
body.dark .image-container {
    background: #0f172a;
}

body.dark .preview-card {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark .viz-quick-actions button {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark .viz-quick-actions button:hover {
    background: #334155;
    border-color: #6366f1;
}

body.dark .analysis-section {
    background: transparent;
}

body.dark .metrics-card__header {
    background: #0f172a;
    border-bottom-color: #334155;
    color: #f1f5f9;
}

body.dark .metrics-card__body {
    background: #1e293b;
}

body.dark .technology-section,
body.dark .crypto-section {
    background: #1e293b;
    border-color: #334155;
}

body.dark .technology-section h2,
body.dark .crypto-section h3 {
    color: #f1f5f9;
}

body.dark .technology-section p,
body.dark .crypto-section p {
    color: #cbd5e1;
}

body.dark .technology-section code {
    background: #0f172a;
    color: #f87171;
}

body.dark .dex-item {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
}

body.dark .dex-item h4 {
    color: #f1f5f9;
}

body.dark .loading {
    border-color: #334155;
    border-top-color: #6366f1;
}

/* Review page specific dark mode styles */
body.dark .analysis-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark .analysis-card:hover {
    border-color: #475569;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

body.dark .analysis-card h3 {
    color: #f1f5f9;
}

body.dark .analysis-card .card-meta {
    color: #94a3b8;
}

body.dark .delete-btn {
    background: #dc2626;
    color: #fff;
}

body.dark .delete-btn:hover {
    background: #b91c1c;
}

body.dark .view-details-btn {
    background: #6366f1;
    color: #fff;
}

body.dark .view-details-btn:hover {
    background: #7c3aed;
}

body.dark .expanded-details {
    background: #0f172a;
    border-color: #334155;
}

body.dark .expanded-details h4 {
    color: #f1f5f9;
}

body.dark .expanded-details .detail-item {
    color: #cbd5e1;
}

body.dark .expanded-details .detail-label {
    color: #94a3b8;
}

body.dark .recalculate-btn {
    background: #10b981;
    color: white;
}

body.dark .recalculate-btn:hover {
    background: #059669;
}

/* Navigation Menu */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.dark .top-nav {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: #334155;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.brand:hover {
    color: #7c3aed;
}

body.dark .brand {
    color: #818cf8;
}

body.dark .brand:hover {
    color: #a78bfa;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    padding: 8px 16px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-links a:hover {
    background: #f3f4f6;
    color: #111827;
}

body.dark .nav-links a {
    color: #cbd5e1;
}

body.dark .nav-links a:hover {
    background: #1e293b;
    color: #f1f5f9;
}

.theme-toggle {
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #fbbf24;
}

body.dark .theme-toggle:hover {
    background: #334155;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: #111827;
}

header h1 {
    font-size: 2.25rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.dark .loading-overlay {
    background: rgba(15, 23, 42, 0.95);
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

body.dark .loading-spinner {
    border-color: #334155;
    border-top-color: #6366f1;
}

.loading-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #111827;
}

body.dark .loading-content h3 {
    color: #f1f5f9;
}

.loading-content p {
    color: #6b7280;
    font-size: 16px;
}

body.dark .loading-content p {
    color: #94a3b8;
}

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

/* Upload section */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 3px dashed #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area.ready {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.upload-area:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.upload-content {
    max-width: 400px;
    margin: 0 auto;
}

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

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    margin-bottom: 30px;
}

.url-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: #667eea;
}

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

.upload-btn:hover {
    transform: translateY(-2px);
}

/* Save button */
.save-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 20px auto;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.save-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

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

/* Analysis section */
.analysis-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 8px 20px rgba(17,24,39,0.06);
    border: 1px solid #e5e7eb;
}

.analysis-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2rem;
}

/* Results grid: two columns desktop, stack <992px */
.results-grid { }

/* Three-column desktop grid */
.results-grid-3 {
    display: grid;
    grid-template-columns: 260px minmax(380px, 1fr) 420px;
    gap: 1.5rem;
}

.left-col { width: 260px; }
.center-col { min-height: 320px; }
.right-col { width: 420px; }

/* Legend column scroll */
.left-col .paired-legend { max-height: 520px; overflow-y: auto; }

/* Right table scroll */
.right-col .table-scroll { max-height: 72vh; overflow-y: auto; }

.left-card, .right-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.left-card .visualization-controls { margin: 0 0 12px 0; }

/* Ensure image area minimum height so table aligns visually */
.image-container { min-height: 320px; }

/* Right column table wrapper */
.table-scroll {
    max-height: 520px;
    overflow-y: auto;
}

/* Table visuals */
.metrics-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.metrics-card__header { font-size: 14px; }

th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.measurements-col th, .measurements-col td { padding: 8px 10px; }
th { position: sticky; top: 0; z-index: 1; background: #0f172a; color: #fff; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
tbody tr:nth-child(odd) { background: #fafbff; }
tbody tr:hover { background-color: #f3f6ff; }

@media (max-width: 1024px) {
    .results-grid-3 { display: flex; flex-direction: column; gap: 1rem; padding: 16px; }
    .left-col, .center-col, .right-col { width: 100%; }
    .center-col { order: 1; }
    .right-col { order: 2; }
    .left-col { order: 3; }
}

/* Side-by-side layout for preview and results table */
.results-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.results-layout .image-preview {
    flex: 1 1 0;
    margin-bottom: 0;
}

.paired-legend {
    position: sticky;
    top: 16px;
    flex: 0 0 220px;
    max-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(17,24,39,0.06);
    border: 1px solid #e5e7eb;
    padding: 12px;
    max-height: calc(100vh - 160px);
    overflow: auto;
}

.paired-legend .legend-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.legend-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.legend-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.94rem;
    color: #333;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fafafa;
}

.legend-list li::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    background: #ccc;
}

.legend-list li[data-color="red"]::before { background: #ff3b30; }
.legend-list li[data-color="lightblue"]::before { background: #87cefa; }
.legend-list li[data-color="blue"]::before { background: #007bff; }
.legend-list li[data-color="orange"]::before { background: #ffa500; }
.legend-list li[data-color="purple"]::before { background: #a855f7; }
.legend-list li[data-color="pink"]::before { background: #ff69b4; }
.legend-list li[data-color="green"]::before { background: #22c55e; }
.legend-list li[data-color="yellow"]::before { background: #facc15; }
.legend-list li[data-color="grey"]::before { background: #9ca3af; }
.legend-list li[data-color="aquamarine"]::before { background: #7fffd4; }
.legend-list li[data-color="magenta"]::before { background: #ff00ff; }
.legend-list li[data-color="cyan"]::before { background: #06b6d4; }

.results-layout .results-table {
    /* replaced by .metrics-card */
}

.visualization-controls {
    margin: 1rem 0 1.25rem 0;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.visualization-controls label {
    font-weight: 600;
    color: #111827;
}

.visualization-controls select {
    flex: 1;
    max-width: 320px;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #111827;
    font-size: 0.95rem;
    cursor: pointer;
}

.visualization-controls select:hover { border-color: #9ca3af; }

.visualization-controls select option { background: #ffffff; color: #111827; }

.viz-quick-actions {
    display: flex;
    gap: .5rem;
}

.viz-quick-actions button {
    background: #0ea5e9;
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: .4rem .6rem;
    cursor: pointer;
}

.viz-quick-actions button:hover { background: #0284c7; }

.image-preview {
    text-align: center;
    margin-bottom: 30px;
}

.image-container {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 72vh;
}

.image-preview img {
    width: 100%;
    height: auto;
    max-height: 72vh;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: block;
}

#overlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 15px;
}

/* White cards for center and right panels */
.preview-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(17,24,39,0.06);
    border: 1px solid #e5e7eb;
    padding: 12px;
}

.metrics-card {
    width: 100%;
    position: static;
    max-height: none;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(17,24,39,0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.results-table {
    overflow-x: auto;
}

/* Metrics card styles */
.metrics-card {
    flex: 0 0 520px;
    max-width: 520px;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}
.metrics-card__header {
    padding: 12px 16px;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}
.metrics-card__body {
    overflow: auto;
}

/* Colored chips in first column to mirror overlay */
tbody tr[data-color] td:first-child { position: relative; padding-left: 28px; }
tbody tr[data-color] td:first-child::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1;
}
tbody tr[data-color="red"] td:first-child::before { background: #ff3b30; }
tbody tr[data-color="lightblue"] td:first-child::before { background: #87cefa; }
tbody tr[data-color="blue"] td:first-child::before { background: #007bff; }
tbody tr[data-color="orange"] td:first-child::before { background: #ffa500; }
tbody tr[data-color="purple"] td:first-child::before { background: #a855f7; }
tbody tr[data-color="pink"] td:first-child::before { background: #ff69b4; }
tbody tr[data-color="green"] td:first-child::before { background: #22c55e; }
tbody tr[data-color="yellow"] td:first-child::before { background: #facc15; }
tbody tr[data-color="grey"] td:first-child::before { background: #9ca3af; }
tbody tr[data-color="aquamarine"] td:first-child::before { background: #7fffd4; }

/* Export button styles */
.export-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.export-btn:active {
    transform: translateY(0);
}

.export-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
tbody tr[data-color="magenta"] td:first-child::before { background: #ff00ff; }
tbody tr[data-color="cyan"] td:first-child::before { background: #06b6d4; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #eef0f3;
    vertical-align: middle;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f4f6;
    color: #111827;
    font-weight: 700;
}

tbody tr:nth-child(odd) { background: #fafbff; }
tbody tr:hover { background-color: #f3f6ff; }

/* Colorize table rows to match overlay stroke colors */
tbody tr[data-color="red"] { border-left: 4px solid #ff3b30; }
tbody tr[data-color="lightblue"] { border-left: 4px solid #87cefa; }
tbody tr[data-color="blue"] { border-left: 4px solid #007bff; }
tbody tr[data-color="orange"] { border-left: 4px solid #ffa500; }
tbody tr[data-color="purple"] { border-left: 4px solid #a855f7; }
tbody tr[data-color="pink"] { border-left: 4px solid #ff69b4; }
tbody tr[data-color="green"] { border-left: 4px solid #22c55e; }
tbody tr[data-color="yellow"] { border-left: 4px solid #facc15; }
tbody tr[data-color="grey"] { border-left: 4px solid #9ca3af; }
tbody tr[data-color="aquamarine"] { border-left: 4px solid #7fffd4; }
tbody tr[data-color="magenta"] { border-left: 4px solid #ff00ff; }
tbody tr[data-color="cyan"] { border-left: 4px solid #06b6d4; }

tbody tr[data-color] {
    background-image: none;
}

/* Technology section */
.technology-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.technology-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2rem;
}

.technology-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.technology-section code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
}

/* Crypto section */
.crypto-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.crypto-section h3 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8rem;
    text-align: center;
}

.dex-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.dex-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.dex-item:hover {
    transform: translateY(-5px);
}

.dex-item h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.dex-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.dex-link:hover {
    transform: translateY(-2px);
}

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-inner {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        margin-top: 8px;
        gap: 4px;
    }
    
    .nav-links a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .brand {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .analysis-section, .technology-section, .crypto-section {
        padding: 20px;
    }

    .results-layout {
        flex-direction: column;
        gap: 16px;
    }
    .paired-legend {
        position: static;
        max-width: 100%;
        max-height: none;
    }
    .results-layout .results-table {
        flex: none;
        max-width: 100%;
        position: static;
        max-height: none;
        padding: 0;
        box-shadow: none;
    }
    
    .dex-links {
        grid-template-columns: 1fr;
    }
}
