/* ================================================
   MAINMARKET - Minimal Design
   ================================================ */

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

:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --text: #1a1a1a;
    --text-light: #666;
    --text-muted: #999;
    --border: #e0e0e0;
    --bg: #ffffff;
    --bg-light: #f8f8f8;
    --accent: #2563eb;
    --price: #d97706;
    --green: #059669;
}

body {
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.map-section {
    margin-bottom: 22px;
}

.map-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#geoMap {
    width: 100%;
    height: 220px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.location-meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ================================================
   LAYOUT
   ================================================ */

.profile-circle {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bg);
    color: var(--text-light);
    transition: all 0.2s;
    z-index: 100;
}

.profile-circle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.profile-circle svg {
    width: 18px;
    height: 18px;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 70px 20px 40px;
}

.brand-section {
    margin-bottom: 28px;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.location {
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
}

.location:hover {
    color: var(--text);
}

.currency-insight {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
    padding: 6px 10px;
    background: var(--bg-light);
    border-radius: 6px;
    border: 1px solid var(--border);
    width: fit-content;
}

.insight-flag {
    font-size: 14px;
}

.insight-currency {
    font-weight: 600;
    color: var(--text);
}

.insight-rate {
    font-weight: 500;
    color: var(--text);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 11px;
}

/* Search */
.search-section {
    margin-bottom: 28px;
}

.search-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color 0.2s;
}

.search-box:hover,
.search-box:focus-within {
    border-color: var(--accent);
}

.back-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    padding: 0;
}

.back-btn.show { display: flex; }
.back-btn:hover { color: var(--text); }

.back-btn svg {
    width: 16px;
    height: 16px;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text);
    background: transparent;
    font-family: var(--font);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.image-search-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    padding: 0;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.image-search-btn:hover {
    background: var(--bg-light);
    color: var(--accent);
}

.image-search-btn svg {
    width: 20px;
    height: 20px;
}

/* Results */
.results-wrapper { display: none; }
.results-wrapper.show { display: block; }

/* ================================================
   RESULT CARD - MINIMAL
   ================================================ */

.result-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.result-content {
    padding: 24px;
}

.result-footer {
    padding: 12px 24px;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* ================================================
   MML - MINIMAL STYLES
   ================================================ */

.mml-product {
    display: none;
}

.mml-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.mml-hero {
    background: var(--bg-light);
    padding: 16px 20px;
    margin: -24px -24px 20px -24px;
    border-bottom: 1px solid var(--border);
}

.mml-hero p {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.mml-section {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.mml-p {
    margin-bottom: 12px;
    line-height: 1.7;
}

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

.mml-list,
.mml-olist {
    margin: 12px 0;
    padding-left: 0;
    list-style: none;
}

.mml-li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mml-li:last-child {
    border-bottom: none;
}

.mml-list .mml-li::before {
    content: '•';
    color: var(--accent);
    margin-right: 8px;
}

/* Text Formatting */
.mml-bold { font-weight: 600; }
.mml-italic { font-style: italic; }
.mml-underline { text-decoration: underline; }
.mml-strike { text-decoration: line-through; color: var(--text-muted); }
.mml-caps { text-transform: uppercase; font-size: 0.9em; font-weight: 600; }

.mml-size-xs { font-size: 12px; }
.mml-size-sm { font-size: 13px; }
.mml-size-lg { font-size: 18px; }
.mml-size-xl { font-size: 22px; }
.mml-size-xxl { font-size: 28px; }

.mml-blue { color: var(--accent); }
.mml-green { color: var(--green); }
.mml-red { color: #dc2626; }
.mml-orange { color: var(--price); }
.mml-purple { color: #7c3aed; }
.mml-gray { color: var(--text-muted); }

.mml-highlight {
    background: #fef08a;
    padding: 0 2px;
}

.mml-highlight-green { background: #d1fae5; padding: 2px 4px; }
.mml-highlight-blue { background: #dbeafe; padding: 2px 4px; }
.mml-highlight-red { background: #fee2e2; padding: 2px 4px; }

/* Special Elements */
.mml-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mml-price-amount {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--price);
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 4px;
}

.mml-price-best .mml-price-amount {
    background: #d1fae5;
    color: var(--green);
}

.mml-price-note {
    font-size: 0.85em;
    color: var(--text-light);
}

.mml-store {
    font-weight: 600;
    color: var(--purple);
}

.mml-spec {
    font-weight: 600;
}

.mml-feature {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mml-feature-icon {
    font-size: 0.9em;
}

.mml-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.mml-badge-green { background: #d1fae5; color: var(--green); }
.mml-badge-orange { background: #fef3c7; color: var(--price); }
.mml-badge-red { background: #fee2e2; color: #dc2626; }
.mml-badge-blue { background: #dbeafe; color: var(--accent); }

.mml-note {
    font-size: 13px;
    color: var(--text-muted);
    margin: 8px 0;
}

.mml-callout {
    padding: 12px 16px;
    border-left: 3px solid;
    margin: 12px 0;
    border-radius: 4px;
}

.mml-callout-tip {
    background: #d1fae5;
    border-color: var(--green);
}

.mml-callout-warning {
    background: #fef3c7;
    border-color: var(--price);
}

.mml-callout-info {
    background: #dbeafe;
    border-color: var(--accent);
}

/* ================================================
   IMAGES - MINIMAL
   ================================================ */

.mml-img {
    margin: 16px 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s;
}

.mml-img:hover {
    transform: translateY(-2px);
}

.mml-img img {
    display: block;
    width: 100%;
    height: auto;
}

.mml-img-xs { max-width: 60px; display: inline-block; vertical-align: middle; margin: 0 8px; }
.mml-img-sm { max-width: 120px; }
.mml-img-md { max-width: 240px; }
.mml-img-lg { max-width: 320px; }
.mml-img-xl { max-width: 400px; }
.mml-img-full { max-width: 100%; }

.mml-img-left { float: left; margin-right: 16px; margin-bottom: 8px; }
.mml-img-right { float: right; margin-left: 16px; margin-bottom: 8px; }
.mml-img-center { margin: 16px auto; display: block; }

.mml-img figcaption {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}

/* Gallery */
.mml-gallery {
    margin: 20px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.mml-gallery-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.mml-gallery-label span {
    display: inline-block;
}

.mml-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 8px;
}

.mml-gallery-item {
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.mml-gallery-item:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.mml-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.mml-gallery-item img[data-src] {
    opacity: 0.3;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.mml-gallery-item img.loaded {
    opacity: 1;
}

.mml-gallery-item img.error {
    opacity: 0.2;
    filter: grayscale(1);
}

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

/* Image lazy loading placeholder */
.mml-img img[data-src],
.mml-gallery-item img[data-src] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    min-height: 200px;
}

.mml-gallery-item img[data-src] {
    min-height: 150px;
}

/* Image loaded state - fade in animation */
.mml-img img.loaded,
.mml-gallery-item img.loaded {
    animation: fadeIn 0.4s ease;
}

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

/* Image error state */
.mml-img.error {
    display: none;
}

.mml-gallery-item.error {
    display: none;
}

/* Gallery loading state */
.mml-gallery-grid.loading {
    position: relative;
    min-height: 300px;
}

.mml-gallery-grid.loading::before {
    content: "Loading images...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 13px;
}

/* Image hover effect */
.mml-img img,
.mml-gallery-item img {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mml-img img:hover,
.mml-gallery-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ================================================
   COMPARE TABLE - MINIMAL
   ================================================ */

.mml-compare {
    margin: 16px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.mml-compare-header {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.5fr;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-light);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.mml-compare-body {
    padding: 0;
}

.mml-compare-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.5fr;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.mml-compare-row:last-child {
    border-bottom: none;
}

.mml-compare-row:hover {
    background: var(--bg-light);
}

.mml-compare-best {
    background: #d1fae5 !important;
}

.mml-compare-store {
    font-weight: 600;
}

.mml-compare-price {
    font-weight: 700;
    color: var(--price);
}

.mml-compare-status {
    font-size: 13px;
    color: var(--text-light);
}

.mml-compare-note {
    font-size: 12px;
    color: var(--text-muted);
}

/* ================================================
   UTILITIES
   ================================================ */

.exit-searching {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--accent);
    cursor: pointer;
    display: none;
}

.exit-searching.show { display: block; }
.exit-searching:hover { text-decoration: underline; }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show { display: flex; }

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.error-card {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.error-card h3 {
    color: #991b1b;
    margin-bottom: 8px;
}

.error-card p {
    color: #b91c1c;
    margin-bottom: 16px;
}

.retry-btn {
    padding: 8px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
}

.retry-btn:hover {
    background: #1d4ed8;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
    .container {
        padding: 60px 16px 30px;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .result-content {
        padding: 20px;
    }
    
    .mml-hero {
        margin: -20px -20px 16px -20px;
        padding: 14px 18px;
    }
    
    .mml-hero p {
        font-size: 15px;
    }
    
    .mml-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mml-compare-header,
    .mml-compare-row {
        grid-template-columns: 1fr 1fr;
        font-size: 12px;
    }
    
    .mml-compare-header span:nth-child(3),
    .mml-compare-header span:nth-child(4),
    .mml-compare-row span:nth-child(3),
    .mml-compare-row span:nth-child(4) {
        display: none;
    }
    
    .mml-img-left,
    .mml-img-right {
        float: none;
        margin: 12px 0;
    }
}

/* ================================================
   IMAGE SEARCH MODAL
   ================================================ */

.image-search-modal,
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-search-modal.show,
.camera-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease;
}

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

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

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

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.2s;
}

.image-upload-area.dragover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
}

.upload-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-light);
}

.upload-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 8px;
}

.upload-subtext {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 20px;
}

.btn-upload,
.btn-camera,
.btn-change,
.btn-search-image,
.btn-capture {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-upload {
    background: var(--accent);
    color: white;
    margin-bottom: 12px;
}

.btn-upload:hover {
    background: #1d4ed8;
}

.btn-camera {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-camera svg {
    width: 18px;
    height: 18px;
}

.btn-camera:hover {
    background: white;
    border-color: var(--accent);
    color: var(--accent);
}

.image-preview-area {
    text-align: center;
}

.image-preview-area img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-change {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-change:hover {
    background: white;
    border-color: var(--text-light);
}

.btn-search-image {
    background: var(--accent);
    color: white;
}

.btn-search-image:hover {
    background: #1d4ed8;
}

/* Camera Modal */
.camera-modal .modal-content {
    max-width: 600px;
}

#cameraVideo {
    width: 100%;
    border-radius: 8px;
    background: #000;
}

.camera-actions {
    margin-top: 20px;
    text-align: center;
}

.btn-capture {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--accent);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-capture:hover {
    transform: scale(1.05);
}

.btn-capture svg {
    width: 48px;
    height: 48px;
    color: var(--accent);
}

/* ================================================
   SEARCH MODE - Hide map when searching
   ================================================ */

.search-mode .map-section {
    display: none;
}

.search-mode .brand-section {
    margin-bottom: 16px;
}

.search-mode .brand-section .location,
.search-mode .brand-section .location-meta,
.search-mode .brand-section .currency-insight {
    display: none !important;
}

/* ================================================
   STREAMING & LOADING EFFECTS
   ================================================ */

/* Hide the old loading overlay */
.loading-overlay {
    display: none !important;
}

/* Streaming card */
.streaming-card {
    animation: fadeIn 0.3s ease;
}

.streaming-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.streaming-icon {
    font-size: 28px;
}

.streaming-query {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
}

/* Animated dots */
.streaming-dots {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.streaming-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.streaming-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.streaming-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Skeleton loading */
.streaming-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-90 { width: 90%; }

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

/* Streaming steps */
.streaming-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.streaming-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.streaming-step.active {
    opacity: 1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.streaming-step.active .step-icon {
    animation: bounce 1s ease infinite;
}

.step-icon {
    font-size: 20px;
}

.step-text {
    font-size: 14px;
    color: var(--text);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stream in animation for content sections */
.stream-in {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stream-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================
   IMAGE RECOGNITION RESULTS
   ================================================ */

.image-search-result .result-content {
    padding: 0;
}

.image-recognition-result {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.recognition-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.recognition-icon {
    font-size: 32px;
    line-height: 1;
}

.recognition-text {
    flex: 1;
    min-width: 150px;
}

.recognition-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.recognition-query {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.recognition-details {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-light);
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.recognition-source {
    margin-top: 12px;
}

.recognition-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-light);
}

.meta-tag.brand-tag {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.meta-tag.category-tag {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.meta-tag.ai-tag {
    background: #f3e8ff;
    border-color: #c4b5fd;
    color: #6b21a8;
}

.meta-tag.web-tag {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

/* Section subtitle */
.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: -8px 0 16px 0;
}

/* Web match overlay */
.web-match-item {
    position: relative;
    overflow: hidden;
}

.match-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 24px 10px 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.web-match-item:hover .match-overlay {
    opacity: 1;
}

.match-overlay .match-title {
    position: static;
    background: none;
    padding: 0;
    font-size: 11px;
    line-height: 1.3;
    color: white;
    margin-bottom: 2px;
}

.match-overlay .match-source {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
}

/* Section headers with icons */
.mml-section .section-icon,
h3.mml-section .section-icon {
    margin-right: 8px;
}

.web-matches-section,
.product-images-section,
.ai-response-section {
    margin-bottom: 28px;
}

.web-matches-section h3,
.product-images-section h3,
.ai-response-section h3 {
    margin-bottom: 16px;
}

/* Web match items with title overlay */
.web-match-item {
    position: relative;
}

.web-match-item .match-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-size: 10px;
    padding: 16px 8px 6px;
    line-height: 1.3;
    opacity: 0;
    transition: opacity 0.2s;
}

.web-match-item:hover .match-title {
    opacity: 1;
}

/* Search again prompt */
.search-again-prompt {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.search-again-prompt p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.search-query-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.search-query-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

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

/* Confidence badges */
.mml-badge-gray {
    background: #f1f5f9;
    color: #64748b;
}

/* Image search result footer */
.image-search-result .result-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
