/* Dashboard Styles */
.dashboard {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    height: 100%;
}

.dashboard .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard .header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.create-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-btn:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-hover);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: visible;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    perspective: 1000px; /* Added for potential 3D effects */
}

.project-card:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.project-card:hover .project-images img {
    transform: scale(1.05);
}

.project-images {
    height: 160px;
    overflow: hidden;
    display: flex;
}

.project-images img {
    width: 33.33%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-info {
    padding: 16px;
    position: relative;
}

.project-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.menu-btn {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.menu-dropdown {
    position: absolute;
    right: 0px;
    top: -48px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 100;
    box-shadow: var(--shadow-hover);
    min-width: 160px;
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.overview-btn{
    padding: 8px 16px;
    border: none;
    background: none;
    color: #0026ff;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-btn{
    padding: 8px 16px;
    border: none;
    background: none;
    color: #0026ff;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--danger-color);
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-btn:hover {
    background: rgba(37, 205, 247, 0.1);
}
.delete-btn:hover {
    background: rgba(247, 37, 133, 0.1);
}

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

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 1000px;
    max-height: 100vh;
    overflow-y: auto;
    position: relative;
    padding: 20px;
}

/* Danger Modal Content */
.danger-modal {
    background: #f1ddc9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    max-height: 250px;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

/* Danger Header */
.danger-header {
    background: #f1ddc9;
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.danger-icon {
    color: #dc3545;
    font-size: 1.5rem;
}

.danger-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

/* Modal Body */
.danger-modal .modal-body {
    padding: 16px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.danger-modal .modal-body p {
    margin: 0;
}

/* Modal Footer */
.danger-modal .modal-footer {
    padding: 12px 16px;
    background: #f1ddc9;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #eee;
}

/* Buttons */
.cancel-btn, .delete-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cancel-btn {
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
}

.cancel-btn:hover {
    background: #f1f1f1;
}

.delete-btn {
    background: #dc3545;
    border: none;
    color: #fff;
}

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

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Enhanced Import Modal Styles */
#import-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.import-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}

.project-name-highlight {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(67, 97, 238, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* File List Styles */
.file-list {
    border: 1px solid var(--border-color);
    padding: 5px;
    background: #f9f9f9;
    border-radius: 4px;
}

.file-list div {
    padding: 2px 5px;
    font-size: 0.875rem;
    color: var(--text-color);
}

/* Ensure consistency with other modals */
#import-modal .create-btn {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

#import-modal .create-btn:hover {
    background: var(--primary-hover);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.tab-headers {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.setup-choice {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.setup-btn {
    padding: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.setup-btn.selected {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.setup-btn:hover {
    background: rgba(0, 195, 255, 0.493);
    border-color: var(--primary-hover);
}

.setup-gif {
    width: 100%;
    height: 300px; /* Fixed height for consistency */
    object-fit: cover; /* Crops the GIF to fit without stretching */
    border-radius: 4px; /* Slight rounding for aesthetics */
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .setup-choice {
        grid-template-columns: 1fr;
    }

    .setup-gif {
        height: 100px; /* Slightly larger on mobile for visibility */
    }
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 128, 255, 0.1);
}

.drop-zone i {
    font-size: 40px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.drop-zone p {
    margin-bottom: 8px;
    font-weight: 500;
}

.drop-zone small {
    color: var(--text-light);
    font-size: 0.75rem;
}

.drop-icon {
    font-size: 140px;
    color: var(--text-light);
    margin-bottom: 16px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.drop-icon.loaded {
    color: var(--primary-color);
    animation: bounce 0.5s ease;
}

.compress-message {
    color: #e67e22; 
    font-weight: 500;
    margin-top: 10px;
    padding: 5px 10px;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 4px;
}

/* Animation for the icon */
@keyframes bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 24px;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.next-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.next-btn:hover {
    background: var(--primary-hover);
}

.close-btn {
    float: right;
    font-size: 24px;
    cursor: pointer;
}
.tab-headers {
    display: flex;
    border-bottom: 1px solid #ccc;
}
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
}
.tab-btn.active {
    border-bottom: 2px solid blue;
}
.tab-content {
    display: none;
    padding-top: 20px;
}
.tab-content.active {
    display: block;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

/* PROJECT DELETE*/
#delete-confirm-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    width: 100%;
    height: auto;
    overflow: auto;
    backdrop-filter: blur(3px);
    align-items: center;
}

#delete-confirm-modal .modal-content {
    background-color: #fff5f5;
    border: 2px solid #ff4d4f;
    color: #b22222;
    margin: 10% auto;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    height: auto;
    max-height: 420px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
    text-align: center;
    animation: popIn 0.3s ease;
}

#delete-confirm-modal .modal-header h2 {
    color: #d32f2f;
    margin-bottom: 10px;
}

#delete-confirm-modal .modal-body {
    font-size: 16px;
    padding: 10px 0;
}

#delete-confirm-modal .modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

#delete-confirm-modal .modal-footer button {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
}

#delete-confirm-modal #confirm-delete {
    background-color: #d32f2f;
    color: white;
}

#delete-confirm-modal #confirm-delete:hover {
    background-color: #b71c1c;
}

#delete-confirm-modal .close-btn {
    background-color: transparent;
    color: #555;
    border: 1px solid #ccc;
}

#delete-confirm-modal .close-btn:hover {
    background-color: #eee;
}

.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%; /* Ensure consistent sizing */
    height: auto;
}

.lazy-load.loaded {
    opacity: 1;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .grid-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .setup-choice {
        grid-template-columns: 1fr;
    }
}

#export-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
}

@media (max-width: 768px) {
    .format-options {
        grid-template-columns: 1fr;
    }

    .format-card img {
        width: 60px;
        height: 60px;
    }
}

/* Format Options from annotation.html */

.ai-options {
            width: 100px; /* Reduced width for more annotation view space */
            height: 100%; /* Adjust this value to match your layout */
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px;
            box-sizing: border-box;
            background-color: #f0f0f0; /* Light background for contrast */
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        /* Style the Hide Prediction button */
        #hide-prediction-btn {
            margin-bottom: 10px;
            padding: 5px 10px;
            background: #ccc;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.875rem;
            color: #333;
            transition: background 0.2s;
        }

        #hide-prediction-btn:hover {
            background: #bbb;
        }

        /* Make the confidence slider container fill the available space */
        .confidence-slider {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            height: 100%;
        }

        /* Cool visuals for the confidence slider */
        #confidence-slider {
            width: 12px; /* Slightly thicker for prominence */
            height: 100%; /* Extends from bottom of ai-options to Conf. label */
            background: linear-gradient(to bottom, #4a90e2, #1e3a8a); /* Blue degradation */
            cursor: grab; /* Cool cursor */
            border-radius: 6px;
            outline: none;
            transition: opacity 0.2s;
        }

        /* Custom thumb styling */
        #confidence-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 24px;
            height: 24px;
            background: #4a90e2;
            border-radius: 50%;
            cursor: grab;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
            border: 2px solid #fff;
        }

        /* Disabled state for the slider */
        #confidence-slider.disabled {
            opacity: 0.5;
            pointer-events: none;
            background: linear-gradient(to bottom, #aaaaaa, #666666); /* Grayed out gradient */
        }

        /* Ensure the image container takes remaining space */
        .image-workspace {
            display: flex;
            flex-direction: row;
        }

        .image-container {
            flex: 1; 
        }

        .status-annotated {
            background: rgba(76, 201, 240, 0.1);
            color: var(--success-color);
        }

        .status-preannotated {
            background: rgba(165, 42, 42, 0.1); 
            color: #8B4513; 
        }

        .status-notannotated {
            background: rgba(255, 165, 0, 0.1);
            color: #e67e22;
        }

        .bulk-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .grid-btn {
            padding: 8px 12px;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 0.875rem;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .grid-btn:hover {
            background: var(--bg-color);
            border-color: var(--primary-color);
        }

        .grid-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: var(--border-color);
        }

        .list-table input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary-color);
        }

        .grid-card.selected, .thumbnail-row.selected {
            box-shadow: 0 0 0 2px var(--primary-color);
        }

        .grid-toggle-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: var(--border-color);
        }

        .grid-card {
            position: relative;
        }

        .card-checkbox {
            position: absolute;
            top: 8px;
            left: 8px;
            z-index: 2;
        }

        .grid-card input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary-color);
        }

        .list-table th:first-child,
        .list-table td:first-child {
            width: 40px;
            padding-left: 8px;
            text-align: left;
            pointer-events: none;
        }

        .image-checkbox {
            margin: 0;
            vertical-align: middle;
        }

        .list-table .image-checkbox {
            pointer-events: auto;
            vertical-align: middle;
            margin: 0 8px;
        }

        .grid-card .card-checkbox {
            transition: opacity 0.2s ease;
        }

        .grid-card:hover .card-checkbox {
            opacity: 1 !important;
        }

        .list-table tr {
            position: relative;
        }

        .list-table .image-checkbox {
            position: relative;
            z-index: 2;
        }

        .list-table td:first-child {
            background: inherit;
        }

        .image-status, .list-table td[data-annotated] {
            font-size: 0.75rem;
            padding: 4px 8px;
            border-radius: 4px;
            align-self: flex-start;
            margin-top: 4px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .image-status[data-annotated="true"], .list-table td[data-annotated="true"] {
            background: rgba(76, 201, 240, 0.1);
            color: var(--success-color);
        }

        .image-status[data-annotated="false"], .list-table td[data-annotated="false"] {
            background: rgba(255, 165, 0, 0.1);
            color: #e67e22;
        }

        .list-table td[data-annotated="true"]::before {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            font-size: 0.75rem;
            color: var(--success-color);
            margin-right: 4px;
        }

        .annotated-check {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            background: var(--success-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            box-shadow: var(--shadow);
        }

        .progress-container {
            margin-bottom: 10px;
        }

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

        .progress {
            height: 20px;
            background-color: #4caf50;
            width: 0%;
            transition: width 0.3s;
        }

        .file-progress {
            margin-top: 5px;
            font-size: 14px;
        }

        .upload-success {
            color: green;
            font-weight: bold;
            margin-top: 10px;
        }

        .create-btn:disabled {
            background-color: #cccccc;
            cursor: not-allowed;
        }
        .create-btn.processing {
            background-image: linear-gradient(90deg, #4CAF50 0%, #45a049 50%, #4CAF50 100%);
            background-size: 200% 100%;
            animation: progress 2s linear infinite;
        }
        @keyframes progress {
            0% { background-position: 200% 0; }
            100% { background-position: 0 0; }
        }

        .control-panel {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            width: 100%;
            margin-top: -10px;
            background-color: #7777779c;
            padding: 10px;
            border-radius: 5px;
        }

        .class-selector {
            flex: 1;
            min-width: 0;
            overflow-y: auto;
        }

        #class-tags-container {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            width: 100%;
        }

        .class-tag {
            display: block;
            padding: 4px 4px;
            font-size: 0.6rem;
            border-radius: 4px;
            cursor: pointer;
            color: auto;
            font-weight: 500;
            user-select: none;
            transition: transform 0.2s;
            box-sizing: border-box;
        }

        .class-tag:hover {
            transform: scale(1.05);
        }

        .class-tag.selected {
            border: 3px solid rgb(0, 0, 0);
        }

        @keyframes highlight-pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
                border-color: rgba(255, 0, 0, 0.7);
            }
            50% {
                box-shadow: 0 0 8px 4px rgba(255, 0, 0, 0.5);
                border-color: rgb(255, 0, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
                border-color: rgba(255, 0, 0, 0.7);
            }
        }

        .class-tag.highlighted {
            animation: highlight-pulse 1.5s infinite;
            border: 1.5px solid rgb(255, 0, 0);
        }

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

        .export-modal-content {
            background: #fff;
            border-radius: 12px;
            padding: 24px;
            width: 90%;
            max-width: 800px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .export-close-btn {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #666;
            position: absolute;
            top: 16px;
            right: 16px;
        }

        .export-close-btn:hover {
            color: #333;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 8px;
            text-align: center;
        }

        .modal-subtitle {
            font-size: 0.875rem;
            color: #666;
            text-align: center;
            margin-bottom: 24px;
        }

        .format-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }

        .format-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 16px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .format-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-hover);
        }

        .format-card.selected {
            border-color: var(--primary-color);
            background: rgba(67, 97, 238, 0.1);
        }

        .format-card img {
            width: 80px;
            height: 80px;
            object-fit: contain;
            margin-bottom: 12px;
        }

        .format-card h3 {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .format-card p {
            font-size: 0.75rem;
            color: #666;
            line-height: 1.4;
        }

        .export-modal-content .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            padding-top: 16px;
            border-top: 1px solid var(--border-color);
        }

        .cancel-btn, .export-btn {
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 0.875rem;
            cursor: pointer;
            transition: background 0.2s;
        }

        .cancel-btn {
            background: #fff;
            border: 1px solid #ccc;
            color: #333;
        }

        .cancel-btn:hover {
            background: #f1f1f1;
        }

        .export-btn {
            background: var(--primary-color);
            color: white;
            border: none;
        }

        .export-btn:hover {
            background: var(--primary-hover);
        }

        .export-btn:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        /* Tab Navigation */
        .tab-nav {
            display: flex;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 15px;
        }
        
        .tab-link {
            padding: 10px 20px;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
            color: var(--text-color-light);
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
        }
        
        .tab-link.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
            font-weight: 500;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        /* Split Configuration Styles */
        .split-options {
            margin: 20px 0;
        }
        
        .split-toggle {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 24px;
            margin-right: 10px;
        }
        
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 24px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: var(--primary-color);
        }
        
        input:checked + .slider:before {
            transform: translateX(26px);
        }
        
        .split-selection {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .split-choice {
            display: flex;
            align-items: center;
        }
        
        .split-choice input[type="checkbox"] {
            margin-right: 8px;
            width: 16px;
            height: 16px;
        }
        
        .ratio-control {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            gap: 10px;
        }
        
        .ratio-control label {
            min-width: 80px;
        }
        
        .ratio-control input[type="range"] {
            flex-grow: 1;
        }
        
        .ratio-control input[type="number"] {
            width: 50px;
            text-align: center;
        }
        
        .ratio-summary {
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid var(--border-color);
        }
        
        .ratio-total {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .ratio-error {
            display: flex;
            align-items: center;
            color: #e74c3c;
            margin-top: 10px;
            gap: 5px;
        }
        
        /* Button Styles */
        .next-btn, .back-btn {
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 0.875rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        
        .next-btn {
            background: var(--primary-color);
            color: white;
            border: none;
        }
        
        .next-btn:hover {
            background: var(--primary-hover);
        }
        
        .back-btn {
            background: #fff;
            border: 1px solid #ccc;
            color: #333;
        }
        
        .back-btn:hover {
            background: #f1f1f1;
        }

        /* Enhanced AI Pre-annotator Button Styles */
        .ai-preannotator-btn {
            position: relative;
            background: linear-gradient(45deg, #4CAF50, #66BB6A);
            color: white;
            border: none;
            padding: 10px 14px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            z-index: 1;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .ai-preannotator-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .ai-preannotator-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .ai-preannotator-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                90deg,
                transparent,
                rgba(255, 255, 255, 0.3),
                transparent
            );
            transition: 0.5s;
        }

        .ai-preannotator-btn:hover::before {
            left: 100%;
        }

        .ai-preannotator-btn .sparkle {
            position: absolute;
            width: 6px;
            height: 6px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 50%;
            animation: sparkle 2s infinite;
            pointer-events: none;
        }

        @keyframes sparkle {
            0% {
                transform: translate(0, 0) scale(0);
                opacity: 0.8;
            }
            50% {
                transform: translate(30px, -10px) scale(1);
                opacity: 1;
            }
            100% {
                transform: translate(60px, 0) scale(0);
                opacity: 0.8;
            }
        }

        .ai-blind-trust {
            position: relative;
            background: linear-gradient(45deg, #4c70af, #6766bb);
            color: white;
            border: none;
            padding: 10px 14px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            z-index: 1;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .ai-blind-trust:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .ai-blind-trust:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .ai-blind-trust::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                90deg,
                transparent,
                rgba(255, 255, 255, 0.3),
                transparent
            );
            transition: 0.5s;
        }

        .ai-blind-trust:hover::before {
            left: 100%;
        }

        /* AI Pre-annotator Modal Styles */
        .ai-modal-content {
            background: #fff;
            border-radius: 16px;
            padding: 24px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            animation: fadeInScale 0.3s ease;
            position: relative;
            border: 1px solid #e0e0e0;
        }

        @keyframes fadeInScale {
            from {
                opacity: 0;
                transform: scale(0.9);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .ai-modal-content .close-btn {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #666;
            position: absolute;
            top: 16px;
            right: 16px;
            transition: color 0.2s;
        }

        .ai-modal-content .close-btn:hover {
            color: #333;
        }

        .ai-modal-content h2 {
            font-size: 1.5rem;
            font-weight: 600;
            color: #333;
            margin-bottom: 20px;
            text-align: left;
        }

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

        .ai-modal-content .form-group label {
            display: block;
            font-size: 0.9rem;
            font-weight: 500;
            color: #444;
            margin-bottom: 8px;
        }

        .mode-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
        }

        .mode-btn {
            flex: 1;
            padding: 10px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            background: #f9f9f9;
            color: #444;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }

        .mode-btn:hover {
            background: #f0f0f0;
            border-color: #ccc;
        }

        .mode-btn.active {
            background: #4CAF50;
            color: white;
            border-color: #4CAF50;
            box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
        }

        .ai-modal-content select,
        .ai-modal-content input[type="file"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            font-size: 0.9rem;
            background: #f9f9f9;
            transition: border-color 0.2s;
        }

        .ai-modal-content select:focus,
        .ai-modal-content input[type="file"]:focus {
            border-color: #4CAF50;
            outline: none;
        }

        .ai-modal-content .create-btn {
            width: 100%;
            padding: 12px;
            background: #4CAF50;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .ai-modal-content .create-btn:hover {
            background: #45a049;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .ai-modal-content .create-btn:disabled {
            background: #cccccc;
            cursor: not-allowed;
            box-shadow: none;
        }

        #cpu-warning {
            margin-top: 8px;
            font-size: 0.8rem;
        }

        /* Custom Model Upload Styles */
        .model-upload-container {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .drop-zone {
            flex: 1;
            border: 2px dashed #ccc;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: border-color 0.3s;
        }

        .drop-zone:hover {
            border-color: #666;
        }

        .drop-zone.dragover {
            border-color: #4CAF50;
            background: rgba(76, 175, 80, 0.1);
        }

        .load-btn {
            padding: 8px 16px;
            background: #4CAF50;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        .load-btn:hover {
            background: #45a049;
        }