#fileAnalyser {
    margin-top: 20px;
}
#fileAnalyser h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
    font-family: 'Barlow', sans-serif;
}
#fileAnalyser input[type="file"] {
    margin: 10px 0;
    background: var(--tool-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 4px;
}
#fileAnalyser #fileTable {
    display: none; /* Initially hidden, will change once a ZIP is loaded */
    margin-top: 15px;
}
#fileAnalyser .compression-table {
    width: 100%;
    table-layout: fixed; /* Add fixed table layout */
    border-collapse: collapse;
    background: var(--tool-bg);
    border-radius: 6px;
    overflow: hidden;
}
#fileAnalyser .compression-table th, #fileAnalyser .compression-table td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Define column widths */
#fileAnalyser .compression-table th:nth-child(1), #fileAnalyser .compression-table td:nth-child(1) {
    width: 40%; /* Name column */
}
#fileAnalyser .compression-table th:nth-child(2), #fileAnalyser .compression-table td:nth-child(2) {
    width: 10%; /* Format column */
}
#fileAnalyser .compression-table th:nth-child(3), #fileAnalyser .compression-table td:nth-child(3) {
    width: 20%; /* Size column */
}
#fileAnalyser .compression-table th:nth-child(4), #fileAnalyser .compression-table td:nth-child(4) {
    width: 15%; /* Dimensions column */
}
#fileAnalyser .compression-table th:nth-child(5), #fileAnalyser .compression-table td:nth-child(5) {
    width: 10%; /* Duration column */
}
#fileAnalyser .compression-table th:nth-child(6), #fileAnalyser .compression-table td:nth-child(6) {
    width: 5%; /* Color Mode column */
}
#fileAnalyser .folder {
    cursor: pointer;
    background-color: var(--tool-bg);
    color: var(--text-color);
}
#fileAnalyser .toggle {
    display: inline-block;
    width: 20px;
    transition: transform 0.2s;
    cursor: pointer;
}
#fileAnalyser .folder.expanded .toggle {
    transform: rotate(90deg);
}
#fileAnalyser tr[data-parent] {
    background-color: var(--tool-bg);
}
#fileAnalyser .hidden {
    display: none;
}
#fileAnalyser .upload-controls {
    margin: 1rem 0;
}
#fileAnalyser .upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
#fileAnalyser .btn-upload {
    min-width: 120px;
    text-align: center;
    margin: 0;
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
    font-family: 'Barlow', sans-serif;
}
#fileAnalyser .btn-upload:hover {
    filter: brightness(0.9);
}
#fileAnalyser .progress-status {
    padding: 8px 16px;
    background: var(--tool-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-width: 200px;
}
#fileAnalyser .progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
#fileAnalyser .filename-bar {
    background: var(--tool-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
}
#fileAnalyser .progress-bar-container {
    background: var(--tool-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    position: relative;
}
#fileAnalyser .progress-bar {
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    width: 0;
    transition: width 0.3s ease;
}
#fileAnalyser .status-text {
    margin-top: 4px;
    font-size: 0.9em;
    color: var (--text-color);
}
#fileAnalyser .loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid var (--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}
@keyframes spin {
0% {
transform: translateY(-50%) rotate(0deg);
}
100% {
transform: translateY(-50%) rotate(360deg);
}
}
#fileAnalyser .control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}
#fileAnalyser .upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 2;
}
#fileAnalyser .progress-container {
    flex: 1;
}
#fileAnalyser .size-filter input[type="number"] {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--tool-bg);
    color: var(--text-color);
}
#fileAnalyser .size-filter input[type="radio"]:disabled + label {
    opacity: 0.5;
}
#fileAnalyser .upload-controls {
    margin: 1rem 0;
}
#fileAnalyser .control-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}
#fileAnalyser .upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%; /* Take full width */
}
#fileAnalyser .btn-upload {
    min-width: 120px; /* Fixed width for button */
    white-space: nowrap;
}
#fileAnalyser .progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1; /* Take remaining space */
}
#fileAnalyser .filename-bar {
    flex: 1; /* Take half of the remaining space */
    background: var(--tool-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
}
#fileAnalyser .progress-bar-container {
    flex: 1; /* Take other half of the remaining space */
    background: var(--tool-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    position: relative;
}
#fileAnalyser .upload-area {
    border: 2px dashed var(--border-color);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: var(--tool-bg);
    transition: all 0.3s ease;
}
#fileAnalyser .upload-area.dragover {
    border-color: var(--primary-color);
    background-color: var(--bg-color);
}
#fileAnalyser .btn-reset {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-family: 'Barlow', sans-serif;
    transition: all 0.3s ease;
    white-space: nowrap;
    opacity: 0.5; /* Add default opacity */
    pointer-events: none; /* Disable interactions by default */
}
#fileAnalyser .btn-reset.active {
    opacity: 1;
    pointer-events: auto;
}
#fileAnalyser .btn-reset:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}