@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;
    background-color: #050b14;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Верхній тулбар */
.top-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #0d1d30;
    border: 1px solid #1b3d61;
    color: #dbeafe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    cursor: pointer;
}
.top-icon-btn:hover {
    background: #163354;
    color: #22d3ee;
    transform: translateY(-1px);
}
.top-icon-btn:active {
    transform: translateY(0);
}

.mol-action-btn {
    padding: 6px 10px;
    border-radius: 9px;
    background: #0d1d30;
    border: 1px solid #1b3d61;
    font-size: 11px;
    font-weight: 700;
    color: #dbeafe;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
}
.mol-action-btn:hover {
    background: #153150;
    border-color: #22d3ee;
}

/* Бокові ярлики */
.side-tab-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #0b1929;
    border: 1px solid #173657;
    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: #132c47;
    border-color: #22d3ee;
    transform: scale(1.05);
}
.side-tab-btn.active {
    background: #143352;
    border-color: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
}
.side-tab-btn .tab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #22d3ee;
    color: #031524;
    font-size: 8px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    padding: 1px 4px;
    border-radius: 6px;
}

/* Висувні панелі */
.bio-drawer {
    position: absolute;
    right: 48px;
    top: 0;
    bottom: 0;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
    transform: translateX(0);
    opacity: 1;
}
.bio-drawer.drawer-closed {
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
}

/* 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(25deg);
    transition: transform 0.08s ease-out;
}

.face {
    position: absolute;
    width: 56px;
    height: 56px;
    background: rgba(11, 25, 41, 0.88);
    border: 1.5px solid #22d3ee;
    color: #e0f2fe;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: visible;
    transition: background 0.15s, color 0.15s;
}
.face:hover {
    background: #22d3ee;
    color: #041421;
}

.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: 7px;
    color: #7dd3fc;
    transition: all 0.15s;
    cursor: pointer;
}
.cube-btn:hover {
    background: #143252;
    color: #ffffff;
}

/* Картки */
.mol-card {
    background: #0a1726;
    border: 1px solid #163352;
    border-radius: 12px;
    padding: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
}
.mol-card:hover {
    border-color: #38bdf8;
    background: #0e2036;
}
.mol-card.active {
    border-color: #22d3ee;
    background: #0e263d;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.22);
}

.part-chip {
    background: #0a1726;
    border: 1px solid #163352;
    border-radius: 10px;
    padding: 8px 10px;
    transition: all 0.15s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.part-chip:hover {
    border-color: #34d399;
    background: #0f2238;
}
.part-chip.active {
    border-color: #22d3ee;
    background: #112a45;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.25);
}

.bio-slider {
    accent-color: #22d3ee;
    height: 5px;
    border-radius: 4px;
    background: #142f4d;
    outline: none;
    cursor: pointer;
}

/* Скролбар */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #050b14;
}
::-webkit-scrollbar-thumb {
    background: #163352;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #245382;
}

@keyframes scaleUp {
    from { transform: scale(0.93); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.animate-scale-up {
    animation: scaleUp 0.18s ease-out forwards;
}

@supports (height: 100dvh) {
    body {
        height: 100dvh !important;
    }
}

@media (pointer: coarse), (hover: none) {
    .mouse-hints {
        display: none !important;
    }
}