@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700;800&display=swap');

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.top-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #1f2937;
    border: 1px solid #374151;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    cursor: pointer;
}
.top-icon-btn:hover {
    background: #374151;
    color: #38bdf8;
    transform: translateY(-1px);
}

.cad-action-btn {
    padding: 6px 10px;
    border-radius: 9px;
    background: #1f2937;
    border: 1px solid #374151;
    font-size: 11px;
    font-weight: 700;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
}
.cad-action-btn:hover {
    filter: brightness(1.15);
}
.cad-action-btn.tool-active {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.hud-circle-btn {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #1f2937;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    cursor: pointer;
}
.hud-circle-btn:hover {
    background: #374151;
    color: #38bdf8;
}

.quick-tool-btn {
    padding: 5px 8px;
    border-radius: 7px;
    background: #1e293b;
    color: #f1f5f9;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.15s ease;
    cursor: pointer;
    border: 1px solid #334155;
}
.quick-tool-btn:hover {
    background: #334155;
    border-color: #38bdf8;
    color: #38bdf8;
}

.side-tab-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #192233;
    border: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.side-tab-btn:hover {
    background: #223049;
    border-color: #38bdf8;
    transform: scale(1.05);
}
.side-tab-btn.active {
    background: #0f2744;
    border-color: #0284c7;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.45);
}
.side-tab-btn .tab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #0284c7;
    color: #ffffff;
    font-size: 8px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    padding: 1px 4px;
    border-radius: 6px;
}

.cad-drawer {
    position: absolute;
    right: 48px;
    top: 0;
    bottom: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform: translateX(0);
    opacity: 1;
}
.cad-drawer.drawer-closed {
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
}

.cat-filter-btn {
    padding: 5px 4px;
    border-radius: 8px;
    color: #94a3b8;
    transition: all 0.15s;
    cursor: pointer;
}
.cat-filter-btn:hover {
    color: #f8fafc;
}
.cat-filter-btn.active {
    background: #0c4a6e;
    color: #38bdf8;
}

.catalog-card {
    background: #0b0f19;
    border: 1px solid #1e293b;
    border-radius: 11px;
    padding: 9px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.catalog-card:hover {
    background: #172033;
    border-color: #0284c7;
    transform: translateY(-2px);
}
.catalog-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #131f38;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.wire-style-btn {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 7px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #94a3b8;
    transition: all 0.15s;
    cursor: pointer;
}
.wire-style-btn:hover {
    background: #1e293b;
    color: #38bdf8;
}
.wire-style-btn.active {
    background: #0c4a6e;
    border-color: #0284c7;
    color: #38bdf8;
}

.mission-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.mission-card:hover {
    background: #172236;
    border-color: #38bdf8;
    transform: translateY(-1px);
}
.mission-card.active {
    border-color: #f59e0b;
    background: #1e1b18;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}
.mission-card.completed {
    border-color: #10b981;
}

.cad-preset-btn {
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    background: #090e1a;
    border: 1px solid #1e293b;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.cad-preset-btn:hover {
    border-color: #38bdf8;
    color: #ffffff;
}
.cad-preset-btn.active {
    background: #0c4a6e;
    border-color: #0284c7;
    color: #38bdf8;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.35);
}

.cad-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 9px;
    background: #090e1a;
    border: 1px solid #1e293b;
    font-size: 11px;
    color: #cbd5e1;
    cursor: pointer;
    transition: border-color 0.15s;
}
.cad-toggle-row:hover {
    border-color: #334155;
}

.cad-slider {
    accent-color: #0284c7;
    height: 5px;
    border-radius: 4px;
    background: #334155;
    outline: none;
}

.cad-checkbox {
    accent-color: #06b6d4;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #0b0f19; }
::-webkit-scrollbar-thumb { background: #1f2937; border-radius: 3px; }