html, body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #121212;
    color: #f2f2f2;
    height: 100%;
}

/* Loading */
.loading-container {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 101;
}
.loading-text {
    background: white;
    color: black;
    padding: 10px 15px;
    border-radius: 10px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;

    background: #1b1b1b;
    z-index: 100;

    display: flex;
    flex-direction: column;

    padding: 10px 15px;
    gap: 8px;
}
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}
.add-list {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: #1b1b1b;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 8px;
    flex-direction: column;
    gap: 6px;
    z-index: 100;
    min-width: 160px;
}
.add-list.active {
    display: flex;
}
.add-list button {
    background: transparent;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
}
.add-list button:hover,
.add-list label:hover {
    background: #2a2a2a;
}
.nav-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
}

/* Container */
.container {
    position: absolute;
    top: 120px; /* taller header now */
    left: 0;
    right: 0;
    bottom: 0;

    overflow-y: auto;
    padding: 15px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #1b1b1b;
    border-radius: 12px;
    overflow: hidden;
    font-size: 16px;
}
thead {
    background: #222;
    color: #aaa;
    text-align: left;
}
th, td {
    padding: 12px 14px;
    border-bottom: 1px solid #2a2a2a;
}
td:nth-child(1) {
    padding: 0px;
    max-width: 45px;
    width: 45px;
    word-break: break-word;
    text-align: right;
}
td:nth-child(4) {
    padding: 0px;
    max-width: 50px;
    width: 50px;
    word-break: break-word;
    text-align: left;
}
tbody tr {
    cursor: pointer;
    transition: 0.15s ease;
}

tbody tr:hover {
    background: #2a2a2a;
}

td:last-child {
    text-align: center;
    color: #888;
}

/* File contents */
.file-name {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
    word-break: break-word;
    max-width: 180px;
}
.more-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;

    width: 30px;
    height: 30px;
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.more-btn:hover {
    background: #2a2a2a;
    color: white;
}

/* Progress Bar */
.upload-bar {
    margin-top: 15px;
    font-size: 14px;
    color: #aaa;
}
progress {
    width: 50%;
    height: 14px;
    border-radius: 8px;
    overflow: hidden;
    appearance: none;
}

/* Action Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 999;
}

.hidden {
    display: none;
}

.modal-box {
    background: #1b1b1b;
    padding: 20px;
    border-radius: 12px;

    min-width: 220px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-box button {
    background: #2a2a2a;
    border: none;
    padding: 10px;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

.modal-box button:hover {
    background: #3a3a3a;
}

.modal-box .close {
    background: #ff4d4d;
}

/* General Button */
button {
    background: #2a2a2a;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background: #3a3a3a;
}

/* Mobile View */
@media (max-width: 768px) {
    table {
        font-size: 14px;
    }
}

/* .nav {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    flex: 1;
} */