body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f0f0;
}

#gallery {
    text-align: center;
}

#upload-btn, #login-btn, #logout-btn, #admin-btn {
    padding: 8px 16px;
    margin: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
}

#logout-btn {
    background-color: #f44336;
}

#upload-btn.hidden, #login-btn.hidden, #logout-btn.hidden, #admin-btn.hidden, #download-btn.hidden {
    display: none;
}

#gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

#gallery-grid img {
    max-width: auto;
    max-height: 100px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

#upload-overlay, #login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    z-index: 1000;
}

#upload-window, #login-window {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    height: auto;
}

#upload-window {
    min-height: 300px;
}

#login-window {
    min-height: 200px;
}

#lightbox-window {
    text-align: center;
    position: absolute;
    top: 20px;
}

#lightbox-window img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border: 2px solid #fff;
    border-radius: 4px;
}

#upload-window h2, #login-window h2 {
    margin-top: 0;
}

#file-input, #login-username, #login-password {
    display: block;
    margin: 10px 0;
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#file-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#upload-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    max-height: 300px;
    overflow-y: auto;
}

#upload-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

#upload-list li img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
    border: 1px solid #ddd;
}

#upload-list li span.status {
    color: gray;
}

#upload-list li span.success {
    color: green;
}

#upload-list li span.error {
    color: red;
}

#upload-list li button.remove-btn {
    margin-left: 10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
}

#upload-buttons, #login-buttons {
    margin-top: 10px;
    display: none;
}

#upload-buttons button, #close-upload-btn, #login-buttons button, #close-login-btn, #lightbox-nav button {
    padding: 8px 16px;
    margin: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#start-upload-btn, #submit-login-btn {
    background-color: #4CAF50;
    color: white;
}

#cancel-btn, #close-upload-btn, #close-login-btn, #close-lightbox-btn {
    background-color: #f44336;
    color: white;
}

#download-btn {
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
}

#prev-btn, #next-btn {
    background-color: #2196F3;
    color: white;
}

#lightbox-nav {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}