/* Folder Size Visualizer - Complete Styles with Light/Dark Theme Support */

/* ===== CSS Variables ===== */
.folder-visualizer-container {
    --fv-primary: var(--primary-color, #3498db);
    --fv-secondary: var(--secondary-color, #2ecc71);
    --fv-bg: var(--card-bg-color, #fcfcfc);
    --fv-surface: var(--background-color, #ffffff);
    --fv-text: var(--text-color, #333333);
    --fv-text-muted: #6c757d;
    --fv-border: var(--border-color, rgba(52, 152, 219, 0.1));
    --fv-shadow: var(--box-shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
    --fv-radius: var(--border-radius-md, 8px);
    --fv-radius-lg: var(--border-radius-lg, 16px);
    --fv-transition: var(--transition-fast, 0.2s ease);
    --fv-gradient: linear-gradient(135deg, var(--fv-primary), var(--fv-secondary));
    --fv-success: #27ae60;
    --fv-warning: #f39c12;
    --fv-danger: #e74c3c;
    --fv-info: #3498db;
}

.dark-theme .folder-visualizer-container {
    --fv-text-muted: #9ca3af;
    --fv-surface: #1a1d24;
}

/* ===== Base Container ===== */
.folder-visualizer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    font-family: var(--font-family, 'Inter', sans-serif);
    color: var(--fv-text);
}

/* ===== Header ===== */
.fv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.05));
    border-radius: 16px;
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    margin-bottom: 1.5rem;
}

.fv-header .header-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.fv-header .header-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    font-size: 1.75rem;
    color: white;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.35);
}

.fv-header h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fv-text);
}

.fv-header p {
    margin: 0;
    opacity: 0.7;
    font-size: 0.9rem;
    color: var(--fv-text);
}


.header-actions {
    display: flex;
    gap: 0.5rem;
}

.folder-visualizer-container .btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-background);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.folder-visualizer-container .btn-icon:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}


/* ===== Notices ===== */
.privacy-notice,
.browser-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--fv-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.privacy-notice {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(52, 152, 219, 0.1));
    border: 1px solid rgba(39, 174, 96, 0.2);
    color: var(--fv-success);
}

.dark-theme .privacy-notice {
    background: rgba(39, 174, 96, 0.15);
}

.browser-warning {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: var(--fv-warning);
}

/* ===== Controls ===== */
.fv-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.primary-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.folder-visualizer-container .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--fv-radius);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--fv-transition);
    text-decoration: none;
}

.folder-visualizer-container .btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.folder-visualizer-container .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.folder-visualizer-container .btn-primary {
    background: var(--fv-gradient);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.folder-visualizer-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.folder-visualizer-container .btn-secondary {
    background: var(--fv-bg);
    color: var(--fv-text);
    border: 2px solid var(--fv-border);
}

.folder-visualizer-container .btn-secondary:hover {
    border-color: var(--fv-primary);
    color: var(--fv-primary);
}

.folder-visualizer-container .btn-outline {
    background: transparent;
    color: var(--fv-primary);
    border: 2px solid var(--fv-primary);
}

.folder-visualizer-container .btn-outline:hover {
    background: var(--fv-primary);
    color: #fff;
}

.folder-visualizer-container .btn-danger {
    background: var(--fv-danger);
    color: #fff;
}

.upload-fallback label {
    cursor: pointer;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    border: 1px solid var(--fv-border);
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fv-text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem;
    border: 2px solid var(--fv-border);
    border-radius: var(--fv-radius);
    background: var(--fv-surface);
    color: var(--fv-text);
    font-size: 0.95rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--fv-primary);
}

.clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--fv-text-muted);
    cursor: pointer;
    padding: 0.5rem;
}

.filter-dropdowns {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--fv-border);
    border-radius: var(--fv-radius);
    background: var(--fv-surface);
    color: var(--fv-text);
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--fv-primary);
}

/* ===== Scan Progress ===== */
.scan-progress {
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--fv-border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-bar-container {
    height: 8px;
    background: var(--fv-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: var(--fv-gradient);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--fv-text-muted);
}

.progress-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-path {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--fv-text-muted);
    font-family: monospace;
}

/* ===== View Tabs ===== */
.view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
}

.view-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--fv-text-muted);
    border-radius: var(--fv-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--fv-transition);
}

.view-tab:hover {
    background: var(--fv-surface);
    color: var(--fv-text);
}

.view-tab.active {
    background: var(--fv-gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* ===== Summary Dashboard ===== */
.summary-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    border: 1px solid var(--fv-border);
    transition: var(--fv-transition);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fv-shadow);
}

.summary-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}

.total-size .card-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.files-count .card-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.folders-count .card-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.largest-file .card-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.avg-size .card-icon {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

.storage-score .card-icon {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--fv-text);
}

.card-label {
    font-size: 0.8rem;
    color: var(--fv-text-muted);
}

/* ===== View Panels ===== */
.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.25rem;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.crumb {
    padding: 0.25rem 0.5rem;
    background: var(--fv-surface);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--fv-transition);
}

.crumb:hover {
    background: var(--fv-primary);
    color: #fff;
}

.crumb::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--fv-text-muted);
}

.crumb:last-child::after {
    display: none;
}

/* Treemap */
.treemap-container {
    position: relative;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    overflow: hidden;
    min-height: 500px;
    border: 1px solid var(--fv-border);
}

#treemap-canvas {
    width: 100%;
    height: 500px;
    display: block;
    cursor: pointer;
}

.treemap-tooltip {
    position: fixed;
    padding: 0.75rem 1rem;
    background: var(--fv-surface);
    border: 1px solid var(--fv-border);
    border-radius: var(--fv-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1000;
    display: none;
    max-width: 300px;
}

.treemap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Tree View */
.tree-container {
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    border: 1px solid var(--fv-border);
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
}

.tree-node {
    padding-left: 1.5rem;
}

.tree-node.root {
    padding-left: 0;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--fv-radius);
    cursor: pointer;
    transition: var(--fv-transition);
}

.tree-item:hover {
    background: var(--fv-surface);
}

.tree-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fv-text-muted);
    font-size: 0.75rem;
}

.tree-icon {
    color: var(--fv-primary);
}

.tree-icon.folder {
    color: #f39c12;
}

.tree-name {
    flex: 1;
    font-weight: 500;
}

.tree-size {
    color: var(--fv-text-muted);
    font-size: 0.85rem;
    font-family: monospace;
}

.tree-bar {
    width: 80px;
    height: 6px;
    background: var(--fv-border);
    border-radius: 3px;
    overflow: hidden;
}

.tree-bar-fill {
    height: 100%;
    background: var(--fv-gradient);
    border-radius: 3px;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.chart-box {
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    padding: 1.5rem;
    border: 1px solid var(--fv-border);
}

.chart-box h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--fv-text);
}

.chart-box canvas {
    max-height: 300px;
}

/* File Types Table */
.types-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.type-card {
    flex: 1;
    min-width: 140px;
    padding: 1rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    text-align: center;
    border: 1px solid var(--fv-border);
}

.type-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.type-card .count {
    font-size: 1.25rem;
    font-weight: 700;
}

.type-card .label {
    font-size: 0.8rem;
    color: var(--fv-text-muted);
}

.types-table-container {
    overflow-x: auto;
}

.types-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    overflow: hidden;
}

.types-table th,
.types-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--fv-border);
}

.types-table th {
    background: var(--fv-surface);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--fv-text-muted);
}

.types-table tr:hover {
    background: var(--fv-surface);
}

.type-bar {
    width: 100px;
    height: 8px;
    background: var(--fv-border);
    border-radius: 4px;
    overflow: hidden;
}

.type-bar-fill {
    height: 100%;
    border-radius: 4px;
}

/* Largest Files List */
.largest-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    border: 1px solid var(--fv-border);
    transition: var(--fv-transition);
}

.file-item:hover {
    box-shadow: var(--fv-shadow);
}

.file-rank {
    width: 32px;
    height: 32px;
    background: var(--fv-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    word-break: break-all;
}

.file-path {
    font-size: 0.8rem;
    color: var(--fv-text-muted);
    word-break: break-all;
}

.file-size {
    font-weight: 700;
    color: var(--fv-primary);
    white-space: nowrap;
}

/* Duplicates */
.duplicates-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: var(--fv-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.duplicate-group {
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--fv-border);
}

.duplicate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--fv-border);
}

.duplicate-files {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Cleanup */
.cleanup-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cleanup-section {
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    padding: 1rem;
    border: 1px solid var(--fv-border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    background: var(--fv-primary);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.cleanup-list {
    max-height: 200px;
    overflow-y: auto;
}

.cleanup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: var(--fv-radius);
}

.cleanup-item:hover {
    background: var(--fv-surface);
}

.cleanup-summary {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(52, 152, 219, 0.1));
    border-radius: var(--fv-radius);
    text-align: center;
}

/* History */
.history-chart-container {
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--fv-border);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    border: 1px solid var(--fv-border);
}

/* Panels & Modals */
.edu-panel,
.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: var(--fv-surface);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.edu-panel.active,
.settings-panel.active {
    transform: translateX(0);
}

.edu-header,
.settings-header {
    padding: 1.5rem;
    background: var(--fv-gradient);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edu-header h3,
.settings-header h3 {
    margin: 0;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edu-tabs {
    display: flex;
    padding: 0.5rem;
    background: var(--fv-bg);
}

.edu-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--fv-text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: var(--fv-radius);
}

.edu-tab.active {
    background: var(--fv-primary);
    color: #fff;
}

.edu-content,
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.setting-group select,
.setting-group input[type="range"] {
    width: 100%;
    margin-top: 0.5rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    padding: 1rem;
}

.modal-content {
    background: var(--fv-surface);
    border-radius: var(--fv-radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
}

.modal-lg {
    max-width: 700px;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    background: var(--fv-gradient);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: var(--fv-bg);
    text-align: right;
}

.help-section {
    margin-bottom: 1.5rem;
}

.help-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--fv-primary);
}

.help-section p {
    color: var(--fv-text-muted);
    line-height: 1.6;
}

/* Export Bar */
.export-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--fv-bg);
    border-radius: var(--fv-radius);
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.export-label {
    font-weight: 600;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .fv-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .summary-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .folder-visualizer-container {
        padding: 1rem;
    }

    .fv-header {
        padding: 1rem;
    }

    .fv-header h2 {
        font-size: 1.35rem;
    }

    .fv-header .header-icon {
        font-size: 2rem;
    }

    .view-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0.25rem;
    }

    .view-tab {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .view-tab span {
        display: none;
    }

    .summary-dashboard {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .summary-card {
        padding: 1rem;
    }

    .card-value {
        font-size: 1.1rem;
    }

    .filter-controls {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        min-width: unset;
    }

    .filter-dropdowns {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-actions {
        width: 100%;
        justify-content: flex-start;
    }

    #treemap-canvas {
        height: 350px;
    }

    .file-item {
        flex-wrap: wrap;
    }

    .file-size {
        width: 100%;
        text-align: right;
        margin-top: 0.5rem;
    }

    .edu-panel,
    .settings-panel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .primary-controls {
        flex-direction: column;
    }

    .primary-controls .btn {
        width: 100%;
        justify-content: center;
    }

    .summary-dashboard {
        grid-template-columns: 1fr;
    }

    .export-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .export-bar .btn {
        width: 100%;
        justify-content: center;
    }

    .types-table th,
    .types-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* ===== Animations ===== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

.scanning .progress-bar {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scrollbar Styling */
.tree-container::-webkit-scrollbar,
.cleanup-list::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.tree-container::-webkit-scrollbar-track,
.cleanup-list::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: var(--fv-bg);
}

.tree-container::-webkit-scrollbar-thumb,
.cleanup-list::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: var(--fv-border);
    border-radius: 4px;
}

.tree-container::-webkit-scrollbar-thumb:hover,
.cleanup-list::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--fv-text-muted);
}