@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;
}

body {
    font-family: 'Inter', sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.top-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.top-icon-btn:hover {
    background: #334155;
    color: #22d3ee;
}

.cad-action-btn {
    padding: 6px 10px;
    border-radius: 9px;
    background: #1e293b;
    border: 1px solid #334155;
    font-size: 11px;
    font-weight: 700;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}
.cad-action-btn:hover {
    background: #334155;
}
.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.55);
}

.scram-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.scram-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.7);
}
.scram-btn:active {
    transform: scale(0.96);
}

.gizmo-mode-btn {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.15s;
}
.gizmo-mode-btn:hover {
    color: #38bdf8;
    background: #1e293b;
}
.gizmo-mode-btn.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}

.side-tab-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #162033;
    border: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
}
.side-tab-btn:hover {
    border-color: #38bdf8;
    transform: scale(1.05);
}
.side-tab-btn.active {
    background: #0f294a;
    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;
    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;
}

.catalog-card {
    background: #090e1a;
    border: 1px solid #1e293b;
    border-radius: 11px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    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: 8px;
    background: #131f38;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

/* VIEWCUBE */
.viewcube-wrapper {
    width: 56px;
    height: 56px;
    perspective: 250px;
    cursor: pointer;
}
.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-25deg) rotateY(40deg);
    transition: transform 0.1s ease-out;
}
.face {
    position: absolute;
    width: 56px;
    height: 56px;
    background: rgba(15, 23, 42, 0.9);
    border: 1.5px solid #0284c7;
    color: #f8fafc;
    font-size: 8px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: visible;
    transition: all 0.15s;
}
.face:hover { background: #0284c7; }
.face.front  { transform: rotateY(0deg) translateZ(28px); }
.face.back   { transform: rotateY(180deg) translateZ(28px); }
.face.right  { transform: rotateY(90deg) translateZ(28px); }
.face.left   { transform: rotateY(-90deg) translateZ(28px); }
.face.top    { transform: rotateX(90deg) translateZ(28px); }
.face.bottom { transform: rotateX(-90deg) translateZ(28px); }

.cube-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #94a3b8;
    transition: all 0.15s;
}
.cube-btn:hover { background: #1e293b; color: #38bdf8; }

.cad-slider {
    accent-color: #06b6d4;
    height: 5px;
    border-radius: 4px;
    background: #334155;
    outline: none;
}

.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: #090e1a; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }

.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-checkbox {
    accent-color: #06b6d4;
    width: 15px;
    height: 15px;
    cursor: pointer;
}