* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* LEFT PANEL - Translated Files */
.left-panel {
    width: 50%;
    background: white;
    border-right: 2px solid #ddd;
    display: flex;
    flex-direction: column;
}

/* RIGHT PANEL - Upload Form */
.right-panel {
    width: 50%;
    background: white;
    overflow-y: auto;
    padding: 20px 30px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #2c3e50;
    color: white;
    border-bottom: 3px solid #1a252f;
}

.panel-header h2 {
    font-size: 24px;
}

.refresh-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.refresh-btn:hover {
    background: #2980b9;
}

/* Filter Bar */
.filter-bar {
    padding: 10px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.filter-bar input,
.filter-bar select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s;
    background: white;
}

.filter-bar input:focus,
.filter-bar select:focus {
    outline: none;
    border-color: #3498db;
}

.bulk-actions {
    padding: 15px 30px;
    background: #ecf0f1;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.btn-download,
.btn-delete {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-download {
    background: #27ae60;
    color: white;
}

.btn-download:hover {
    background: #229954;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.files-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.loading {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 20px;
}

.project-group {
    margin-bottom: 30px;
}

.project-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    padding: 10px;
    background: #ecf0f1;
    border-left: 4px solid #3498db;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-group {
    margin-left: 20px;
    margin-bottom: 15px;
}

.topic-title {
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    padding: 5px 10px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 5px 0 5px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.2s;
}

.file-item:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.file-item input[type="checkbox"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 12px;
    color: #7f8c8d;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-actions a {
    padding: 6px 12px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.3s;
}

.file-actions a:hover {
    background: #2980b9;
}

/* FORM STYLING */
#translation-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #2980b9;
}

.btn-submit:active {
    transform: scale(0.98);
}

.info-box {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    padding: 20px;
    border-radius: 5px;
}

.info-box h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.info-box ul {
    list-style-position: inside;
    color: #34495e;
}

.info-box ul li {
    margin-bottom: 8px;
    padding-left: 10px;
}

/* TOAST CUSTOMIZATION */
.toast {
    opacity: 0.95 !important;
}

.toast-success {
    background-color: #27ae60 !important;
}

.toast-error {
    background-color: #e74c3c !important;
}

.toast-info {
    background-color: #3498db !important;
}

.toast-warning {
    background-color: #f39c12 !important;
}

/* Scrollbar styling */
.files-container::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 10px;
}

.files-container::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.files-container::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.files-container::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .left-panel,
    .right-panel {
        width: 100%;
        height: 50vh;
    }
}

/* Icon Buttons */
.icon-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s;
    color: #2c3e50;
}

.icon-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.icon-btn i {
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-download-file {
    background: #27ae60;
    color: white;
}

.btn-download-file:hover {
    background: #229954;
    color: white;
}

.btn-delete-file {
    background: #e74c3c;
    color: white;
}

.btn-delete-file:hover {
    background: #c0392b;
    color: white;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Hide/Unhide buttons */
.btn-hide-item {
    color: white !important;
    font-size: 11px;
    padding: 2px 7px;
    background: #aab0b7 !important;
    border-radius: 3px;
    transition: background 0.2s;
    flex-shrink: 0;
    line-height: 1.6;
}

.btn-hide-item:hover {
    background: #e74c3c !important;
    color: white !important;
}

.btn-unhide {
    color: #27ae60;
}

.btn-unhide:hover {
    color: #27ae60 !important;
    background: rgba(39, 174, 96, 0.1) !important;
}

/* Hidden items list in modal */
.hidden-section-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin: 12px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ecf0f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hidden-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 6px;
    background: #f8f9fa;
}

.hidden-item span {
    color: #34495e;
    font-size: 14px;
}

/* Hidden project/topic styles */
.project-group.hidden,
.topic-group.hidden,
.file-item.hidden {
    display: none;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    width: auto;
    cursor: pointer;
}

/* File Select */
.file-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
}

.file-select optgroup {
    font-weight: bold;
    color: #2c3e50;
}

.file-select option {
    padding: 8px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #2c3e50;
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-header h3 i {
    margin-right: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Log Viewer */
.log-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.btn-refresh {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-refresh:hover {
    background: #2980b9;
}

.btn-refresh i {
    margin-right: 5px;
}

#log-lines {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.log-content {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
}

.log-info {
    color: #95a5a6;
    margin-bottom: 10px;
    font-size: 12px;
}

.log-entries {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.log-entry {
    padding: 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    line-height: 1.5;
}

.log-success {
    border-left: 3px solid #27ae60;
}

.log-error {
    border-left: 3px solid #e74c3c;
}

.log-warning {
    border-left: 3px solid #f39c12;
}

.log-content .loading,
.log-content .error,
.log-content .empty {
    text-align: center;
    padding: 20px;
    color: #95a5a6;
}

.log-content .error {
    color: #e74c3c;
}

/* Icons in buttons */
.btn-download i,
.btn-delete i,
.btn-submit i {
    margin-right: 8px;
}

/* Info box icons */
.info-box h3 i {
    margin-right: 8px;
    color: #3498db;
}

/* Scrollbar for log content */
.log-content::-webkit-scrollbar {
    width: 8px;
}

.log-content::-webkit-scrollbar-track {
    background: #34495e;
}

.log-content::-webkit-scrollbar-thumb {
    background: #7f8c8d;
    border-radius: 4px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}
