#document-translator-frontend {
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

#file-selection-area {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 200px;
    position: relative;
}

.centered-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#expanded-state {
    transition: opacity 0.3s ease-in-out;
}

.selected-files-section,
.your-files-section {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.selected-files-section h3,
.your-files-section h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.reset-button {
    background-color: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #008CBA;
    transition: transform 0.3s ease, background-color 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-button:hover {
    transform: rotate(180deg);
    background-color: #e0e0e0;
}

.upload-section, .file-list-section, .conversion-section {
    margin-bottom: 20px;
}

.custom-file-upload,
#add-more-files-label,
#convert-files-label {
    display: inline-block;
    padding: 12px 20px;
    cursor: pointer;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s, box-shadow 0.3s;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-file-upload {
    background-color: #4CAF50;
}

.custom-file-upload:hover,
.custom-file-upload:focus {
    background-color: #45a049;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

input[type="file"] {
    display: none;
}

#add-more-files-label {
    background-color: #008CBA;
}

#add-more-files-label:hover,
#add-more-files-label:focus {
    background-color: #007B9A;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#convert-files-label {
    background-color: #4CAF50;
}

#convert-files-label:hover,
#convert-files-label:focus {
    background-color: #45a049;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#file-list {
    list-style-type: none;
    padding: 0;
}

#file-list li {
    background-color: white;
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#file-list li .file-name {
    flex-grow: 1;
    margin-right: 10px;
}

#file-list li .status {
    margin-right: 10px;
}

.download-button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 3px;
}

.download-button:hover {
    background-color: #45a049;
}

.delete-file {
    color: red;
    cursor: pointer;
    font-weight: bold;
    margin-left: 5px;
}

.delete-file:hover {
    color: darkred;
}

.conversion-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.conversion-section label {
    margin-right: 10px;
    font-weight: bold;
}

#target-language {
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-right: 10px;
    font-size: 16px;
    flex-grow: 1;
    max-width: 200px;
}

#progress-container {
    margin-top: 20px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

#progress-bar {
    height: 20px;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s;
}

#progress-text {
    text-align: center;
    margin-top: 5px;
}

#conversion-results {
    margin-top: 20px;
}

#conversion-results ul {
    list-style-type: none;
    padding: 0;
}

#conversion-results li {
    background-color: white;
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 5px;
}

#conversion-results a {
    color: #008CBA;
    text-decoration: none;
}

#conversion-results a:hover {
    text-decoration: underline;
}

#user-file-manager {
    margin-top: 20px;
}

.original-files,
.translated-files {
    margin-bottom: 20px;
}

.user-file {
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-file {
    background-color: #ffffff;
    border-left: 5px solid #3498db;
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.file-checkbox {
    margin-right: 10px;
}

.bulk-edit-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.bulk-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
    gap: 10px;
}

.bulk-edit-btn,
.bulk-delete-btn,
.bulk-confirm-btn,
.bulk-cancel-btn {
    display: inline-block;
    border: none;
    color: white;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 3px;
}

.bulk-edit-btn {
    background-color: #4CAF50;
}

.bulk-edit-btn:hover,
.bulk-edit-btn:focus {
    background-color: #45a049;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bulk-delete-btn {
    background-color: #3498db;
}

.bulk-delete-btn:hover:not(:disabled),
.bulk-delete-btn:focus:not(:disabled) {
    background-color: #2980b9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bulk-delete-btn:disabled {
    background-color: #95a5a6;
    color: #333;
    cursor: not-allowed;
}

.bulk-confirm-btn {
    background-color: #e74c3c;
}

.bulk-confirm-btn:hover,
.bulk-confirm-btn:focus {
    background-color: #c0392b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bulk-cancel-btn {
    background-color: #95a5a6;
}

.bulk-cancel-btn:hover,
.bulk-cancel-btn:focus {
    background-color: #7f8c8d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.user-file .file-name {
    flex-grow: 1;
    margin-right: 10px;
}

.file-actions {
    display: flex;
    align-items: center;
}

.file-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
    background-color: #f0f0f0;
    color: #333;
}

.file-tag[data-tag="original"],
.file-tag[data-tag="es"],
.file-tag[data-tag="pt"],
.file-tag[data-tag="fr"],
.file-tag[data-tag="de"] {
    background-color: #f0f0f0;
    color: #333;
}

.user-file .download-file {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 3px;
}

.user-file .download-file:hover {
    background-color: #45a049;
}

.user-file .delete-file {
    color: #e74c3c;
    cursor: pointer;
    font-weight: bold;
    margin-left: 5px;
}

.user-file .delete-file:hover {
    color: #c0392b;
}

.user-file .translate-file {
    background-color: #3498db;
    border: none;
    color: white;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 3px;
}

.user-file .translate-file:hover {
    background-color: #2980b9;
}

.user-file .translate-file:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.original-files h3,
.translated-files h3 {
    margin-bottom: 10px;
    color: #333;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #008CBA;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#file-list li .file-name {
    flex-grow: 1;
    margin-right: 10px;
}

#file-list li .status {
    min-width: 80px;
    text-align: right;
}

.translate-file {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.translate-file:hover {
    background-color: #2980b9;
}

.translate-file:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}
.delete-file {
    cursor: pointer;
}

.delete-file.confirm-delete {
    color: green;
}
.delete-file {
    cursor: pointer;
    color: red;
    font-weight: bold;
    margin-left: 10px;
}

.confirm-delete {
    color: #ff4d4d;
}

.translation-history-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.translation-history-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

#translation-history-list {
    list-style-type: none;
    padding: 0;
}

#translation-history-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

#translation-history-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

#translation-history-list strong {
    display: inline-block;
    width: 120px;
}

#translation-history-list a {
    display: inline-block;
    margin-top: 5px;
    background-color: #3498db;
    color: white;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 3px;
}

#translation-history-list a:hover {
    background-color: #2980b9;
}
.error-message {
    background-color: #ffdddd;
    border: 1px solid #f44336;
    color: #f44336;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}
