body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

h1 {
    text-align: center;
    color: #333;
}

.upload-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.password-container {
    margin-bottom: 20px;
}

.password-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
}

.password-info {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.drop-zone.drag-over {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.file-input {
    display: none;
}

.upload-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.upload-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.selected-file {
    margin-top: 10px;
    display: none;
}

.loading-spinner {
    display: none;
    margin: 10px auto;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    display: none;
    width: 100%;
    height: 10px;
    background-color: #f3f3f3;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.result {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.result.success {
    background-color: #d4edda;
    color: #155724;
}

.result.error {
    background-color: #f8d7da;
    color: #721c24;
}

.file-explorer {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default */
}

.file-explorer.visible {
    display: block;
}

.file-actions {
    margin-bottom: 20px;
}

.action-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.action-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.file-list {
    overflow-x: auto;
    max-width: 100%;
}

.file-list table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* Minimum width to ensure readability */
}

.file-list th,
.file-list td {
    padding: 12px;
    text-align: center; /* Center align by default */
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* Maximum width for cells */
}

/* Keep filename column left-aligned */
.file-list th:nth-child(2),
.file-list td:nth-child(2) {
    text-align: left;
}

.file-list th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.file-list tr:hover {
    background-color: #f8f9fa;
}

.file-actions button {
    margin-right: 10px;
}

.file-size {
    white-space: nowrap;
}

.file-date {
    white-space: nowrap;
}

/* Column width specifications */
.file-list th:nth-child(1), /* Checkbox column */
.file-list td:nth-child(1) {
    width: 40px;
    min-width: 40px;
}

.file-list th:nth-child(2), /* Filename column */
.file-list td:nth-child(2) {
    max-width: 300px;
    min-width: 200px;
}

.file-list th:nth-child(3), /* Extension column */
.file-list td:nth-child(3) {
    width: 100px;
    min-width: 80px;
}

.file-list th:nth-child(4), /* Size column */
.file-list td:nth-child(4) {
    width: 100px;
    min-width: 80px;
}

.file-list th:nth-child(5), /* Upload Date column */
.file-list td:nth-child(5) {
    width: 150px;
    min-width: 150px;
}

.file-list th:nth-child(6), /* Downloads column */
.file-list td:nth-child(6) {
    width: 100px;
    min-width: 80px;
}

.file-list th:nth-child(7), /* Actions column */
.file-list td:nth-child(7) {
    width: 100px;
    min-width: 100px;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.pagination-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#pageInfo {
    font-size: 14px;
    color: #666;
}

/* Admin Area Styles */
.admin-area {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.admin-area.visible {
    display: block;
}

.admin-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    color: #666;
}

.tab-btn.active {
    color: #007bff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Logs Viewer Styles */
.logs-container {
    margin-top: 20px;
}

.logs-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.logs-filters select,
.logs-filters input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.logs-list {
    overflow-x: auto;
}

.logs-list table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.logs-list th,
.logs-list td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logs-list th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.logs-list tr:hover {
    background-color: #f8f9fa;
}

.logs-list td:last-child {
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
}

.logs-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}