/* === style.css === */

:root {
    --primary: #4a6cf7;
    --secondary: #f7a94a;
    --background: #f5f7fa;
    --card: #ffffff;
    --text: #333333;
    --border: #e0e0e0;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --upscale-color: #6f42c1; /* Added purple for upscale */
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    margin: 0;
    padding: 20px;
    color: var(--text); /* Added */
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /* Removed grid layout here, place inside main-content */
}

.grid-container { /* New class for the grid layout */
     display: -ms-grid;
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 20px;
}


.card {
    background-color: var(--card);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 16px; /* Reduced from 20px for more compact layout */
    margin-bottom: 16px; /* Reduced from 20px for tighter spacing */
}

 /* Styles for Auth Section */
.auth-section {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 15px;
    background-color: #f8f9fa;
    margin-bottom: 25px;
}
.auth-section h3 { margin-bottom: 10px; }
.notification { padding: 12px 18px; margin: 15px 0; border-radius: var(--border-radius); border-left: 5px solid var(--info-color); background-color: rgba(23, 162, 184, 0.08); color: var(--text); font-size: 0.95em; }
.notification.error { border-left-color: var(--danger-color); background-color: rgba(220, 53, 69, 0.08); color: #721c24; }
.notification.success { border-left-color: var(--success-color); background-color: rgba(40, 167, 69, 0.08); color: #155724; }
.notification.warning { border-left-color: var(--warning-color); background-color: rgba(255, 193, 7, 0.08); color: #856404; }
.auth-status-container { margin-top: 15px; padding: 10px 15px; border-radius: var(--border-radius); background-color: #e2e3e5; border: 1px solid #d6d8db; font-size: 0.9em; color: #495057; }
details summary { cursor: pointer; color: #666; font-size: 0.9em; margin-bottom: 5px; }
details div { padding: 10px; background: #f1f1f1; border-radius: 4px; margin-top: 5px; font-size: 0.85em; border: 1px solid #eee; line-height: 1.4; }
details ol { padding-left: 20px; margin-bottom: 0; }
details li { margin-bottom: 4px; }

/* Useful Links Section */
.useful-links {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 15px 0;
}

.useful-links p {
    margin: 5px 0;
}

.useful-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.useful-links a:hover {
    background-color: var(--primary);
    color: white;
    text-decoration: none;
}

.useful-links a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

h1, h2, h3 {
    margin-top: 0;
    color: var(--text);
}

h4 { /* General h4 styling */
    color: var(--text);
    margin-bottom: 10px;
}

.input-section {
    grid-column: 1;
}

.output-section {
    grid-column: 2;
}

.input-area {
    width: 100%;
    height: 300px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box; /* Added */
}

#designs-output {
    background-color: #f9f9f9;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px;
    height: 400px; /* Adjusted height slightly, can be tuned */
    overflow-y: auto; /* Vertical scroll */
    overflow-x: auto; /* Horizontal scroll for very long unbreakable lines */
}

#designs-output pre {
    white-space: pre-wrap;   /* Preserves whitespace, wraps long lines */
    word-wrap: break-word;     /* Breaks long words if they would overflow */
    margin: 0;               /* Remove default pre margin */
    font-family: var(--monospace-font, monospace); /* Ensure consistent font */
}

.output-container {
    background-color: #f9f9f9;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px; /* Further reduced from 8px for ultra-compact layout */
    height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s, opacity 0.2s; /* Added opacity */
    position: relative;
    vertical-align: middle; /* Align buttons nicely */
    margin: 2px 0; /* Add small vertical margin */
}

button:hover:not([disabled]) { /* Ensure hover only when not disabled */
    background-color: #3a5cd7;
}

button[disabled] {
    opacity: 0.6; /* Use opacity */
    cursor: not-allowed;
    background-color: #cccccc; /* Grey background when disabled */
}
 button[disabled]:hover { /* Prevent hover effect when disabled */
    background-color: #cccccc;
 }


.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    margin-bottom: 5px;
}

button:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.generate-btn {
    background-color: var(--secondary);
    margin-top: 10px;
}

.generate-btn:hover:not([disabled]) { /* Added */
    background-color: #e69939;
}

.wizard-tabs {
    display: flex;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.wizard-tab {
    flex: 1;
    padding: 15px 0;
    text-align: center;
    background-color: #f1f1f1;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    color: #555;
    transition: all 0.3s;
    border-right: 1px solid var(--border); /* Add separator */
}
.wizard-tab:last-child {
    border-right: none; /* Remove border for last tab */
}


.wizard-tab.active {
    background-color: var(--primary);
    color: white;
}

.wizard-tab.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wizard-tab.completed::after {
    content: "✓";
    margin-left: 5px;
    color: var(--success-color);
    font-weight: bold; /* Make checkmark bolder */
}
.wizard-tab.active.completed::after {
    color: white; /* Make checkmark white when tab is active */
}

.wizard-tab.needs-update {
    background-color: var(--warning-color);
    color: var(--text);
}


.wizard-content {
    display: none;
}

.wizard-content.active {
    display: block;
}

/* Model selection */
.model-selection {
    margin-bottom: 15px;
}
.model-selection label, .config-option label { /* Consistent label styling */
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.model-select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-top: 5px;
     box-sizing: border-box; /* Added */
}

/* Visual grouping for model/thinking */
.model-thinking-group {
     background-color: #f8f9fa; /* Slightly different background */
     border: 1px solid var(--border);
     padding: 15px;
     border-radius: var(--border-radius);
     margin-bottom: 20px;
}

/* Styling for the Clone Game Selection Group */
.clone-selection-group {
    background-color: #f8f9fa; /* Match model-thinking-group */
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px; /* Consistent spacing */
}

/* Apply consistent label styling to clone selection label */
.clone-selection-group .form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500; /* Match .model-selection label */
}

/* Apply consistent select styling to clone selection dropdown */
.clone-selection-group .form-control {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-top: 5px; /* Match .model-select */
    box-sizing: border-box;
}

/* Updated prompt styling based on old/style.css */
.prompt-container {
    margin-bottom: 2px; /* Further reduced from 3px for ultra-tight spacing between cards */
    border: 1px solid var(--border); /* var(--border) is #e0e0e0 */
    border-radius: 8px;
    overflow: hidden; /* From old/style.css */
    background-color: var(--card);
    /* Removed padding-top, padding-bottom, padding-left, padding-right as per old structure */
    /* Removed position: relative */
}

.prompt-container h4 {
    background-color: #f0f8ff;
    margin: 0; /* From old/style.css */
    padding: 6px 10px; /* Further reduced from 8px 12px for ultra-compact layout */
    border-bottom: 1px solid var(--border); /* var(--border) is #e0e0e0 */
    font-size: 1.02em; /* Slightly reduced from 1.05em for more compact look */
    display: flex; /* From old/style.css */
    justify-content: space-between; /* From old/style.css */
    align-items: center; /* From old/style.css */
    flex-wrap: wrap; /* From old/style.css */
    gap: 6px; /* Further reduced from 8px for ultra-tight spacing */
    /* border-top-left-radius and border-top-right-radius removed as they were not in old/style.css for h4 */
}

/* This div wraps the actual prompt text/textarea */
.prompt-content {
    position: relative; /* From old/style.css */
    padding: 6px 8px; /* Further reduced from 10px 12px for ultra-compact layout */
    background-color: #f9f9f9; /* From old/style.css */
    /* Removed padding-top, padding-bottom, padding-left, padding-right which were 5px/0px */
}

.prompt-text {
    margin: 0;
    white-space: pre-wrap;
    font-family: monospace;
    color: #333;
    background-color: #fff;
    padding: 6px; /* Further reduced from 8px for ultra-compact layout */
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    line-height: 1.3; /* Add tighter line height for more compact text */
    /* Removed max-height, overflow-y: auto, and line-height: 1.4 */
}

.prompt-edit-area {
    width: 100%;
    min-height: 100px;
    margin: 8px 0; /* Reduced from 10px 0 for more compact layout */
    padding: 8px; /* Reduced from 10px for more compact layout */
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: monospace;
    resize: vertical;
     box-sizing: border-box; /* Added */
}

.copy-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.copy-btn:hover:not([disabled]) { /* Added */
    background-color: #218838;
}

.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px; /* Added */
    color: var(--text); /* Added */
    font-size: 0.95em; /* Adjust size */
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1); /* Adjusted color */
    border-radius: 50%;
    border-top-color: var(--primary); /* Use primary color */
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important; /* Use important to override potential conflicts */
}

/* Copy tooltip */
.copy-tooltip {
    position: absolute;
    top: -25px;
    right: 0;
    background-color: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10; /* Ensure tooltip is above other elements */
}

.copy-tooltip.visible {
    opacity: 1;
}

/* Export buttons */
.export-buttons {
    margin-top: 10px; /* Reduced from 15px for more compact layout */
    margin-bottom: 10px; /* Reduced from 15px for more compact layout */
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 8px; /* Reduced from 10px for tighter spacing */
}

.export-btn {
    background-color: #6c757d;
}

.export-btn:hover:not([disabled]) { /* Added */
    background-color: #5a6268;
}

.export-html-btn {
    background-color: #28a745;
}

.export-html-btn:hover:not([disabled]) { /* Added */
    background-color: #218838;
}

/* Production Download Button Specific Style */
#download-production-btn {
    /* background-color: var(--success-color); */ /* Applied inline */
    /* color: white; */
}
#download-production-btn:hover:not([disabled]) {
     background-color: #218838; /* Darker green */
}


/* Status indicator - Floating in upper right */
.status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 12px 18px;
    border-radius: var(--border-radius);
    font-size: 14px;
    display: none;
    border: 1px solid transparent;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(0);
    transition: all 0.3s ease;
    word-wrap: break-word;
}

/* When progress is shown, move status indicator down */
.progress-container:not(.hidden) ~ .status-indicator,
.status-indicator.with-progress {
    top: 110px; /* Move down to avoid overlap with progress container */
}

/* Show/hide animations */
.status-indicator.status-success,
.status-indicator.status-error {
    display: block;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.status-indicator.status-success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.status-indicator.status-error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.status-indicator.status-warning {
    display: block;
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

/* Symbol category tagging */
.symbol-category {
    margin-bottom: 10px; /* Reduced from 15px for more compact layout */
}

.symbol-category-title {
    font-weight: 600;
    margin-bottom: 4px; /* Reduced from 5px for tighter spacing */
}

.symbol-tag {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    margin-left: 5px; /* Added margin-left */
    vertical-align: middle; /* Align with text/checkbox */
    white-space: nowrap; /* Prevent tag text wrapping */
}

.symbol-tag.hp { background-color: #ffd700; color: #333; }
.symbol-tag.mp { background-color: #9370db; color: white; }
.symbol-tag.lp { background-color: #87ceeb; color: #333; }
.symbol-tag.wild { background-color: #ff6347; color: white; }
.symbol-tag.scatter { background-color: #32cd32; color: white; }
.symbol-tag.bonus { background-color: #ff69b4; color: white; }
.symbol-tag.multiplier { background-color: #ff8c00; color: white; }
.symbol-tag.jackpot { background-color: #dc143c; color: white; }
.symbol-tag.frame { background-color: #a9a9a9; color: white; }
.symbol-tag.background { background-color: #556b2f; color: white; }
.symbol-tag.placeholder { background-color: #dddddd; color: #666; border: 1px solid #bbb;} /* Added */
.symbol-tag.other { background-color: #e9ecef; color: #495057; border: 1px solid #ced4da;}

/* Legacy target info styles - removed to avoid conflicts with new design */


.category-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.category-option {
    flex: 1;
    min-width: 150px; /* Ensure dropdown has enough space */
}

.category-option label {
    display: block;
    margin-bottom: 3px; /* Smaller margin */
    font-size: 0.9em; /* Smaller font */
}


.category-option select {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid var(--border);
    box-sizing: border-box; /* Added */
    font-size: 0.95em; /* Slightly smaller font */
}

/* Image display grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Adjusted min size */
    gap: 15px;
    margin-bottom: 30px;
    margin-top: 15px; /* Increased margin for better separation */
}

/* Image section container - Better visual separation between image groups */
.image-section {
    background-color: #fbfbfb;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.image-section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.image-section-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.image-section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.target-info {
    font-size: 0.85em;
    color: #666;
    background-color: rgba(0,123,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0,123,255,0.2);
    white-space: nowrap;
}

/* Improved +Variation button */
.regen-image-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(40,167,69,0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.regen-image-btn:before {
    content: "↻";
    font-size: 1em;
}

.regen-image-btn:hover:not([disabled]) {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40,167,69,0.3);
}

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

.regen-image-btn[disabled] {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.regen-status {
    font-size: 0.8em;
    font-weight: 500;
    color: #666;
    margin-left: 8px;
}

/* Image grid container within section */
.image-section-content {
    padding: 20px;
    background-color: white;
}

.image-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack image and controls */
    position: relative; /* Needed for absolute positioned indicators */
    border: 1px solid #e9ecef;
}

.image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: #dee2e6;
}

.image-container {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Use contain to see whole image */
    cursor: pointer; /* Indicate clickable for lightbox */
    transition: opacity 0.2s ease;
}

.image-container:hover img {
    opacity: 0.95;
}

.image-card-controls {
    display: flex;
    padding: 12px; /* Increased padding */
    justify-content: space-between; /* Better spacing */
    align-items: center; /* Vertically align */
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid #e9ecef;
    gap: 8px; /* Increased gap */
}

/* Checkbox styling */
.image-select-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Model badge styling */
.image-model-info {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    border-top: 1px solid #dadce0;
    text-align: center;
}

.model-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #5f6368;
    background-color: #ffffff;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #dadce0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Style download button within card controls */
.image-card-controls .download-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    background-color: var(--info-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-grow: 0;
}

.image-card-controls .download-btn:hover:not([disabled]) {
    background-color: #138496;
    transform: translateY(-1px);
}

/* Upscale Button */
.upscale-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    background-color: var(--upscale-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-grow: 0;
}

.upscale-btn:hover:not([disabled]) {
    background-color: #5a32a3; /* Darker purple */
    transform: translateY(-1px);
}

.upscale-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #cccccc;
    transform: none;
}

.upscale-btn[disabled]:hover {
    background-color: #cccccc;
    transform: none;
}

/* Upscale Indicators */
.upscaled-indicator, .upscaling-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 12px;
    z-index: 2; /* Above image */
    pointer-events: none; /* Don't interfere with clicks */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.upscaled-indicator {
    background-color: var(--upscale-color); /* Purple background */
}

.upscaling-indicator {
    background-color: var(--warning-color); /* Orange background */
    color: var(--text);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* Prompt selection */
.prompt-select-container {
    display: flex;
    align-items: center;
    margin-bottom: 0; /* Remove bottom margin */
    flex-grow: 1; /* Allow label to take space */
    flex-basis: 70%; /* Allow wrapping for long titles */
    min-width: 0; /* Prevent overflow issues with flex */
}
.prompt-select-container label {
     cursor: pointer; /* Make label clickable */
     word-break: break-word; /* Wrap long titles */
     margin-left: 5px; /* Space after checkbox */
     flex-grow: 1; /* Allow label to grow */
}
.prompt-actions { /* Container for buttons */
     display: flex;
     gap: 5px;
     flex-shrink: 0; /* Prevent buttons shrinking */
}

.prompt-checkbox {
    /* Use default browser checkbox */
     width: auto;
     height: auto;
     flex-shrink: 0; /* Prevent shrinking */
     margin: 0; /* Reset margin */
     vertical-align: middle; /* Align with label/tags */
}


.warning-message {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 10px 15px; /* Adjusted padding */
    border-radius: 4px;
    margin: 15px 0; /* Adjusted margin */
    display: none; /* Initially hidden */
    align-items: center; /* Align button vertically */
    justify-content: space-between; /* Space out text and button */
    font-size: 0.95em; /* Adjust size */
}
.warning-message button {
     margin-left: 15px;
     background-color: var(--warning-color);
     color: #333;
     padding: 5px 10px;
     font-size: 13px;
     flex-shrink: 0; /* Prevent button shrinking */
 }
 .warning-message button:hover:not([disabled]) {
     background-color: #e0a800;
 }


/* Error recovery section */
.error-recovery {
    margin-top: 20px;
    border: 1px solid var(--danger-color);
    border-radius: var(--border-radius);
    padding: 15px;
    background-color: #fff5f5; /* Light red background */
}

.error-recovery h3 {
    color: var(--danger-color);
    margin-top: 0;
    margin-bottom: 15px; /* Add space */
}

/* Add style for the remove button */
.remove-error-btn {
     background-color: var(--danger-color);
     margin-left: 5px; /* Space from other buttons */
 }
.remove-error-btn:hover:not([disabled]) {
     background-color: #c82333;
 }


.retry-btn {
    background-color: var(--warning-color);
    color: #333;
}

.retry-btn:hover:not([disabled]) { /* Added */
    background-color: #e0a800;
}

/* Navigation buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px; /* Increased space */
    padding-top: 15px; /* Add padding */
    border-top: 1px solid var(--border); /* Add separator */
}

.back-btn {
    background-color: #6c757d;
}
.back-btn:hover:not([disabled]) { /* Added */
    background-color: #5a6268;
}

.next-btn {
    background-color: var(--secondary);
}
.next-btn:hover:not([disabled]) { /* Added */
     background-color: #e69939;
 }

/* Button groups */
.button-group {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 15px; /* Added bottom margin */
}

/* Template system */
.template-section {
    margin-bottom: 20px;
}

.template-dropdown {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-top: 5px;
    margin-bottom: 10px;
     box-sizing: border-box; /* Added */
}

.searchable-dropdown-container {
    position: relative;
    width: 100%;
    margin-bottom: 10px; /* Spacing */
}

.searchable-dropdown-input {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-top: 5px;
    margin-bottom: 5px;
     box-sizing: border-box; /* Added */
}

.custom-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 5px;
    margin-bottom: 10px;
}

.custom-input {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    box-sizing: border-box;
    font-size: 14px;
    margin: 0;
}

.symbol-input {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-top: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
}

/* Dropdown and list are visually combined */
.searchable-dropdown-container select {
     /* Keep hidden, handled by input list */
     position: absolute;
     left: -9999px;
}

/* *** ADDED / MODIFIED DATALIST STYLES *** */
datalist {
    position: absolute; /* Needed for positioning below input */
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 0 0 4px 4px; /* Match input rounding */
    width: 100%; /* Match input width */
    z-index: 10;
    max-height: 250px; /* Increased max height */
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Add shadow */
    box-sizing: border-box; /* Ensure padding/border included in width */

    /* --- Experimental Column Styling --- */
    column-count: 2; /* Try 2 columns */
    column-gap: 15px;
    padding: 5px; /* Add padding for column gap */
    /* --- End Experimental Column Styling --- */
}

datalist option {
    padding: 6px 10px; /* Adjust padding */
    cursor: pointer;
    font-size: 0.9em; /* Slightly smaller font */
    display: block; /* Needed for columns and padding */
    white-space: normal; /* Allow text wrapping */
    word-break: break-word;
    /* Prevent items breaking across columns */
    break-inside: avoid-column;
    page-break-inside: avoid; /* Older syntax */
}
datalist option:hover {
    background-color: #f0f8ff; /* Lighter hover */
}


/* Image generation config */
.config-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px; /* Added padding */
    border-bottom: 1px solid var(--border); /* Added border */
}

.config-option {
    flex: 1;
    min-width: 200px;
}


.config-option select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    box-sizing: border-box; /* Added */
}
.config-option small { /* Style help text */
     display: block;
     font-size: 0.85em;
     color: #666;
     margin-top: 5px;
}

/* Progress tracker - Floating version */
.progress-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001; /* Higher than status indicator */
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    max-width: 350px;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(0);
    transition: all 0.3s ease;
    /* display: none; // Controlled by JS now */
}

/* Progress container animations */
.progress-container:not(.hidden) {
    animation: slideInRight 0.3s ease;
}

.progress-container.hidden {
    transform: translateX(100%);
    opacity: 0;
}

/* Ensure consistent width and alignment when stacked */
.progress-container:not(.hidden) ~ .status-indicator {
    min-width: 250px; /* Match progress container min-width */
}

/* Mobile responsiveness for floating indicators */
@media (max-width: 768px) {
    .status-indicator,
    .progress-container {
        right: 10px;
        top: 10px;
        max-width: calc(100vw - 20px);
        min-width: auto;
    }
    
    .status-indicator.with-progress,
    .progress-container:not(.hidden) ~ .status-indicator {
        top: 90px; /* Adjust for smaller mobile screens */
    }
}

.progress-bar-outer {
    height: 10px;
    background-color: #e9ecef; /* Lighter background */
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border); /* Add border */
}

.progress-bar-inner {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px; /* Match outer radius */
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

#images-output h4 { /* Style item titles directly under #images-output - Legacy support */
    font-size: 1.1em;
    margin-left: 0; /* Remove indent */
    color: var(--text);
    margin-top: 25px; /* More spacing */
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px; /* More padding */
    margin-bottom: 15px; /* Space below heading */
    display: flex; /* Allow flex for aligning target info */
    align-items: center;
    gap: 10px;
}

/* Legacy target info styling for backward compatibility */
#images-output h4 .target-info {
    font-size: 0.75em;
    color: #666;
    background-color: rgba(0,123,255,0.1);
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid rgba(0,123,255,0.2);
    white-space: nowrap;
}
#images-container .card { /* Remove inner card styling if not needed */
     box-shadow: none;
     border: none;
     padding: 0;
 }
#images-output { /* Add padding to the overall output area */
    padding: 10px;
}

/* Style for Enhance Prompt Warning */
.warning-text {
    display: block; /* Ensure it takes its own line */
    font-size: 0.8em; /* Smaller than normal small text */
    color: var(--warning-color); /* Use warning color for visibility */
    font-weight: 500;
}

/* --- Lightbox Styles --- */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Darker overlay */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px; /* Add padding around content */
    box-sizing: border-box;
    opacity: 0; /* Start hidden for transition */
    visibility: hidden;
    -webkit-transition: opacity 0.3s ease, visibility 0.3s ease;
    -moz-transition: opacity 0.3s ease, visibility 0.3s ease;
    -o-transition: opacity 0.3s ease, visibility 0.3s ease;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox-overlay.visible { /* Use .visible class for controlling display */
    opacity: 1;
    visibility: visible;
}
#lightbox-overlay.hidden { /* Ensure hidden class works */
    opacity: 0;
    visibility: hidden;
}


#lightbox-content {
    position: relative;
    max-width: 95%; /* Allow slightly wider */
    max-height: 95%;
    display: flex; /* Use flex for image/caption layout */
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Changed from center to flex-start to prevent top cutoff */
    padding-top: 20px; /* Add some top padding */
}

#lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(85vh - 120px); /* Reduced reserved space to show full image without cropping */
    object-fit: contain;
    border-radius: 4px; /* Optional: slight rounding */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4); /* Add shadow */
    margin-bottom: 10px; /* Space for caption */
    flex-shrink: 0; /* Prevent image from shrinking */
}

#lightbox-caption {
    color: #eee; /* Light caption text */
    margin-top: 5px; /* Adjust spacing */
    font-size: 1em;
    text-align: center;
    max-width: 80%; /* Prevent caption from being too wide */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative; /* Needed for absolute positioned indicator */
    padding-right: 25px; /* Space for indicator */
    display: flex; /* Use flex for aligning indicator */
    align-items: center;
    justify-content: center;
}

/* Upscale indicator for lightbox caption */
#lightbox-caption .upscaled-indicator,
#lightbox-caption .upscaling-indicator {
    position: static; /* Remove absolute positioning */
    transform: none; /* Remove transform */
    margin-left: 8px; /* Space from text */
    vertical-align: middle; /* Align with text */
}


#lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5em; /* Larger close button */
    color: #fff;
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: color 0.2s ease;
    z-index: 1002; /* Ensure it's above prev/next */
}
#lightbox-close:hover {
    color: #ccc;
}

#lightbox-prev,
#lightbox-next {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
    background-color: rgba(50, 50, 50, 0.6);
    color: #fff;
    border: none;
    font-size: 2.5em;
    cursor: pointer;
    padding: 15px 10px;
    border-radius: 4px;
    z-index: 1001;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: background-color 0.2s ease;
}
#lightbox-prev:hover,
#lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
#lightbox-prev {
    left: 20px;
}
#lightbox-next {
    right: 20px;
}

#lightbox-prev[disabled],
#lightbox-next[disabled] {
    opacity: 0.4;
    cursor: default;
    background-color: rgba(50, 50, 50, 0.4);
}

/* Enhanced Lightbox Info Panel */
#lightbox-info-panel {
    margin-top: 15px;
}

#lightbox-details {
    margin: 10px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.lightbox-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5px 0;
    color: #ffffff;
}

.detail-label {
    font-weight: bold;
    color: #cccccc;
    min-width: 70px;
}

#lightbox-model-name,
#lightbox-symbol-name,
#lightbox-category,
#lightbox-target-info {
    color: #ffffff;
    text-align: right;
    font-family: monospace;
    flex: 1;
    margin-left: 10px;
}

/* Lightbox Actions */
#lightbox-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Lightbox buttons */
#lightbox-upscale-btn,
#lightbox-regenerate-btn,
#lightbox-edit-prompt-btn {
    padding: 8px 16px;
    font-size: 0.9em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-weight: 500;
    min-width: 80px;
}

#lightbox-upscale-btn {
    background-color: var(--upscale-color);
}
#lightbox-upscale-btn:hover:not([disabled]) {
     background-color: #5a32a3;
}

#lightbox-regenerate-btn {
    background-color: var(--secondary);
}
#lightbox-regenerate-btn:hover:not([disabled]) {
    background-color: #117a8b;
}

#lightbox-edit-prompt-btn {
    background-color: var(--warning);
}
#lightbox-edit-prompt-btn:hover:not([disabled]) {
    background-color: #d39e00;
}

#lightbox-upscale-btn[disabled],
#lightbox-regenerate-btn[disabled],
#lightbox-edit-prompt-btn[disabled] {
     opacity: 0.6;
     cursor: not-allowed;
     background-color: #666666;
}

#lightbox-upscale-btn[disabled]:hover,
#lightbox-regenerate-btn[disabled]:hover,
#lightbox-edit-prompt-btn[disabled]:hover {
      background-color: #666666;
}

/* Responsive lightbox adjustments */
@media (max-width: 768px) {
    #lightbox-details {
        padding: 8px;
        margin: 8px 0;
    }
    
    .lightbox-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .detail-label {
        min-width: unset;
        margin-bottom: 2px;
    }
    
    #lightbox-symbol-name,
    #lightbox-category,
    #lightbox-target-info {
        text-align: left;
        margin-left: 0;
    }
    
    #lightbox-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    #lightbox-upscale-btn,
    #lightbox-regenerate-btn,
    #lightbox-edit-prompt-btn {
        width: 100%;
        min-width: unset;
    }
}

/* --- Styles for Drag/Drop and Multi-Preview --- */

#drop-zone {
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer; /* Indicate clickable */
}
#drop-zone.dragover { /* Style when dragging over */
    background-color: #e9f5ff;
    border-color: var(--primary);
}
#image-preview-multi-container {
    min-height: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    border: 1px solid var(--border);
    padding: 5px;
    background-color: #f9f9f9;
}
#image-preview-multi-container .preview-item {
    position: relative;
    border: 1px solid var(--border);
    padding: 3px;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    width: 90px; /* Give items a fixed width */
    display: flex;
    flex-direction: column;
    align-items: center;
}
#image-preview-multi-container img {
    display: block;
    width: 80px; /* Adjust size as needed */
    height: 80px;
    object-fit: cover; /* Cover ensures the area is filled */
}
#image-preview-multi-container .remove-img-btn {
    position: absolute;
    top: -5px; /* Position slightly outside */
    right: -5px; /* Position slightly outside */
    background-color: rgba(220, 53, 69, 0.8); /* Semi-transparent red */
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    line-height: 17px; /* Adjust for centering 'X' */
    text-align: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 5; /* Ensure it's above the image */
}
#image-preview-multi-container .remove-img-btn:hover {
    background-color: var(--danger-color); /* Full red on hover */
}


/* --- Style for Thinking Toggle --- */
#thinking-toggle-container label {
    font-weight: normal; /* Override general label style if needed */
}

#thinking-toggle-container small {
    padding-left: 26px; /* Align help text with label text */
    color: #555; /* Slightly darker help text */
}

#thinking-toggle-container input[type="checkbox"] {
     width: auto; /* Reset width */
     height: auto; /* Reset height */
     vertical-align: middle;
     transform: scale(1.1); /* Slightly larger */
}


/* --- Paste Zone Styles --- */
#paste-zone {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
#paste-zone:focus {
    border-color: var(--primary);
    background-color: #e9f5ff;
    outline: none; /* Remove default focus outline */
}
#paste-zone span { /* Style for placeholder text */
    display: inline-block; /* Allow text to be centered */
    width: 100%;
}
#paste-zone:focus span { /* Hide placeholder on focus */
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
    .input-section, .output-section {
        grid-column: 1; /* Reset column span */
    }
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Smaller images on smaller screens */
    }
    .button-group {
        justify-content: center; /* Center buttons when they wrap */
    }
}

@media (max-width: 600px) {
    body { padding: 10px; }
    .container { padding: 0; }
    .card { padding: 15px; }
    .wizard-tabs { font-size: 0.9em; }
    .wizard-tab { padding: 12px 0; }
    h1 { font-size: 1.5em; }
    h2 { font-size: 1.25em; }
    h3 { font-size: 1.1em; }
    button { padding: 8px 12px; font-size: 0.9em; }
    .input-area { height: 200px; }
    .output-container { height: 400px; }
    .image-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
    .image-section-header { flex-direction: column; align-items: stretch; text-align: center; }
    .image-section-actions { justify-content: center; margin-top: 10px; }
    .target-info { margin-bottom: 5px; }
    .regen-image-btn { font-size: 0.75em; padding: 6px 12px; }
    #image-preview-multi-container img { width: 60px; height: 60px; }
    #image-preview-multi-container .preview-item { width: 70px; }
    #image-preview-multi-container .remove-img-btn { width: 16px; height: 16px; font-size: 9px; line-height: 15px; }
    .nav-buttons { flex-direction: column; gap: 10px; }
    #lightbox-prev, #lightbox-next { font-size: 2em; padding: 10px 5px; }
    #lightbox-prev { left: 5px; }
    #lightbox-next { right: 5px; }
    #lightbox-close { font-size: 2em; top: 10px; right: 10px; }
    #lightbox-caption { font-size: 0.9em; }
     .prompt-select-container { flex-basis: 60%; } /* Allow more space for title on small screens */
     .prompt-actions { flex-basis: 35%; justify-content: flex-end; } /* Push buttons right */
}

/* Add vendor prefixes to transform, transition, flexbox, and grid properties */
.transform {
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}

.transition {
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.flex-container {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
}

.grid-container {
    display: -ms-grid;
    display: grid;
}

/* Add vendor prefixes to animation properties */
@-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}

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

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

/* Add vendor prefixes to transform properties in existing classes */
#lightbox-prev,
#lightbox-next {
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}

/* Add vendor prefixes to transition properties in existing classes */
#lightbox-overlay {
    -webkit-transition: opacity 0.3s ease, visibility 0.3s ease;
    -moz-transition: opacity 0.3s ease, visibility 0.3s ease;
    -o-transition: opacity 0.3s ease, visibility 0.3s ease;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Add vendor prefixes to flexbox properties in existing classes */
.button-group {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
}

/* Add vendor prefixes to grid properties in existing classes */
.grid-container {
    display: -ms-grid;
    display: grid;
}

/* Legacy regen button styles removed - using improved styles above */

/* Style for status indicator next to button */
.regen-status {
    font-style: italic;
    color: var(--secondary);
    font-weight: bold;
}

/* Download cancel button styles */
#cancel-download-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    display: none; /* Hidden by default */
}

#cancel-download-btn:hover {
    background-color: #bd2130;
}

.danger-button {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.danger-button:hover {
    background-color: #bd2130;
}

/* Download progress panel styles */
.progress-panel {
    position: relative;
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-height: 350px;
    overflow: auto;
    display: none; /* Hidden by default */
}

.progress-panel-header {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 5px;
}

.progress-step {
    position: relative;
    padding: 5px 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 0.85em;
    color: #6c757d;
}

.progress-step.active {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.progress-step.completed {
    background-color: #28a745;
    color: white;
}

.progress-step.error {
    background-color: #dc3545;
    color: white;
}

.progress-panel-details {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9em;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px;
    background-color: #fff;
}

.progress-detail {
    margin-bottom: 5px;
    padding: 3px 5px;
    border-bottom: 1px solid #f5f5f5;
}

.progress-detail:last-child {
    border-bottom: none;
}

.progress-detail.error {
    color: #dc3545;
    font-weight: bold;
}

/* Intelligence Panel Styling */
.intelligence-panel {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.intelligence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dee2e6;
}

.intelligence-header h3 {
    margin: 0;
    color: #007bff;
    font-size: 1.25rem;
    font-weight: 600;
}

.intelligence-summary {
    display: flex;
    gap: 12px;
    align-items: center;
}

.issue-count {
    background: linear-gradient(145deg, #ff6b6b, #e55353);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.recommendation-count {
    background: linear-gradient(145deg, #4ecdc4, #45b7aa);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(78, 205, 196, 0.3);
}

.no-issues {
    background: linear-gradient(145deg, #51cf66, #47b759);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(81, 207, 102, 0.3);
}

.intelligence-content {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.intelligence-content::-webkit-scrollbar {
    width: 8px;
}

.intelligence-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.intelligence-content::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

.intelligence-content::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

.analysis-section {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.analysis-section h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.analysis-section.recommendations {
    border-left-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.intelligence-warning {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    color: #721c24;
}

.intelligence-recommendation {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid #4ecdc4;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    color: #0c5460;
}

.intelligence-success {
    background: rgba(81, 207, 102, 0.1);
    border: 1px solid #51cf66;
    border-radius: 6px;
    padding: 16px;
    color: #2b8a3e;
    text-align: center;
    font-weight: 600;
}

.warning-details {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid #dee2e6;
}

.rec-target {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 6px;
    font-style: italic;
}

/* Template Browser Modal Styles */
.browse-btn {
    margin-left: 10px;
    padding: 8px 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.browse-btn:hover {
    background-color: #3a5cd7;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.template-browser {
    width: 900px;
    height: 700px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    border: none;
    background: none;
}

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

/* Hide X button for template browser to prevent accidental closure */
.template-browser .modal-close {
    display: none;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.browser-container {
    display: flex;
    height: 100%;
}

.browser-sidebar {
    width: 280px;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

.search-container {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.category-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.category-item {
    padding: 12px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
    color: #555;
}

.category-item:hover {
    background-color: #e9ecef;
    color: #333;
}

.category-item.active {
    background-color: #007bff;
    color: white;
    border-left-color: #0056b3;
}

.category-item .count {
    float: right;
    background-color: rgba(0, 0, 0, 0.1);
    color: #666;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: normal;
}

.category-item.active .count {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Special styling for "All" category */
.category-item.all-category {
    background-color: #f8f9fa;
    border-left-color: #28a745;
    font-weight: 600;
    color: #28a745;
}

.category-item.all-category:hover {
    background-color: #e9ecef;
    color: #1e7e34;
}

.category-item.all-category.active {
    background-color: #28a745;
    color: white;
    border-left-color: #1e7e34;
}

.category-item.all-category .count {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    font-weight: 600;
}

.category-item.all-category.active .count {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Mashup Controls Styling */
.mashup-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-right: 20px;
}

.mashup-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #ffd700;
    background-color: rgba(255, 215, 0, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
}

.mashup-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    font-weight: 500;
}

.mashup-toggle {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.mashup-info {
    font-size: 16px;
    color: #000;
    cursor: help;
    background-color: #ffd700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mashup-selected-container {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #dee2e6;
    max-width: 400px;
}

.mashup-selected-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.mashup-selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.mashup-selected-item {
    display: flex;
    align-items: center;
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    gap: 6px;
}

.mashup-item-name {
    font-weight: 500;
}

.mashup-remove-btn {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.mashup-remove-btn:hover {
    opacity: 1;
}

.mashup-clear-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.mashup-clear-btn:hover {
    background-color: #c82333;
}

.mashup-limit-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 6px;
    font-size: 12px;
    border: 1px solid #ffeaa7;
}

/* Template Item Mashup Styling */
.template-item.mashup-selected {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
    position: relative;
}

.template-item.mashup-selected::before {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #2196f3;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.mashup-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.template-item {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.browser-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.category-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
}

.category-header h3 {
    margin: 0;
    color: #333;
}

.item-count {
    color: #666;
    font-size: 0.9em;
}

.items-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    align-content: start;
}

.placeholder-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

.template-item {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: white;
}

.template-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.template-item.selected {
    border-color: #007bff;
    background-color: #f0f8ff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.template-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.template-item .description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.template-item .keywords {
    margin-top: 10px;
    color: #888;
    font-size: 0.8em;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f8f9fa;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary:hover:not([disabled]) {
    background-color: #0056b3;
}

.btn-primary[disabled] {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Responsive adjustments for modal */
@media (max-width: 1000px) {
    .template-browser {
        width: 95vw;
        height: 85vh;
    }
    
    .browser-sidebar {
        width: 240px;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 700px) {
    .browser-container {
        flex-direction: column;
    }
    
    .browser-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .category-list {
        flex: 1;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
        gap: 5px;
    }
    
    .category-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 8px 12px;
        border-radius: 4px;
    }
    
    .category-item.active {
        border-bottom-color: #007bff;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
}

/* === REVAMPED PROMPTS SECTION === */

/* Prompts Header */
.prompts-header {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f1ff 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e1e8ff;
}

.prompts-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 16px;
}

.prompts-title-section h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.75em;
    font-weight: 700;
}

.prompts-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e1e8ff;
}

.stat-number {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
    margin-top: 2px;
    font-weight: 500;
}

.prompts-description {
    margin: 0;
    color: #5a6c7d;
    font-size: 1.05em;
    line-height: 1.5;
}

/* Enhanced Warning Messages */
.warning-message {
    border-radius: 10px;
    margin-bottom: 16px;
    border: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.warning-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.warning-text {
    flex: 1;
    font-weight: 500;
}

.warning-action-btn {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.3);
    color: inherit;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.warning-action-btn:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Enhanced Control Panel */
.prompts-control-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid #e8f1ff;
    position: relative;
    overflow: hidden;
}

.prompts-control-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #6c5ce7 50%, var(--secondary) 100%);
}

.control-section {
    margin-bottom: 32px;
}

.control-section:last-child {
    margin-bottom: 0;
}

.control-title {
    margin: 0 0 20px 0;
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding-bottom: 8px;
}

.control-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, #6c5ce7 100%);
    border-radius: 2px;
}

.control-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    border: 2px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: 0.95em;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-clip: padding-box;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, #5a7cfa 100%);
    color: white;
    border-color: var(--primary);
}

.control-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3a5cd7 0%, #4a6cf7 100%);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.4);
    transform: translateY(-2px);
}

.control-btn.secondary {
    background: #6c757d;
    color: white;
}

.control-btn.secondary:hover:not(:disabled) {
    background: #5a6268;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.control-btn.accent {
    background: var(--secondary);
    color: white;
}

.control-btn.accent:hover:not(:disabled) {
    background: #e69939;
    box-shadow: 0 4px 12px rgba(247, 169, 74, 0.3);
}

.control-btn.export {
    background: linear-gradient(135deg, var(--success-color) 0%, #34ce57 100%);
    color: white;
    border-color: var(--success-color);
}

.control-btn.export:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #28a745 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1em;
    flex-shrink: 0;
}

.btn-text {
    white-space: nowrap;
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-filter {
    padding: 10px 18px;
    border-radius: 25px;
    border: 2px solid #e0e0e0;
    background: linear-gradient(135deg, white 0%, #f8f9ff 100%);
    color: #333 !important; /* Force override of symbol-tag colors */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.category-filter:hover {
    border-color: var(--primary);
    color: var(--primary) !important; /* Force override of symbol-tag colors */
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f1ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.2);
}

.category-filter.active {
    background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 100%);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.3);
}

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

.category-filter:hover::before {
    left: 100%;
}

/* Main Prompts Container */
.prompts-main-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.08);
    border: 1px solid #e8f1ff;
    margin-bottom: 28px;
    overflow: hidden;
    position: relative;
}

.prompts-main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, #6c5ce7 50%, var(--secondary) 100%);
}

.prompts-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4ff 100%);
    border-bottom: 1px solid #e1e8ff;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.list-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.list-header-left h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text);
}

.view-options {
    display: flex;
    gap: 4px;
    background: white;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #e0e0e0;
}

.view-toggle {
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    position: relative;
    overflow: hidden;
}

.view-toggle:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f1ff 100%);
    color: var(--primary);
    transform: scale(1.05);
}

.view-toggle.active {
    background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
}

.view-icon {
    font-size: 1em;
}

.list-header-right {
    flex-shrink: 0;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 12px 18px 12px 44px;
    border: 2px solid #e1e8ff;
    border-radius: 12px;
    font-size: 0.95em;
    width: 280px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, white 0%, #f8f9ff 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.15), 0 4px 16px rgba(0,0,0,0.1);
    background: white;
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--primary);
    font-size: 1.1em;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.search-container:hover .search-icon,
.search-input:focus + .search-icon {
    opacity: 1;
}

/* Enhanced Prompts Grid */
.prompts-grid {
    padding: 24px;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

.prompts-grid[data-view="detailed"] .prompt-container {
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid #e1e8ff;
    background: linear-gradient(135deg, white 0%, #fcfdff 100%);
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.prompts-grid[data-view="detailed"] .prompt-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, #6c5ce7 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prompts-grid[data-view="detailed"] .prompt-container:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.prompts-grid[data-view="detailed"] .prompt-container:hover::before {
    opacity: 1;
}

.prompts-grid[data-view="compact"] .prompt-container {
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    background: white;
}

.prompts-grid[data-view="compact"] .prompt-container h4 {
    padding: 12px 16px;
    font-size: 0.95em;
}

.prompts-grid[data-view="compact"] .prompt-content {
    padding: 8px 16px;
}

.prompts-grid[data-view="compact"] .prompt-text {
    padding: 8px;
    font-size: 0.85em;
    line-height: 1.3;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #555;
}

.empty-state p {
    margin: 0;
    font-size: 1em;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

/* Enhanced Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 10px;
    border: 2px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1em;
    min-width: 160px;
    justify-content: center;
}

.nav-btn.back {
    background: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
}

.nav-btn.back:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateX(-2px);
}

.nav-btn.next {
    background: var(--primary);
    color: white;
}

.nav-btn.next:hover:not(:disabled) {
    background: #3a5cd7;
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.3);
    transform: translateX(2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.nav-icon {
    font-size: 1.1em;
    transition: transform 0.2s ease;
}

.nav-btn:hover:not(:disabled) .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    font-weight: 600;
}

/* Enhanced Prompt Container Styling */
.prompts-grid .prompt-container h4 {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f1ff 100%);
    margin: 0;
    padding: 18px 24px;
    border-bottom: 1px solid #e1e8ff;
    font-size: 1.05em;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.prompts-grid .prompt-content {
    padding: 20px 24px;
    background: white;
    position: relative;
    z-index: 1;
}

.prompts-grid .prompt-text {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4ff 100%);
    border: 1px solid #e1e8ff;
    border-radius: 8px;
    padding: 16px;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
    font-family: 'Segoe UI', monospace;
    transition: all 0.3s ease;
}

.prompts-grid .prompt-text:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f1ff 100%);
    border-color: var(--primary);
}

/* Enhanced Symbol Tags */
.prompts-grid .symbol-tag {
    background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.75em;
    font-weight: 700;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
    border: 1px solid rgba(255,255,255,0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Enhanced Action Buttons */
.prompts-grid .prompt-actions {
    display: flex;
    gap: 8px;
}

.prompts-grid .edit-prompt-btn,
.prompts-grid .copy-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: linear-gradient(135deg, white 0%, #f8f9ff 100%);
    color: #495057;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.prompts-grid .edit-prompt-btn:hover,
.prompts-grid .copy-btn:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f1ff 100%);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.prompts-grid .copy-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, #34ce57 100%);
    color: white;
    border-color: var(--success-color);
}

.prompts-grid .copy-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #28a745 100%);
    border-color: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .prompts-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .prompts-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .prompts-control-panel {
        padding: 16px;
    }
    
    .control-buttons {
        justify-content: center;
    }
    
    .prompts-list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .list-header-left {
        justify-content: space-between;
    }
    
    .search-input {
        width: 100%;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .prompts-header {
        padding: 16px;
    }
    
    .stat-item {
        padding: 6px 12px;
    }
    
    .control-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    .prompts-grid {
        padding: 16px;
    }
}

/* Edit Prompt button */
.edit-prompt-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.edit-prompt-btn:before {
    content: "✏";
    font-size: 1em;
}

.edit-prompt-btn:hover:not([disabled]) {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

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

.edit-prompt-btn[disabled] {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Output Section Header Styles */
.output-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.output-section-header h3 {
    margin: 0;
    flex-grow: 1;
}

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

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

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.prompt-edit-modal,
.design-edit-modal {
    width: 700px;
    height: 600px;
}

.design-edit-textarea {
    width: 100%;
    min-height: 200px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.design-edit-info {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.design-edit-info p {
    margin: 4px 0;
    font-size: 14px;
    color: #495057;
}

.current-badge {
    background-color: var(--success-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: normal;
    margin-left: 8px;
}

.version-item.current-version {
    background-color: #e7f3ff;
    border-left: 4px solid var(--primary);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

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

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

.modal-body label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: block;
}

.prompt-edit-textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.prompt-edit-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.prompt-edit-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border-left: 4px solid var(--primary);
}

.prompt-edit-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
}

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

.version-history {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.version-history h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

#version-history-list {
    flex: 1;
    overflow-y: auto;
    max-height: 200px;
}

.no-versions {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.version-item {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    transition: box-shadow 0.2s ease;
}

.version-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.version-item.latest-version {
    border-color: var(--primary);
    background: #f0f8ff;
}

.version-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.version-number {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}

.version-date {
    color: #999;
}

.version-badge {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}

.version-prompt {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 8px;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.modal-footer {
    background: #f8f9fa;
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-sm {
    background: var(--info-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* ===== Custom Game Panel Styles ===== */
.custom-game-panel {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
}

.custom-game-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.4em;
}

.custom-game-panel > p {
    margin-bottom: 20px;
    color: #666;
}

/* Symbol Section Styles */
.symbol-section {
    margin-bottom: 25px;
}

.section-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.symbol-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.symbol-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.symbol-item-wide {
    grid-column: span 2;
}

.symbol-label {
    font-weight: 500;
    color: #333;
    font-size: 0.9em;
    cursor: help;
    line-height: 1.3;
}

.symbol-select {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85em;
    background-color: white;
    min-width: 60px;
}

.symbol-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.lp-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lp-controls .symbol-input {
    flex: 1;
    min-width: 60px;
    margin-bottom: 0;
}

.lp-controls .symbol-select {
    flex: 2;
    min-width: 120px;
}

.help-text {
    margin-top: 4px;
}

.help-text small {
    color: #666;
    font-size: 0.75em;
    line-height: 1.3;
}

.custom-game-summary {
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 20px;
}

.custom-game-summary h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.1em;
}

.custom-game-summary p {
    margin-bottom: 0;
    color: #666;
    font-size: 0.95em;
}

/* Mobile responsiveness for custom game panel */
@media (max-width: 768px) {
    .symbol-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .symbol-item {
        padding: 10px;
    }
    
    .symbol-item-wide {
        grid-column: span 1;
    }
    
    .custom-game-panel {
        padding: 15px;
    }
    
    .lp-controls {
        flex-direction: column;
        gap: 6px;
    }
    
    .section-title {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .symbol-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .symbol-item {
        padding: 8px;
    }
    
    .symbol-label {
        font-size: 0.8em;
    }
    
    .symbol-select {
        font-size: 0.8em;
        padding: 4px 6px;
    }
    
    /* Customize Assets Mobile Responsiveness */
    .customize-assets-btn {
        font-size: 0.8em;
        padding: 6px 12px;
        margin-left: 5px;
    }
    
    .customize-assets-modal {
        width: 95vw;
        max-width: none;
        margin: 10px;
        max-height: 90vh;
    }
    
    .customize-intro {
        text-align: center;
    }
    
    .bulk-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .bulk-actions button {
        width: 100%;
    }
    
    .asset-sections {
        gap: 15px;
    }
    
    .asset-section {
        margin-bottom: 15px;
    }
    
    .asset-section-title {
        font-size: 1.1em;
        padding: 8px 12px;
    }
    
    .asset-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .asset-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .asset-toggle {
        align-self: flex-end;
    }
    
    .asset-item-title {
        font-size: 0.9em;
        line-height: 1.3;
    }
    
    .asset-item-info {
        font-size: 0.75em;
        margin-top: 4px;
    }
    
    .background-sync-notice {
        font-size: 0.7em;
        padding: 3px 6px;
        margin-top: 4px;
    }
    
    .asset-description-input {
        font-size: 0.9em;
        min-height: 80px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
    }
    
    .modal-footer button {
        width: 100%;
        padding: 12px;
        font-size: 0.9em;
    }
    
    .customization-summary {
        text-align: center;
        font-size: 0.9em;
    }
}

/* === CUSTOMIZE ASSETS FEATURE === */

/* Customize Assets Button */
.customize-assets-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    margin-left: 10px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.customize-assets-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.customize-assets-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.customize-assets-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Customize Assets Modal */
.customize-assets-modal {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.customize-assets-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customize-intro {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--info-color);
}

.customize-intro p {
    margin: 0 0 15px 0;
    color: #495057;
    line-height: 1.5;
}

.bulk-actions {
    display: flex;
    gap: 10px;
}

.bulk-actions button {
    font-size: 0.85em;
    padding: 6px 12px;
}

/* Asset Categories */
.asset-category {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.asset-category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.asset-category-header .category-icon {
    font-size: 1.2em;
}

.asset-category-body {
    padding: 16px;
}

.asset-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* Individual Asset Items */
.asset-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.asset-item.customized {
    border-color: var(--success-color);
    background: #f8fff9;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

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

.asset-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.asset-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.asset-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.asset-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.asset-toggle input:checked + .asset-toggle-slider {
    background-color: var(--success-color);
}

.asset-toggle input:checked + .asset-toggle-slider:before {
    transform: translateX(20px);
}

.asset-item-title {
    font-weight: 600;
    color: #343a40;
    flex-grow: 1;
    line-height: 1.3;
}

.asset-item-info {
    font-size: 0.8em;
    color: #6c757d;
    margin-bottom: 8px;
    font-style: italic;
}

.background-sync-notice {
    background: #e3f2fd;
    color: #1976d2;
    font-size: 0.75em;
    font-weight: 600;
    font-style: normal;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 6px;
    border: 1px solid #bbdefb;
    display: inline-block;
}

.asset-description-input {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9em;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.asset-description-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.1);
}

.asset-description-input:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.asset-description-placeholder {
    color: #6c757d;
    font-style: italic;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    min-height: 60px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Asset Type Indicators */
.asset-type-hp { border-left: 4px solid #ffd700; }
.asset-type-mp { border-left: 4px solid #9370db; }
.asset-type-lp { border-left: 4px solid #87ceeb; }
.asset-type-wild { border-left: 4px solid #ff6347; }
.asset-type-scatter { border-left: 4px solid #32cd32; }
.asset-type-bonus { border-left: 4px solid #ff69b4; }
.asset-type-multiplier { border-left: 4px solid #ff8c00; }
.asset-type-jackpot { border-left: 4px solid #dc143c; }
.asset-type-background { border-left: 4px solid #556b2f; }
.asset-type-frame { border-left: 4px solid #a9a9a9; }
.asset-type-collector { border-left: 4px solid #8b5c2a; }
.asset-type-wysiwyg { border-left: 4px solid #00bcd4; }
.asset-type-avatar { border-left: 4px solid #e91e63; }
.asset-type-special { border-left: 4px solid #9c27b0; }
.asset-type-other { border-left: 4px solid #e9ecef; }

/* Validation and Warnings */
.asset-validation-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 0.8em;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 6px;
}

.asset-validation-warning .warning-icon {
    color: #ffc107;
    font-weight: bold;
}

.asset-duplicate-warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 0.8em;
    color: #721c24;
    display: flex;
    align-items: center;
    gap: 6px;
}

.asset-duplicate-warning .error-icon {
    color: #dc3545;
    font-weight: bold;
}

/* Modal Footer Customization */
.customize-assets-modal .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: #f8f9fa;
}

.customization-summary {
    font-size: 0.9em;
    color: #495057;
    font-weight: 500;
}

.customization-summary.has-customizations {
    color: var(--success-color);
    font-weight: 600;
}

/* Visual States */
.asset-item.has-error {
    border-color: var(--danger-color);
    background: #fff5f5;
}

.asset-item.has-warning {
    border-color: var(--warning-color);
    background: #fffbf0;
}

/* Character Counter */
.asset-char-counter {
    font-size: 0.75em;
    color: #6c757d;
    text-align: right;
    margin-top: 4px;
}

.asset-char-counter.over-limit {
    color: var(--danger-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .customize-assets-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .asset-items-grid {
        grid-template-columns: 1fr;
    }
    
    .bulk-actions {
        flex-direction: column;
    }
    
    .customize-assets-modal .modal-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .customize-assets-btn {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .asset-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .asset-toggle {
        align-self: flex-end;
    }
}

/* Style Consistency Report Styles */
.style-consistency-report {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 1px solid #4a6cf7;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.1);
}

.style-consistency-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.style-consistency-summary h4 {
    margin: 0;
    color: #4a6cf7;
    font-size: 16px;
    font-weight: 600;
}

.consistency-score {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    min-width: 160px;
}

.consistency-score.perfect {
    background: #28a745;
    color: white;
}

.consistency-score.good {
    background: #ffc107;
    color: #212529;
}

.consistency-score.needs-work {
    background: #dc3545;
    color: white;
}

.style-issues {
    margin-top: 12px;
}

.style-issues h5 {
    margin: 0 0 8px 0;
    color: #dc3545;
    font-size: 14px;
    font-weight: 600;
}

.style-issues ul {
    margin: 0;
    padding-left: 20px;
}

.style-issues li {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.style-success {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    padding: 8px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .style-consistency-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .consistency-score {
        align-self: stretch;
        text-align: center;
    }
}