:root {
    --primary-blue: #f8fafc;
    --light-blue: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.05);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --bg-main: transparent;
    --white: rgba(30, 41, 59, 0.4);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-hover: 0 10px 30px rgba(56,189,248,0.3);
    --transition-speed: 0.3s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #0f172a, #020617);
    color: var(--text-main);
    line-height: 1.5; min-height: 100vh; background-attachment: fixed;
}
body::before {
    content: ''; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80vw; height: 80vh; background: radial-gradient(circle, rgba(56,189,248,0.1) 0%, rgba(15,23,42,0) 70%);
    z-index: -1; pointer-events: none; filter: blur(100px); animation: pulse-glow 8s infinite alternate;
}
@keyframes pulse-glow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

/* ── TOP BAR ───────────────────────────────── */
#topbar {
    position: sticky;
    top: 0;
    height: 72px;
    background: rgba(15, 19, 28, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.09);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 1.5rem;
    z-index: 200;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}
.topbar-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.version-badge {
    font-size: 0.75rem;
    font-family: monospace;
    color: #64748b;
    background: rgba(30,41,59,0.5);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    font-style: italic;
}
.logo-link {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.logo-link:hover {
    transform: scale(1.05);
}
.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}
.app-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255,255,255,0.09);
    white-space: nowrap;
    color: #ffffff;
}

.main-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; position: relative; z-index: 10; }

.filter-section {
    background: rgba(30,41,59,0.4); backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 1.5rem; padding: 24px 32px; box-shadow: var(--shadow-soft); margin-bottom: 30px;
}
.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; }
.filter-title-wrap { display: flex; align-items: center; gap: 8px; }
.filter-title-wrap h2 { font-size: 18px; font-weight: 600; color: #fff; }
.info-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); font-size: 12px; color: rgba(255,255,255,0.5); }
.info-icon:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.1); }
.reset-btn { background: none; border: none; color: var(--primary-blue); font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: color 0.3s; }
.reset-btn:hover { color: #7dd3fc; }

.filter-grid { display: flex; flex-direction: column; gap: 16px; }
.filter-row { display: flex; align-items: flex-start; }
.filter-label { width: 180px; font-size: 14px; color: var(--text-main); font-weight: 500; padding-top: 6px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 12px; flex: 1; }
.filter-option { background: rgba(15,23,42,0.4); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all 0.3s; }
.filter-option:hover { color: var(--primary-blue); border-color: rgba(56,189,248,0.3); background: rgba(56,189,248,0.05); }
.filter-option.active { color: #0f172a; background-color: var(--primary-blue); font-weight: 600; border-color: var(--primary-blue); box-shadow: 0 0 15px rgba(56,189,248,0.4); }
.filter-footer { display: flex; justify-content: center; margin-top: 24px; }
.more-filters-btn { background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); padding: 8px 16px; border-radius: 20px; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all 0.3s; }
.more-filters-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.product-card {
    background: rgba(30,41,59,0.4); backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 1.5rem; padding: 24px; display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
.product-card::before { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent); transform: skewX(-20deg); transition: left 0.7s; }
.product-card:hover { transform: translateY(-8px) scale(1.02); border-color: rgba(56,189,248,0.3); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.7), 0 0 20px rgba(56,189,248,0.2); }
.product-card:hover::before { left: 200%; }
.product-image { width: 200px; height: 150px; object-fit: contain; margin-bottom: 20px; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5)); }
.product-name { font-size: 16px; font-weight: 700; color: var(--primary-blue); margin-bottom: 16px; text-align: center; }
.product-specs { width: 100%; font-size: 13px; color: var(--text-muted); }
.spec-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.spec-row:last-child { border-bottom: none; }
.spec-value { font-weight: 500; color: var(--text-main); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(2,6,23,0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: rgba(15,23,42,0.85); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); border-radius: 1.5rem; width: 1100px; max-width: 95%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0,0,0,0.6); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; color: var(--text-main); font-weight: 600; margin: 0; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); }
.close-btn:hover { color: #ef4444; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); text-align: right; }
.primary-btn { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; border: none; padding: 10px 24px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; box-shadow: 0 4px 15px rgba(245,158,11,0.3); transition: all 0.3s; }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,158,11,0.5); }
.cable-option { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; margin-bottom: 10px; cursor: pointer; background: rgba(255,255,255,0.02); transition: all 0.3s; }
.cable-option:hover { border-color: rgba(56,189,248,0.5); background: rgba(56,189,248,0.05); }
.cable-option:has(input:checked) {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: scale(1.01);
}
.cable-option:has(input:checked) span {
    color: #fff;
    font-weight: 600;
}
.cable-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.42;
    background: rgba(255,255,255,0.01);
}
.cable-option:has(input:disabled):hover {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.01);
}
.code-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 5px;
    border: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 11px;
    vertical-align: middle;
}
.cable-option input { accent-color: #38bdf8; }
@media (max-width: 768px) { .filter-row { flex-direction: column; } .filter-label { width: 100%; margin-bottom: 8px; } }

/* The embedded guide renders this same page; only its tutorial pointer and focus ring are added. */
html[data-model-select-embed="manual"] {
    scroll-behavior: auto;
}

html[data-model-select-embed="manual"] #inorobot-language-switcher {
    display: none !important;
}

html[data-model-select-embed="manual"] .logo-link {
    pointer-events: none;
}

html[data-model-select-embed="manual"],
html[data-model-select-embed="manual"] body,
html[data-model-select-embed="manual"] .modal-body {
    overflow-anchor: none;
}

html[data-model-select-embed="manual"] .model-manual-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2200;
    width: 25px;
    height: 31px;
    color: #fff;
    filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.8));
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-60px, -60px, 0);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
}

html[data-model-select-embed="manual"] .model-manual-cursor svg {
    display: block;
    width: 100%;
    height: 100%;
}

html[data-model-select-embed="manual"] .model-manual-cursor.is-visible {
    opacity: 1;
}

html[data-model-select-embed="manual"] .model-manual-spotlight {
    position: fixed;
    z-index: 2190;
    border: 2px solid rgba(56, 189, 248, 0.95);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1), 0 10px 28px rgba(14, 165, 233, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: left 0.42s cubic-bezier(0.16, 1, 0.3, 1), top 0.42s cubic-bezier(0.16, 1, 0.3, 1), width 0.42s cubic-bezier(0.16, 1, 0.3, 1), height 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
}

html[data-model-select-embed="manual"] .model-manual-spotlight.is-visible {
    opacity: 1;
}

html[data-model-select-embed="manual"] .model-manual-spotlight.is-scroll-tracking {
    opacity: 0 !important;
    transition: none !important;
}

html[data-model-select-embed="manual"] .model-manual-spotlight.is-pulsing {
    animation: modelManualSpotlightOnce 0.55s ease-out 1;
}

html[data-model-select-embed="manual"] .model-manual-ripple {
    position: fixed;
    z-index: 2210;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
}

html[data-model-select-embed="manual"] .model-manual-ripple.is-visible {
    animation: modelManualClickRipple 0.45s ease-out 1;
}

html[data-model-select-embed="manual"] .model-manual-hover {
    filter: brightness(1.08);
}

html[data-model-select-embed="manual"] .model-manual-pressed {
    transform: scale(0.97) !important;
    transition: transform 0.12s ease !important;
}

html[data-model-select-embed="manual"] .modal-content.model-manual-enter {
    animation: modelManualModalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) 1;
}

html[data-model-select-embed="manual"] .model-manual-download-toast {
    position: fixed;
    right: 24px;
    bottom: 22px;
    z-index: 2250;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 310px;
    padding: 13px 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.96);
    color: #e2e8f0;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.48);
    animation: modelManualToastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) 1;
}

html[data-model-select-embed="manual"] .model-manual-toast-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    font-weight: 800;
}

html[data-model-select-embed="manual"] .model-manual-download-toast strong,
html[data-model-select-embed="manual"] .model-manual-download-toast small {
    display: block;
}

html[data-model-select-embed="manual"] .model-manual-download-toast strong {
    font-size: 13px;
}

html[data-model-select-embed="manual"] .model-manual-download-toast small {
    margin-top: 3px;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer {
    position: fixed;
    inset: 18px;
    z-index: 2180;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: #cbd5e1;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7);
    animation: modelManualViewerIn 0.36s cubic-bezier(0.16, 1, 0.3, 1) 1;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer > header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: #0f172a;
    color: #f8fafc;
}

html[data-model-select-embed="manual"] .model-manual-document-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 30px;
    border-radius: 7px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header strong,
html[data-model-select-embed="manual"] .model-manual-document-viewer header small {
    display: block;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header strong {
    font-size: 14px;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header small {
    margin-top: 2px;
    overflow: hidden;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-model-select-embed="manual"] .model-manual-document-viewer header button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    font-size: 22px;
}

html[data-model-select-embed="manual"] .model-manual-document-scroll {
    flex: 1;
    overflow: auto;
    padding: 26px;
    scroll-behavior: auto;
}

html[data-model-select-embed="manual"] .model-manual-configuration-sheet {
    margin: 0 auto;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.28);
}

html.model-manual-paused .model-manual-cursor {
    transition-duration: 0s !important;
}

html.model-manual-paused .model-manual-spotlight {
    transition-duration: 0s !important;
}

@keyframes modelManualSpotlightOnce {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.35); }
    100% { box-shadow: 0 0 0 9px rgba(56, 189, 248, 0), 0 10px 28px rgba(14, 165, 233, 0.16); }
}

@keyframes modelManualClickRipple {
    0% { opacity: 0.95; transform: scale(0.45); }
    100% { opacity: 0; transform: scale(4.2); }
}

@keyframes modelManualModalEnter {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes modelManualViewerIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    html[data-model-select-embed="manual"] .model-manual-cursor,
    html[data-model-select-embed="manual"] .model-manual-spotlight,
    html[data-model-select-embed="manual"] .model-manual-ripple,
    html[data-model-select-embed="manual"] .model-manual-download-toast,
    html[data-model-select-embed="manual"] .model-manual-document-viewer,
    html[data-model-select-embed="manual"] .model-manual-enter {
        animation: none !important;
        transition: none !important;
    }
}
