:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent-cyan: #22d3ee;
    --accent-pink: #ec4899;
    --accent-red: #ef4444;
    --accent-yellow: #facc15;
    --accent-purple: #a855f7;
    --bg-body: #030712;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-strong: rgba(15, 23, 42, 0.82);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7);
    --radius-lg: 24px;
    --radius-md: 14px;
    --nav-height: 64px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}
a { color: inherit; }
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0.6; }
.noise-overlay { position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E"); opacity: 0.5; }

nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    min-height: var(--nav-height);
    padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(3, 7, 18, 0.8); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.logo { font-weight: 700; font-size: 20px; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 32px; height: 32px; background: var(--primary); border-radius: 8px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.nav-links { display: flex; gap: 20px; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: #fff; }
.menu-btn { display: none; background: none; border: none; color: #fff; cursor: pointer; font-size: 24px; }

.page-hero {
    position: relative; min-height: 52vh; max-height: 760px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 110px 20px 70px; overflow: hidden;
    border-bottom-left-radius: 40px; border-bottom-right-radius: 40px;
}
.page-hero.compact { min-height: 42vh; padding-bottom: 56px; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0.9; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(3,7,18,0.45) 45%, rgba(3,7,18,0.97) 100%); z-index: 1; }
.header-content { position: relative; z-index: 2; max-width: 980px; }
.logo-badge { display: inline-block; background: rgba(99, 102, 241, 0.15); color: #c7d2fe; padding: 10px 20px; border-radius: 50px; font-size: 12px; font-weight: 600; margin-bottom: 24px; letter-spacing: 2px; text-transform: uppercase; border: 1px solid rgba(99, 102, 241, 0.3); backdrop-filter: blur(4px); }
.page-hero h1 { font-size: clamp(40px, 8vw, 78px); font-weight: 800; line-height: 1.0; margin-bottom: 18px; color: #ffffff; letter-spacing: -0.02em; text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #c084fc, 0 0 40px #a855f7, 0 0 80px #6366f1; }
.page-hero .subtitle { font-size: 18px; color: rgba(255, 255, 255, 0.86); margin-bottom: 36px; max-width: 760px; margin-left: auto; margin-right: auto; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.header-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.btn-main, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 28px; border-radius: var(--radius-md); text-decoration: none;
    font-weight: 600; font-size: 15px; transition: all 0.3s; border: 1px solid rgba(255,255,255,0.1);
}
.btn-main { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); color: #fff; box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }
.btn-main:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(99, 102, 241, 0.7); }
.btn-ghost { background: rgba(255,255,255,0.05); color: #fff; backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--primary-light); color: var(--primary-light); }

.container { max-width: 1200px; margin: 40px auto 0; padding: 0 20px; position: relative; z-index: 1; }
.section-intro { text-align: center; margin-bottom: 28px; }
.section-title { font-size: 34px; font-weight: 700; margin-bottom: 10px; color: #ffffff; letter-spacing: -0.02em; text-shadow: 0 0 10px rgba(168, 85, 247, 0.3); }
.section-subtitle { color: var(--text-muted); font-size: 16px; max-width: 760px; margin: 0 auto; }

.glass-card, .service-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.4) 100%);
    border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(14px);
}

.main-wrapper { display: grid; grid-template-columns: 280px 1fr; gap: 25px; max-width: 1400px; margin: 0 auto; padding: 35px 20px 60px; position: relative; z-index: 1; }
.sidebar { position: sticky; top: 90px; height: fit-content; background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.content-area { min-width: 0; }
.mobile-filter-btn { display: none; position: fixed; bottom: 20px; right: 20px; background: var(--primary); color: #fff; padding: 14px 24px; border-radius: 30px; border: none; font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: 0 5px 20px rgba(99, 102, 241, 0.5); z-index: 60; }
.overlay-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 59; }
.overlay-bg.active { display: block; }
.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-title, .label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--primary-light); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.clear-btn { font-weight: 400; color: var(--text-muted); cursor: pointer; font-size: 11px; }
.search-input-side, .custom-select, .custom-input, .search-input {
    appearance: none; background: rgba(0,0,0,0.32); border: 1px solid var(--border); color: #fff; padding: 14px 16px; font-size: 15px; font-family: inherit; border-radius: var(--radius-md); width: 100%; transition: all 0.3s;
}
.search-input-side:focus, .custom-select:focus, .custom-input:focus, .search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 15px rgba(99, 102, 241, 0.16); }
.chips-container, .popular-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .hint-tag {
    font-size: 12px; padding: 7px 12px; border-radius: 8px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; transition: all 0.2s; user-select: none;
}
.chip:hover, .hint-tag:hover { border-color: var(--primary); color: #fff; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-select { appearance: none; background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: #fff; padding: 12px 14px; font-size: 14px; font-family: inherit; border-radius: var(--radius-md); width: 100%; cursor: pointer; }
.sheet-header { display: none; padding: 15px 0; border-bottom: 1px solid var(--border); margin-bottom: 15px; justify-content: space-between; align-items: center; }
.sheet-title { font-weight: 700; font-size: 18px; }
.sheet-close { background: rgba(255,255,255,0.1); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; }
.sheet-footer { display: none; padding-top: 15px; margin-top: 15px; border-top: 1px solid var(--border); }
.btn-apply { width: 100%; padding: 16px; background: var(--primary); color: white; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; }
.mobile-search-container { display: none; position: sticky; top: calc(var(--nav-height) + 4px); z-index: 50; background-color: rgba(3,7,18,0.9); padding: 10px 0; margin-bottom: 15px; }
.mobile-search-container::after { content: ''; position: absolute; bottom: -15px; left: 0; right: 0; height: 15px; background: linear-gradient(to bottom, var(--bg-body), transparent); pointer-events: none; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.results-count { font-size: 14px; color: var(--text-muted); }
.results-count strong { color: var(--text-main); }
.page-title { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.part-card, .result-card, .works-card, .timeline-card {
    background: var(--bg-card); backdrop-filter: blur(15px); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.part-card { padding: 18px; transition: all 0.3s; display: flex; flex-direction: column; gap: 8px; }
.part-card:hover { border-color: rgba(99, 102, 241, 0.4); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.pc-category { font-size: 10px; text-transform: uppercase; color: var(--accent-purple); font-weight: 700; letter-spacing: 0.5px; }
.pc-name { font-size: 15px; font-weight: 600; line-height: 1.3; color: #fff; }
.pc-oem-box { background: rgba(250, 204, 21, 0.05); border: 1px solid rgba(250, 204, 21, 0.2); padding: 8px 10px; border-radius: 8px; margin-top: 5px; }
.pc-oem-label { font-size: 9px; color: var(--accent-yellow); text-transform: uppercase; font-weight: 700; display: block; margin-bottom: 2px; }
.pc-oem-val { font-family: monospace; font-size: 14px; color: #fff; word-break: break-all; }
.pc-meta { font-size: 12px; color: var(--text-muted); margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border); display: flex; justify-content: space-between; }
.pc-note { font-size: 12px; color: var(--accent-cyan); margin-top: 5px; font-style: italic; }

.controls-panel {
    background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 25px; margin: 0 auto 30px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: flex-end;
}
.select-wrap { position: relative; }
.select-wrap::after { content: '▼'; font-size: 10px; color: var(--primary-light); position: absolute; right: 20px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 25px; }
.stat-card { background: var(--bg-card); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; text-align: center; }
.stat-card:hover { transform: translateY(-2px); }
.stat-value { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.main-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.card-header, .result-header { padding: 18px 22px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), transparent); display: flex; justify-content: space-between; align-items: center; }
.card-title { font-size: 18px; font-weight: 700; }
.badge, .system-badge { background: rgba(99, 102, 241, 0.15); color: var(--primary-light); padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; border: 1px solid rgba(99, 102, 241, 0.2); }
.card-body, .result-body { padding: 20px; }
.group-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; margin-top: 20px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.group-header:first-child { margin-top: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-r { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.dot-i { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.group-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; }
.op-item { background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 8px; overflow: hidden; transition: all 0.2s; }
.op-item:hover { border-color: rgba(255,255,255,0.15); }
.op-head { padding: 14px 18px; display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.op-name { font-size: 15px; font-weight: 500; flex-grow: 1; }
.op-tags { display: flex; gap: 6px; }
.tag-parts { display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 4px 8px; border-radius: 6px; background: rgba(168, 85, 247, 0.1); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.2); font-weight: 600; }
.op-toggle { width: 24px; height: 24px; border-radius: 6px; background: rgba(255,255,255,0.03); display: grid; place-items: center; color: var(--text-muted); transition: all 0.2s; }
.op-item.open .op-toggle { transform: rotate(45deg); background: var(--primary); color: #fff; box-shadow: 0 0 10px var(--primary); }
.op-body { display: none; border-top: 1px solid var(--border); background: rgba(0,0,0,0.15); padding: 14px; }
.op-item.open .op-body { display: block; }
.parts-grid { display: grid; gap: 8px; }
.part-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 10px; background: rgba(255,255,255,0.02); border-radius: 8px; align-items: start; border: 1px solid rgba(255,255,255,0.03); }
.part-main { display: flex; flex-direction: column; gap: 2px; }
.part-name { font-size: 14px; font-weight: 600; color: #fff; }
.part-spec { font-size: 12px; color: var(--text-muted); font-style: italic; }
.part-meta { text-align: right; white-space: nowrap; }
.part-oem { display: inline-block; font-family: monospace; font-size: 12px; background: rgba(250, 204, 21, 0.1); color: var(--accent-yellow); padding: 2px 6px; border-radius: 4px; margin-bottom: 2px; border: 1px solid rgba(250, 204, 21, 0.2); }
.part-qty { display: block; font-size: 13px; color: var(--accent-cyan); font-weight: 600; }
.no-parts { color: var(--text-muted); font-style: italic; font-size: 13px; padding: 10px; text-align: center; }
.timeline-card { overflow: hidden; position: sticky; top: 90px; max-height: 70vh; overflow-y: auto; }
.sidebar-header { padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); background: rgba(0,0,0,0.2); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); }
.timeline-list { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.tl-item { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; background: rgba(0,0,0,0.2); cursor: pointer; transition: all 0.2s; }
.tl-item:hover { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.02); }
.tl-item.active { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.3); }
.tl-top { display: flex; justify-content: space-between; margin-bottom: 4px; align-items: center; }
.tl-km { font-weight: 700; font-size: 14px; }
.tl-date { font-size: 11px; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; }
.tl-preview { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.tl-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.03); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.05); }

.search-box { position: relative; margin-bottom: 30px; }
.search-input { padding: 20px 25px; background: rgba(15, 23, 42, 0.8); font-size: 18px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.search-input::placeholder { color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.result-card { overflow: hidden; display: none; animation: fadeInUp 0.5s ease-out; }
.result-header { background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), transparent); }
.code-title { font-weight: 800; font-size: 24px; color: var(--accent-red); text-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
.result-section { margin-bottom: 20px; }
.value { font-size: 15px; color: var(--text-main); line-height: 1.6; }
.btn-service { display: inline-block; margin-top: 10px; padding: 12px 20px; background: var(--primary); color: white; text-decoration: none; border-radius: 10px; font-weight: 600; font-size: 14px; transition: all 0.3s; }
.btn-service:hover { box-shadow: 0 0 15px var(--primary); }
.error-message, .empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.hints { margin-top: 40px; text-align: center; }
.hint-title { color: var(--text-muted); font-size: 14px; margin-bottom: 15px; }

.footer {
    background: rgba(0,0,0,0.8); padding: 60px 20px; text-align: center; margin-top: 80px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; backdrop-filter: blur(10px);
}
.footer a { color: #a5b4fc; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.footer a:hover { color: #fff; text-shadow: 0 0 5px var(--primary); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 12px; }

@media (max-width: 900px) {
    .main-wrapper { grid-template-columns: 1fr; padding: 20px 0 80px; }
    .sidebar { display: none; position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 70vh; z-index: 200; background: #0f172a; border-radius: 20px 20px 0 0; box-shadow: 0 -5px 30px rgba(0,0,0,0.5); overflow-y: auto; padding: 20px; top: auto; }
    .sidebar.open { display: block; animation: slideUp 0.3s ease; }
    .sheet-header, .sheet-footer { display: flex; }
    .sheet-footer { display: block; }
    .mobile-search-container { display: block !important; }
    .sidebar .filter-group.search-group { display: none !important; }
    .mobile-filter-btn { display: flex !important; }
    .content-area { padding: 0 15px; }
    .page-title { padding-top: 12px; }
    .controls-panel, .main-grid, .stats-row { grid-template-columns: 1fr; }
    .timeline-card { position: static; max-height: none; }
}
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(3, 7, 18, 0.95); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border); }
    .nav-links.open { display: flex; }
    .menu-btn { display: block; }
    .page-hero { min-height: 48vh; padding-top: 100px; }
    .section-title { font-size: 28px; }
}
@media (max-width: 600px) {
    .results-grid { grid-template-columns: 1fr; }
    .header-links { flex-direction: column; align-items: center; }
    .btn-main, .btn-ghost { width: 100%; }
}
