body {
    font-family: sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 1rem;
}

#login-container, #app-container {
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

h1 {
    color: #008751; /* Green */
}

#folder-name-header {
    color: #0056b3; /* A different color */
}

button {
    background-color: #ffcd00; /* Gold */
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

button:hover {
    background-color: #e6b800;
}

input {
    width: calc(100% - 1.5rem);
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 1rem;
}

.upload-section, .file-list-section {
    margin-bottom: 2rem;
}

h2 {
    color: #008751; /* Green */
    border-bottom: 2px solid #ffcd00; /* Gold */
    padding-bottom: 0.5rem;
}

.file-list-section {
    overflow-x: auto;
}

#file-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#file-table th, #file-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

#file-table th {
    background-color: #f9f9f9;
}

#file-table input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.thumbnail-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.file-name-clickable {
    cursor: pointer;
    color: #0056b3;
    font-weight: bold;
}

.file-name-clickable:hover {
    text-decoration: underline;
}

.file-list-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

#pagination-controls {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

#file-count-info {
    margin: 0 1rem;
}

.files-per-page-container {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

#pagination-controls button:disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

#upload-progress-container {
    margin-top: 1rem;
}

.progress-bar-container {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.file-name {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 20px;
    width: 0;
    background-color: #008751; /* Green */
    transition: width 0.25s;
}

.progress-text {
    text-align: center;
    font-size: 0.8rem;
    line-height: 20px;
    color: #fff;
    mix-blend-mode: difference;
}

.error-text-clickable {
    cursor: pointer;
    text-decoration: underline;
}

.progress-bar-container.error .progress-bar-fill {
    background-color: #d9534f; /* Red */
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#preview-content img {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    #login-container, #app-container {
        padding: 1rem;
        border-radius: 0;
        box-shadow: none;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        margin-top: 1rem;
        width: 100%;
        justify-content: space-between;
    }

    .file-list-footer {
        flex-direction: column;
        align-items: stretch;
    }

    #download-btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    .files-per-page-container, #pagination-controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }

    #file-count-info {
        margin: 0;
    }

    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
}