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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
}

h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.hidden {
    display: none;
}

.dropzone {
    border: 2px dashed #ccc;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
}

.dropzone:hover {
    border-color: #4a90e2;
    background-color: #f0f8ff;
}

.dropzone.dragover {
    border-color: #4a90e2;
    background-color: #e6f2ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.small {
    font-size: 14px;
    color: #999;
}


/* Image Viewer Container - Consistent styling for both sides */
.image-viewer {
    position: relative;
    width: 100%;
    min-height: 200px;
    max-height: 500px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: #f0f0f0;
    border-radius: 4px;
}

#originalImageContainer {
    position: relative;
    width: 100%;
    min-height: 200px;
}


/* Progressive Loading Placeholder */
.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 4px;
    z-index: 2;
    transition: opacity 0.3s ease-in-out;
}

.image-placeholder.hidden {
    display: none !important;
    opacity: 0;
}

.placeholder-skeleton {
    width: 80%;
    height: 60%;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 15px;
}

.placeholder-info {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.placeholder-info p {
    margin: 5px 0;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

#svgContainer {
    min-height: 200px;
    max-height: 500px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: #f0f0f0; /* Light gray to see if SVG is transparent */
    border-radius: 4px;
    position: relative;
}

/* Removed old grid view zoom controls - now using split view controls only */

/* Image and SVG Wrappers - Consistent styling */
.svg-wrapper,
.image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: transform 0.2s ease;
}

.svg-wrapper svg,
.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* Error state */
#svgContainer .error {
    color: #e74c3c;
    text-align: center;
    font-style: italic;
    margin: 20px;
}

.controls {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
}

.control-group input,
.control-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.control-group input:focus,
.control-group select:focus {
    outline: 2px solid #4a90e2;
}

.routing-info {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.routing-info h3 {
    color: #2d5016;
    margin-bottom: 12px;
    font-size: 16px;
}

.routing-info p {
    margin-bottom: 8px;
    color: #2d5016;
}

.metrics {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.metrics p {
    margin-bottom: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.optimization-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    margin: 15px 0;
}

.optimization-info p {
    margin-bottom: 8px;
}

.optimization-info p:last-child {
    margin-bottom: 0;
}

/* Flowbite-Style Tooltip System */
.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #6c757d;
    color: white;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    margin-left: 6px;
    cursor: help;
    transition: background-color 0.2s ease;
    user-select: none;
    font-weight: bold;
    position: relative;
}

.info-icon:hover {
    background: #495057;
}

/* Tooltip Styling */
.tooltip {
    position: absolute;
    z-index: 1000;
    padding: 8px 12px;
    background: #1f2937;
    color: white;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 6px;
    white-space: normal;
    max-width: 250px;
    min-width: max-content;
    width: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    pointer-events: none;
    font-weight: normal;
}

.tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip Arrow */
.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

/* Tooltip positioning variants */
.tooltip.bottom {
    transform: translateY(8px);
}

.tooltip.bottom.show {
    transform: translateY(0);
}

.tooltip.bottom::after {
    top: -10px;
    border-color: transparent transparent #1f2937 transparent;
}

/* Responsive tooltip text wrapping for mobile */
@media (max-width: 768px) {
    .tooltip {
        white-space: normal;
        max-width: 250px;
    }
}

.btn-primary {
    background: #4a90e2;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: #357abd;
}

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

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

.btn-secondary {
    background: #5cb85c;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s, transform 0.1s;
}

.btn-secondary:hover {
    background: #4cae4c;
}

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

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none; /* Allow clicks through transparent overlay */
}

.loading.hidden {
    display: none;
}

/* Card container for loading message */
.loading-card {
    background: white;
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Re-enable pointer events for the card */
}

.loading p {
    color: #333;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success {
    color: #27ae60;
}

.error {
    color: #e74c3c;
}

/* Parameter Groups Styling */
.param-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.param-group.hidden {
    display: none;
}

.param-group h3 {
    color: #495057;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

/* Enhanced Control Groups */
.control-group {
    margin-bottom: 20px;
    position: relative;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

/* Enhanced Input Styling - Edge-to-Edge Range Sliders */
.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    margin: 10px 0;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
}

/* WebKit Track - Full Width */
.control-group input[type="range"]::-webkit-slider-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    border: none;
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    margin: 0;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #357abd;
    transform: scale(1.1);
}

/* Mozilla Track - Full Width */
.control-group input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    border: none;
    outline: none;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    -moz-appearance: none;
    margin: 0;
}

.control-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.control-group input[type="number"]:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Enhanced Select Styling */
.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 36px;
}

.control-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

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

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    cursor: pointer;
}

/* Checkbox Styling */
.control-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
    vertical-align: middle;
}

.control-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Old tooltip styles removed - using Flowbite-style tooltips above */

/* Preset Buttons Styling */
.preset-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.btn-preset {
    flex: 1;
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-preset:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-preset:active {
    transform: translateY(0);
}

.btn-preset:nth-child(1) {
    background: #28a745;
}

.btn-preset:nth-child(1):hover {
    background: #218838;
}

.btn-preset:nth-child(2) {
    background: #ffc107;
    color: #212529;
}

.btn-preset:nth-child(2):hover {
    background: #e0a800;
}

.btn-preset:nth-child(3) {
    background: #dc3545;
}

.btn-preset:nth-child(3):hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    .dropzone {
        padding: 20px;
    }

    #svgContainer,
    .image-viewer {
        max-height: 350px;
        min-height: 150px;
    }

    /* Mobile Responsive Parameter Controls */
    .param-group {
        padding: 15px;
        margin-bottom: 15px;
    }

    .control-group {
        margin-bottom: 15px;
    }

    .control-group label {
        font-size: 13px;
    }

    .control-group input[type="range"]::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        margin: 0;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .preset-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .btn-preset {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Touch-friendly controls */
    .control-group input,
    .control-group select {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .tooltip {
        font-size: 11px;
        padding: 4px 6px;
    }
}

/* Split View Styles - Self-contained, no conflicts */
.split-view-container {
    display: grid;
    grid-template-columns: 1fr 6px 1fr;
    height: 500px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.split-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fafafa;
}

.split-divider {
    background: linear-gradient(to bottom, #e2e8f0, #cbd5e0, #e2e8f0);
    cursor: col-resize;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background 0.2s ease;
}

.split-divider:hover {
    background: linear-gradient(to bottom, #cbd5e0, #a0aec0, #cbd5e0);
}

.split-divider:focus {
    outline: 2px solid #3182ce;
    outline-offset: -2px;
}

.split-divider.dragging {
    background: #3182ce !important;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.3);
}

.split-divider.dragging .divider-handle {
    color: white;
}

.divider-handle {
    color: #64748b;
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.split-panel .panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    min-height: 52px;
}

.split-panel .panel-header h3 {
    margin: 0;
    font-weight: 600;
    color: #374151;
}

.split-panel .panel-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.split-panel .zoom-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.split-panel .zoom-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.zoom-level {
    font-size: 11px;
    color: #6b7280;
    min-width: 35px;
    text-align: center;
}

.split-panel .file-info {
    font-size: 12px;
    color: #6b7280;
}

.split-panel .image-viewer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
    position: relative;
}

.split-panel .image-viewer img,
.split-panel .image-viewer #splitSvgContainer {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.1s ease-out;
}

/* Image drag cursors */
.split-panel .image-viewer.draggable img,
.split-panel .image-viewer.draggable #splitSvgContainer {
    cursor: grab;
}

.split-panel .image-viewer.dragging img,
.split-panel .image-viewer.dragging #splitSvgContainer {
    cursor: grabbing;
    user-select: none;
    transition: none !important; /* Disable transitions during drag for instant response */
}


.image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .split-view-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 6px 1fr;
        height: 600px;
    }

    .split-divider {
        cursor: row-resize;
    }

    .divider-handle {
        /* No rotation needed for ⫶ symbol */
    }
}

/* Browser fallback */
@supports not (display: grid) {
    .split-view-container {
        display: flex;
        flex-direction: column;
    }

    .split-panel {
        flex: 1;
    }

    .split-divider {
        height: 6px;
        cursor: row-resize;
    }
}

/* Error Handling Styles */
.error-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

.error-message {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.error-message.show {
    transform: translateX(0);
    opacity: 1;
}

.error-message.hide {
    transform: translateX(100%);
    opacity: 0;
}

.error-message.error-error {
    border-left: 4px solid #dc3545;
}

.error-message.error-warning {
    border-left: 4px solid #ffc107;
}

.error-message.error-info {
    border-left: 4px solid #17a2b8;
}

.error-message.error-success {
    border-left: 4px solid #28a745;
}

.error-content {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
}

.error-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.error-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.error-dismiss {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.error-dismiss:hover {
    background: #f0f0f0;
    color: #666;
}

.error-dismiss:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Mobile responsiveness for errors */
@media (max-width: 768px) {
    .error-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .error-content {
        padding: 12px;
        gap: 8px;
    }

    .error-text {
        font-size: 13px;
    }
}

/* AI Classification Styles */
.ai-options {
    background: #f0f8ff;
    border: 1px solid #b8d4f1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.ai-options h3 {
    color: #2c5282;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #b8d4f1;
}

.classification-method {
    margin-bottom: 15px;
}

.ai-features {
    margin-bottom: 15px;
}

.ai-features label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

.ai-features input[type="checkbox"] {
    margin-right: 8px;
}

.time-budget {
    margin-bottom: 10px;
}

/* Classification Results */
.classification-results {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.classification-result {
    text-align: center;
}

.classification-result h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
}

.logo-type {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.confidence {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.method-used {
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.processing-time {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 10px;
}

.reasoning {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #495057;
    font-style: italic;
}

/* Features Analysis */
.features-analysis {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.features-analysis h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
}

.feature-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item label {
    min-width: 140px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
    margin: 0;
}

.feature-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.feature-value {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.feature-percentage {
    min-width: 45px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

/* Loading indicator for classification */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
}

.loading-indicator .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #4a90e2;
    margin-right: 10px;
}

/* Error message styling for classification */
.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.error-icon {
    margin-right: 10px;
    font-size: 18px;
}

.error-message button {
    background: none;
    border: none;
    color: #721c24;
    cursor: pointer;
    padding: 0 5px;
    border-radius: 3px;
}

.error-message button:hover {
    background: rgba(114, 28, 36, 0.1);
}

/* Mobile responsiveness for AI components */
@media (max-width: 768px) {
    .ai-options {
        padding: 15px;
    }

    .feature-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .feature-item label {
        min-width: auto;
    }

    .feature-bar {
        width: 100%;
    }

    .feature-percentage {
        align-self: flex-end;
    }
}