/* Modern CSS for ONB Mod Analyzer */

:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --secondary-color: #4CAF50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --validation-warning-color: #C0CA33;
    --success-color: #4CAF50;
    --bg-color: #1e1e1e;
    --surface-color: #252526;
    --surface-hover: #2a2d2e;
    --border-color: #3e3e42;
    --text-color: #d4d4d4;
    --text-secondary: #9d9d9d;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow: hidden;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.version-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-selector label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.version-selector select {
    padding: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.version-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Main Content */
main {
    flex: 1;
    width: 100%;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Upload Section */
.upload-section {
    margin-bottom: 1rem;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--surface-color);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: var(--surface-hover);
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    color: var(--primary-color);
}

.drop-zone-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.drop-zone-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.mod-history {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

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

.mod-history-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.btn-icon:hover {
    color: var(--error-color);
}

.filter-input {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mod-list {
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    min-height: 0;
}

.mod-list::-webkit-scrollbar {
    width: 12px;
}

.mod-list::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.mod-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

.mod-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Mod list indicator for large datasets */
.mod-list-indicator {
    padding: 12px;
    background: var(--warning-color);
    color: var(--bg-color);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 8px;
}

.mod-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

/* Category-based color tints - must come before other states to set background */
.mod-item.mod-category-player {
    background: rgba(59, 130, 246, 0.05); /* #3b82f6 blue */
}

.mod-item.mod-category-mob {
    background: rgba(168, 85, 247, 0.05); /* #a855f7 purple */
}

.mod-item.mod-category-card {
    background: rgba(251, 191, 36, 0.05); /* #fbbf24 amber */
}

.mod-item.mod-category-library {
    background: rgba(34, 197, 94, 0.05); /* #22c55e green */
}

.mod-item.mod-category-block {
    background: rgba(14, 165, 233, 0.05); /* #0ea5e9 sky blue */
}

.mod-item.mod-category-err {
    background: rgba(220, 38, 38, 0.08); /* #dc2626 red - error category */
}

.mod-item.mod-category-unknown {
    background: rgba(156, 163, 175, 0.05); /* #9ca3af gray */
}

.mod-item:hover {
    filter: brightness(1.2);
    border-color: var(--primary-color);
}

.mod-item.active {
    filter: brightness(1.3);
    border-color: var(--primary-color);
}

.mod-item.processing {
    border-color: var(--warning-color);
    opacity: 0.7;
}

.mod-item.success {
    border-color: var(--success-color);
}

.mod-item.validation-failed {
    border-color: var(--warning-color);
}

.mod-item.failed {
    border-color: var(--error-color);
}

.mod-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-item-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Content Area */
.content-area {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
}

.tab {
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--text-color);
    background: var(--surface-hover);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Sub-Tabs */
.sub-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
    padding: 0 1rem;
}

.sub-tab {
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sub-tab:hover {
    color: var(--text-color);
    background: var(--surface-hover);
}

.sub-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.sub-tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.sub-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Tab Content */
.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.tab-panel {
    padding: 1rem;
    flex: 1;
    overflow: auto;
}

/* JSON Tree View */
.json-tree {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    padding: 1rem;
}

.json-object,
.json-array {
    margin-left: 1rem;
}

.json-array-inline {
    margin-left: 0;
    display: inline;
    white-space: normal;
    word-wrap: break-word;
}

.json-object-content,
.json-array-content {
    margin-left: 1rem;
}

.json-property,
.json-item {
    margin: 0.25rem 0;
}

.json-key {
    color: #9cdcfe;
    font-weight: 600;
}

.json-string {
    color: #ce9178;
}

.json-number {
    color: #b5cea8;
}

.json-boolean {
    color: #569cd6;
    font-weight: 600;
}

.json-null {
    color: #808080;
    font-style: italic;
}

.json-bracket {
    color: var(--text-secondary);
    font-weight: bold;
}

.json-expand {
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    display: inline-block;
}

.json-expand:hover {
    background: rgba(33, 150, 243, 0.2);
    color: var(--primary-color);
}

/* JSON File Path Links */
.json-file-path {
    cursor: pointer !important;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--text-secondary);
    transition: all 0.2s;
}

.json-file-path:hover {
    color: var(--primary-color) !important;
    text-decoration-color: var(--primary-color);
    text-decoration-style: solid;
}

/* File Browser */
.file-browser {
    display: grid;
    grid-template-columns: 250px 4px 1fr;
    gap: 0;
    height: 100%;
    overflow: hidden;
}

.file-tree-container,
.file-preview-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.file-preview-container {
    height: 100%;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem;
    flex-shrink: 0;
}

.preview-header h3 {
    margin: 0;
    font-size: 1rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-download {
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    min-width: auto;
    flex-shrink: 0;
    line-height: 1;
}

.file-tree-container h3 {
    margin: 0;
    padding: 0.5rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.file-tree-scroll-wrapper,
.file-preview-scroll-wrapper {
    flex: 1;
    overflow-y: scroll;
    overflow-x: scroll;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    position: relative;
    min-height: 0;
}

/* Force horizontal scrollbar to always be visible */
.file-tree-scroll-wrapper::after,
.file-preview-scroll-wrapper::after {
    content: '';
    display: block;
    width: 1px;
    height: 0;
}

.file-tree-scroll-wrapper {
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.file-preview-scroll-wrapper {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.file-tree-scroll-wrapper::-webkit-scrollbar:horizontal,
.file-preview-scroll-wrapper::-webkit-scrollbar:horizontal {
    height: 12px;
}

.file-tree-scroll-wrapper::-webkit-scrollbar:vertical,
.file-preview-scroll-wrapper::-webkit-scrollbar:vertical {
    width: 12px;
}

.file-tree-scroll-wrapper::-webkit-scrollbar-track,
.file-preview-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.file-tree-scroll-wrapper::-webkit-scrollbar-thumb,
.file-preview-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

.file-tree-scroll-wrapper::-webkit-scrollbar-thumb:hover,
.file-preview-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.file-tree-scroll-wrapper::-webkit-scrollbar-corner,
.file-preview-scroll-wrapper::-webkit-scrollbar-corner {
    background: var(--bg-color);
}

.file-tree {
    padding: 0.5rem;
    display: inline-block;
    min-width: 100%;
}

.file-preview {
    padding: 1rem;
    display: inline-block;
    min-width: 100%;
}

.file-tree-item {
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 0.875rem;
    white-space: nowrap;
}

.file-tree-item:hover {
    background: var(--surface-hover);
}

.file-tree-item.active {
    background: var(--primary-dark);
}

.resize-handle {
    width: 4px;
    background: var(--border-color);
    cursor: col-resize;
    transition: background 0.2s;
}

.resize-handle:hover {
    background: var(--primary-color);
}

.code-preview {
    display: flex;
    overflow-x: auto;
}

.code-content {
    flex: 1;
    overflow-x: auto;
}

.line-numbers {
    display: inline-block;
    padding-right: 1rem;
    margin-right: 1rem;
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    user-select: none;
    text-align: right;
}

.error-line {
    background: rgba(244, 67, 54, 0.2);
    border-left: 3px solid var(--error-color);
    padding-left: 0.5rem;
}

.warning-line {
    background: rgba(192, 202, 51, 0.15);
    border-left: 3px solid var(--validation-warning-color);
    padding-left: 0.5rem;
}

/* Error Column Marker - Highlights the specific character where the error occurs */
.error-column-marker {
    display: inline;
    background: rgba(244, 67, 54, 0.4);
    padding: 0 2px;
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(244, 67, 54, 0.6);
}

/* Warning Column Marker - Highlights the specific character where the warning occurs */
.warning-column-marker {
    display: inline;
    background: rgba(192, 202, 51, 0.4);
    padding: 0 2px;
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(192, 202, 51, 0.6);
}

/* Error Summary */
.error-summary {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.error-summary-header {
    font-weight: 600;
    color: var(--error-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.error-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.warning-summary {
    background: rgba(192, 202, 51, 0.08);
    border: 1px solid var(--validation-warning-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.warning-summary-header {
    font-weight: 600;
    color: var(--validation-warning-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.warning-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.9rem;
}

.warning-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-color);
}

.warning-location {
    font-family: 'Fira Code', 'Courier New', monospace;
    color: var(--validation-warning-color);
    font-weight: 600;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.warning-location:hover {
    opacity: 0.8;
}

.warning-location {
    font-family: 'Fira Code', 'Courier New', monospace;
    color: var(--validation-warning-color);
    font-weight: 600;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.warning-location:hover {
    opacity: 0.8;
}

.error-location {
    font-family: 'Fira Code', 'Courier New', monospace;
    color: var(--primary-color);
    font-weight: 600;
    flex-shrink: 0;
}

.error-message {
    color: var(--text-color);
}

.warning-message {
    color: var(--text-color);
}

/* Statistics */
.stats-overview {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

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

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

/* Charts Grid Layout */
.stats-charts {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.chart-container {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.chart-container h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

.chart-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-align: center;
    font-weight: 500;
}

.chart-container details {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chart-container details summary {
    cursor: pointer;
    user-select: none;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    list-style: none;
}

.chart-container details summary::-webkit-details-marker {
    display: none;
}

.chart-container details summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s;
}

.chart-container details[open] summary::before {
    transform: rotate(90deg);
}

/* Full-width chart containers */
.chart-container.full-width {
    grid-column: 1 / -1;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 900px) {
    .stats-charts {
        grid-template-columns: 1fr;
    }
}

/* Failed Mods List */
.stats-section {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.stats-section h3 {
    margin-bottom: 1rem;
    color: var(--error-color);
    font-size: 1.25rem;
}

.failed-mods-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.failed-mod-item {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 4px;
    padding: 1rem;
}

.failed-mod-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.failed-mod-error {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: 'Fira Code', 'Courier New', monospace;
}

/* Dependencies Graph */
#dependency-graph {
    width: 100%;
    height: 600px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--surface-hover);
}

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

.loading-spinner {
    width: 50px;
    height: 50px;
    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); }
}

#loading-text {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Additional Styles for Tabs */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
}

.results-view,
.statistics-view,
.dependencies-view {
    height: 100%;
}

.results-header,
.statistics-header,
.dependencies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-header h2,
.statistics-header h2,
.dependencies-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.results-actions,
.statistics-actions,
.dependencies-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Summary Grid Layout */
.mod-summary,
.summary-grid,
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 0;
}

/* Summary Items */
.summary-item,
.info-item {
    padding: 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-item-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item-value {
    font-size: 0.8rem;
    color: var(--text-color);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    line-height: 1.4;
    padding-bottom: 4px;
    margin-bottom: -4px;
}

.summary-item-value::-webkit-scrollbar {
    height: 4px;
}

.summary-item-value::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.summary-item-value::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.summary-item-value::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Copy Button */
.copy-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    font-size: 0.65rem;
    transition: all 0.2s;
    opacity: 0;
    text-transform: lowercase;
    font-weight: normal;
}

.summary-item:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: var(--surface-hover);
    color: var(--primary-color);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Status Item Colors */
.summary-status-item {
    font-weight: 600;
}

.summary-status-item.success,
.summary-item.success {
    border-color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.summary-status-item.success-with-warnings,
.summary-item.success-with-warnings {
    border-color: var(--validation-warning-color);
    background: rgba(192, 202, 51, 0.1);
    color: var(--validation-warning-color);
}

.summary-status-item.warning,
.summary-item.warning {
    border-color: var(--warning-color);
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.summary-status-item.error,
.summary-item.error {
    border-color: var(--error-color);
    background: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
}

.summary-item.validation-error {
    border-color: var(--warning-color);
    background: rgba(255, 152, 0, 0.05);
}

/* Validation Errors Section */
.validation-errors-section {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--warning-color);
    border-radius: 4px;
    min-height: calc(4 * (0.75rem * 2 + 2.2rem) + 3 * 1rem);
    transition: min-height 0.2s ease, padding 0.2s ease, margin 0.2s ease;
    overflow-y: auto;
}

.validation-errors-section.empty {
    border-color: var(--border-color);
    background: var(--bg-color);
}

.validation-errors-section h4 {
    color: var(--warning-color);
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.validation-ok {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--success-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.validation-error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-error-list li {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--surface-color);
    border-left: 3px solid var(--warning-color);
    border-radius: 2px;
}

.validation-error-list li:last-child {
    margin-bottom: 0;
}

.validation-error-list li strong {
    color: var(--warning-color);
}

.console-section {
    margin-top: 0;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.console-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.warnings-display-section {
    margin-top: 0;
    margin-bottom: 2rem;
    padding-bottom: 0;
    border-bottom: none;
}

.warnings-display-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--validation-warning-color);
}

.warnings-container {
    background: var(--bg-color);
    border: 1px solid var(--validation-warning-color);
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
}

.warnings-container h4 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--validation-warning-color);
}

.console-stdout h4,
.console-stderr h4,
.console-analyzer-error h4 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.console-stdout,
.console-stderr,
.console-analyzer-error {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.console-stderr,
.console-analyzer-error {
    border-color: var(--error-color);
}

.console-analyzer-error {
    background: rgba(244, 67, 54, 0.05);
}

.console-analyzer-error h4 {
    color: var(--error-color);
}

.console-warnings-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.warnings-by-file {
    margin-bottom: 1.5rem;
}

.warnings-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--validation-warning-color);
    background: rgba(192, 202, 51, 0.08);
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--validation-warning-color);
}

.warnings-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.code-preview {
    display: flex;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-content {
    flex: 1;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    padding: 0;
    white-space: pre;
    line-height: 1.6;
}

.code-content code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
}

.code-line {
    padding: 0;
    margin: 0;
    white-space: pre;
    line-height: 1.6;
}

/* Syntax Highlighting */
.hljs-keyword {
    color: #c678dd;
    font-weight: 600;
}

.hljs-string {
    color: #98c379;
}

.hljs-number {
    color: #d19a66;
}

.hljs-comment {
    color: #5c6370;
    font-style: italic;
}

.hljs-title.function_ {
    color: #61afef;
}

.hljs-attr {
    color: #e06c75;
}

.hljs-literal {
    color: #56b6c2;
}

/* ONB-specific Lua highlighting - distinct colors for each type */

/* Global functions - bright cyan */
.hljs-onb-function {
    color: #61afef; /* Soft blue */
    font-weight: 500;
}

/* Global tables - orange/amber */
.hljs-onb-table {
    color: #e5c07b; /* Amber/yellow */
    font-weight: 500;
}

/* Global variables - purple */
.hljs-onb-variable {
    color: #c678dd; /* Purple */
    font-weight: 500;
}

/* Object methods - colored by type */
.hljs-onb-method-player {
    color: #3b82f6; /* Blue - matches player */
    font-weight: 500;
}

.hljs-onb-method-mob {
    color: #a855f7; /* Purple - matches mob */
    font-weight: 500;
}

.hljs-onb-method-card {
    color: #fbbf24; /* Amber - matches card */
    font-weight: 500;
}

.hljs-onb-method-block {
    color: #0ea5e9; /* Sky blue - matches block */
    font-weight: 500;
}

.hljs-onb-method-common {
    color: #22c55e; /* Green - matches library/common */
    font-weight: 500;
}

/* Generic fallback for unknown object types */
.hljs-onb-method {
    color: #98c379; /* Green */
    font-weight: 500;
}

/* Enum/table field values - lighter amber */
.hljs-onb-enum-value {
    color: #d19a66; /* Orange/amber - lighter than table name */
    font-weight: 400;
}

/* Legacy global marker (for backwards compatibility) */
.hljs-onb-global {
    color: #00d9ff; /* Bright cyan/teal */
    font-weight: 500;
}

/* Dark theme variant (for light backgrounds if ever used) */
@media (prefers-color-scheme: light) {
    .hljs-onb-function {
        color: #0066cc;
    }
    .hljs-onb-table {
        color: #c18401;
    }
    .hljs-onb-variable {
        color: #a626a4;
    }
    .hljs-onb-method-player {
        color: #0066cc;
    }
    .hljs-onb-method-mob {
        color: #7c3aed;
    }
    .hljs-onb-method-card {
        color: #d97706;
    }
    .hljs-onb-method-block {
        color: #0284c7;
    }
    .hljs-onb-method-common {
        color: #16a34a;
    }
    .hljs-onb-method {
        color: #50a14f;
    }
    .hljs-onb-enum-value {
        color: #986801;
    }
    .hljs-onb-global {
        color: #0099cc;
    }
}

/* ONB Tooltip for syntax highlighted elements */
.onb-tooltip {
    position: fixed;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    pointer-events: none;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.onb-tooltip.visible {
    opacity: 1;
}

.onb-tooltip-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}

.onb-tooltip-content {
    color: var(--text-color);
}

/* Make ONB highlighted elements show cursor pointer when they have tooltips */
span[data-onb-type] {
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

span[data-onb-type]:hover {
    text-decoration-style: solid;
}

.line-numbers {
    padding-right: 1rem;
    margin-right: 1rem;
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    user-select: none;
    text-align: right;
    white-space: pre;
    line-height: 1.6;
}

.line-number {
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.image-preview,
.binary-preview {
    padding: 1rem;
    text-align: center;
}

.bar-chart,
.stats-list {
    width: 100%;
}

.bar-item {
    margin-bottom: 0.75rem;
}

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

.bar-visual {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-color);
    border-radius: 4px;
    padding: 0.25rem;
    position: relative;
}

.bar-fill {
    height: 24px;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.bar-count {
    position: absolute;
    right: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.dependency-info {
    margin-bottom: 1.5rem;
}

.cycle-warning {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 4px;
}

.cycle-warning h4 {
    margin-bottom: 0.5rem;
    color: var(--error-color);
}

.cycle-warning ul {
    margin-left: 1.5rem;
}

.pie-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.pie-chart svg {
    max-width: 300px;
    width: 100%;
    height: auto;
}

.pie-chart svg path {
    cursor: pointer;
    transition: opacity 0.2s;
}

.pie-chart svg circle {
    cursor: pointer;
    transition: opacity 0.2s;
}

.pie-chart svg path:hover,
.pie-chart svg circle:hover {
    opacity: 0.8;
}

.chart-legend {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    width: 100%;
    max-width: 300px;
}

.chart-legend > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Chart Tooltip */
.chart-tooltip {
    position: fixed;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    padding: 0.75rem 1rem;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    min-width: 150px;
}

.chart-tooltip.visible {
    opacity: 1;
}

.chart-tooltip-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.chart-tooltip-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.chart-tooltip-percent {
    color: var(--primary-color);
    font-weight: 500;
    margin-left: 0.5rem;
}

.chart-stats {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    width: 100%;
    max-width: 300px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--surface-color);
    border-radius: 4px;
}

.folder-header {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.folder-header:hover {
    color: var(--primary-color);
}

.folder-icon {
    display: inline-block;
    transition: transform 0.2s;
}

.folder-children {
    margin-left: 1rem;
}

/* Hover Preview Tooltip */
.hover-preview-tooltip {
    position: fixed;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    max-width: 800px;
    max-height: 500px;
    overflow-x: auto;
    overflow-y: hidden;
}

.file-preview-tooltip {
    min-width: 400px;
}

.tooltip-header {
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.tooltip-error-summary {
    padding: 0.5rem 1rem;
    background: rgba(244, 67, 54, 0.1);
    border-bottom: 1px solid var(--error-color);
    color: var(--error-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.image-preview-container,
.audio-preview-container,
.binary-preview-container {
    padding: 1rem;
}

.image-preview-container img {
    display: block;
    margin: 0 auto;
}

.audio-preview-container audio {
    display: block;
    margin-bottom: 0.5rem;
}

.audio-preview,
.image-preview {
    padding: 1rem;
    text-align: center;
}

.audio-preview audio {
    width: 100%;
    max-width: 500px;
}

.binary-preview-container {
    text-align: center;
    color: var(--text-secondary);
}

.binary-preview-container p {
    margin: 0.5rem 0;
}

/* Console Output Clickable Elements */
.console-file,
.console-location,
.console-location-bracket {
    cursor: pointer;
    position: relative;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--text-secondary);
}

.console-file:hover,
.console-location:hover,
.console-location-bracket:hover,
.console-file.highlighted,
.console-location-bracket.highlighted {
    color: var(--primary-color);
    text-decoration-color: var(--primary-color);
    text-decoration-style: solid;
}

.console-location-bracket {
    font-weight: 600;
    color: var(--warning-color);
}

.highlighted {
    background: rgba(33, 150, 243, 0.2);
    padding: 0 2px;
    border-radius: 2px;
}

/* Error Line Styling in Tooltip */
.hover-preview-tooltip .error-line {
    background: rgba(244, 67, 54, 0.15);
    border-left: 3px solid var(--error-color);
    padding-left: 0.5rem;
}

.hover-preview-tooltip .warning-line {
    background: rgba(192, 202, 51, 0.15);
    border-left: 3px solid var(--validation-warning-color);
    padding-left: 0.5rem;
}

.hover-preview-tooltip .code-preview {
    padding: 1rem;
    display: flex;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
}

.hover-preview-tooltip .line-numbers {
    min-width: 40px;
    padding-right: 1rem;
    margin-right: 1rem;
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    user-select: none;
    text-align: right;
    white-space: pre;
    line-height: 1.6;
}

.hover-preview-tooltip .line-number {
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.hover-preview-tooltip .code-content {
    flex: 1;
    overflow-x: auto;
}

.hover-preview-tooltip .code-content pre {
    margin: 0;
    padding: 0;
    white-space: pre;
    line-height: 1.6;
}

.hover-preview-tooltip .code-line {
    padding: 0;
    margin: 0;
    white-space: pre;
    line-height: 1.6;
}

/* Console Section */
.console-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        max-height: 300px;
    }

    .file-browser {
        grid-template-columns: 1fr;
    }
    
    .summary-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Performance optimization styles */
.stats-warning {
    padding: 12px;
    background: var(--warning-color);
    color: var(--bg-color);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* Duplication Analysis Styles */
.duplication-section {
    margin-top: 3rem;
}

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

.duplication-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.duplication-actions {
    display: flex;
    gap: 0.5rem;
}

.duplication-metrics {
    margin-bottom: 2rem;
}

.duplication-content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

.duplication-content-layout.has-drill-down {
    grid-template-columns: 1fr 400px;
}

.duplication-table-container {
    margin-top: 1rem;
    min-width: 0;
}

.table-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.duplication-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

.duplication-table thead {
    background: var(--primary-color);
    color: white;
}

.duplication-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    position: relative;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background 0.2s;
}

.duplication-table th:hover {
    background: var(--primary-dark);
}

.column-resizer {
    position: absolute;
    top: 0;
    right: -2px;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    background: transparent;
    transition: background 0.15s;
    z-index: 10;
}

.column-resizer:hover,
.column-resizer.active {
    background: rgba(255, 255, 255, 0.4);
}

.column-resizer.active {
    background: rgba(255, 255, 255, 0.6);
}

.duplication-table th.sortable {
    cursor: pointer;
    user-select: none;
    padding-right: 1.5rem;
}

.duplication-table th.sortable:hover {
    background: var(--primary-dark);
}

.duplication-table .preview-header {
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.sort-indicator {
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

.duplication-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.duplication-table tbody tr:hover {
    background: rgba(33, 150, 243, 0.05);
}

.duplication-table tbody tr.selected {
    background: rgba(33, 150, 243, 0.1);
}

.duplication-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
}

.duplication-table .file-path {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 100%;
    overflow: hidden;
}

.duplication-table .basename {
    font-weight: 600;
    color: var(--text-color);
}

.duplication-table .basename.hoverable-file {
    cursor: help;
    transition: color 0.2s;
}

.duplication-table .basename.hoverable-file:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.duplication-table .preview-cell {
    text-align: center;
    padding: 0.5rem;
    min-width: 60px;
}

.file-preview-thumb {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.file-preview-thumb img {
    width: 100%;
    height: 100%;
    image-rendering: auto;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

.file-preview-thumb.audio-preview {
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.file-preview-thumb.audio-preview:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.file-preview-thumb.audio-preview.playing {
    background: var(--success-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.duplication-table .filepath-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'Fira Code', 'Courier New', monospace;
}

.duplication-table .count,
.duplication-table .size,
.duplication-table .impact {
    text-align: right;
    font-family: 'Fira Code', 'Courier New', monospace;
}

/* Drill-down Panel */
.drill-down-panel {
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    animation: slideIn 0.3s ease;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.drill-down-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.drill-down-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-drill-down {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.close-drill-down:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
}

.drill-down-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.file-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(33, 150, 243, 0.05);
    border-radius: 4px;
}

.file-info code {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
}

.origin-info {
    grid-column: 1 / -1;
    padding: 0.75rem;
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid var(--success-color);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.origin-info strong {
    color: var(--success-color);
}

.locations h4 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.locations-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.location-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    gap: 0.5rem;
    overflow: hidden;
}

.location-item .mod-name {
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-item .location-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.location-item .mod-name:hover {
    color: var(--primary-dark);
}

.location-item .file-path {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: 'Fira Code', 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-item .hoverable-file {
    cursor: help;
    transition: color 0.2s;
}

.location-item .hoverable-file:hover {
    color: var(--primary-color);
}

/* Responsive duplication layout */
@media (max-width: 1400px) {
    .duplication-content-layout.has-drill-down {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 1200px) {
    .duplication-content-layout.has-drill-down {
        grid-template-columns: 1fr;
    }
    
    .drill-down-panel {
        position: relative;
        top: 0;
        max-height: none;
    }
}

/* File Size Analysis Section */
.file-size-section {
    margin-top: 2rem;
}

.file-size-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 1200px) {
    .file-size-split-layout {
        grid-template-columns: 1fr;
    }
}

.file-size-controls {
    margin: 1rem 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-size-controls label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-size-controls select {
    padding: 0.5rem 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 200px;
}

.file-size-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Histogram Chart */
.histogram-chart {
    width: 100%;
    height: auto;
    display: block;
}

.histogram-bar {
    cursor: pointer;
    transition: opacity 0.2s;
}

.histogram-bar:hover {
    opacity: 0.8;
}

.histogram-label {
    fill: var(--text-secondary);
    user-select: none;
}

/* Extension Breakdown Table */
.extension-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.extension-table thead {
    background: var(--surface-color);
}

.extension-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.extension-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.extension-table tbody tr {
    transition: background 0.2s;
}

.extension-table tbody tr:hover {
    background: var(--surface-hover);
}

.extension-table tbody tr.highlighted {
    background: rgba(33, 150, 243, 0.1);
}

.table-footer {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}
