/* General Body and Container Styles */
body {
    font-family: sans-serif;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
}

.container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

/* Header and Logo */
header { text-align: center; margin-bottom: 2rem; }
.logo { width: 100px; margin-bottom: 1rem; }
h1 {
    background: linear-gradient(to right, #9b59b6, #3498db, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form Styles */
.form-group { margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.5rem; }
input[type="file"], select, input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.folder-selection { display: flex; gap: 1rem; }
button {
    background: linear-gradient(to right, #9b59b6, #3498db);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}
button:hover { opacity: 0.9; }

/* Status and URL Display */
#uploadStatus { margin-top: 1rem; }
#fileUrls .url-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    background: #f9f9f9;
    padding: 0.5rem;
    border-radius: 4px;
}
#fileUrls a {
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
    margin-right: 1rem;
}
#fileUrls a:hover { text-decoration: underline; }

/* Tab Navigation */
.tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 1.5rem; }
.tab-link {
    background: none; border: none; padding: 1rem 1.5rem;
    cursor: pointer; font-size: 1rem; color: #999;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab-link.active { color: #333; border-bottom: 2px solid #9b59b6; }
.tab-content { display: none; animation: fadeIn 0.5s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Error Box Styles --- */
.error-box {
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-top: 1.5rem;
    border: 1px solid #dc3545;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
}
.error-box.show { display: flex; } /* Class to show the box */
.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #721c24;
    cursor: pointer;
    padding: 0 0 0 1rem;
}

/* File Browser */
#fileBrowser { max-height: 400px; overflow-y: auto; }
.folder { margin-bottom: 1rem; }
.folder-header {
    background: #f9f9f9; padding: 0.75rem;
    font-weight: bold; border: 1px solid #eee; border-radius: 4px;
}
.file-list { padding: 0.5rem 0 0 1.5rem; }

/* File Item & Thumbnail */
.file-item { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; }
.file-info { display: flex; align-items: center; flex-grow: 1; min-width: 0; }
.file-thumbnail { width: 40px; height: 40px; border-radius: 4px; margin-right: 10px; object-fit: cover; }
.file-info input[type="checkbox"] { margin-right: 10px; }
.file-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Links and Buttons */
.file-links { display: flex; align-items: center; flex-shrink: 0; margin-left: 1rem; }
.file-links a, .copy-btn {
    margin-left: 10px; text-decoration: none; font-size: 0.8em;
    padding: 4px 8px; border-radius: 4px;
}
.copy-btn {
    background-color: #e0e0e0; color: #333; border: none;
    cursor: pointer; transition: background-color 0.2s;
}
.copy-btn:hover { background-color: #c7c7c7; }
.copy-btn.copied { background-color: #28a745; color: white; }

/* Action Buttons Container */
#action-buttons { margin-top: 1.5rem; display: flex; gap: 1rem; }
.delete-btn { background: #dc3545; }
.delete-btn:hover { background: #c82333; }

.login-container input[type="password"],
.login-container input[type="text"] { /* Stylujemy też typ text, bo JS go zmienia */
    font-size: 1.2rem;
    padding: 1rem;
    text-align: center;
}

/* Kontener dla pola hasła i ikonki oka */
.password-wrapper {
    position: relative;
}

/* Ikonka oka do przełączania widoczności hasła */
.toggle-password-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none; /* Zapobiega zaznaczaniu ikonki jako tekst */
    font-size: 1.5rem;
    opacity: 0.6;
}