@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    background-color: #07130c;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Верхній тулбар */
.top-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #0f271c;
    border: 1px solid #1c4b36;
    color: #d1fae5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.top-icon-btn:hover {
    background: #1b4d37;
    color: #34d399;
    transform: translateY(-1px);
}
.top-icon-btn:active {
    transform: translateY(0);
}

.plant-action-btn {
    padding: 6px 10px;
    border-radius: 9px;
    background: #0f271c;
    border: 1px solid #1c4b36;
    font-size: 11px;
    font-weight: 700;
    color: #d1fae5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}
.plant-action-btn:hover {
    background: #194632;
    border-color: #34d399;
}

/* Бокові ярлики (Tabs) */
.side-tab-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #0d2218;
    border: 1px solid #1a4934;
    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: #163c2b;
    border-color: #34d399;
    transform: scale(1.05);
}
.side-tab-btn.active {
    background: #17422f;
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}
.side-tab-btn .tab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #10b981;
    color: #032011;
    font-size: 8px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    padding: 1px 4px;
    border-radius: 6px;
}

/* Висувні панелі (Drawers) */
.plant-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;
}
.plant-drawer.drawer-closed {
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
}

/* VIEWCUBE */
.viewcube-wrapper {
    width: 60px;
    height: 60px;
    perspective: 260px;
    cursor: pointer;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-15deg) rotateY(25deg);
    transition: transform 0.1s ease-out;
}

.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(14, 38, 27, 0.85);
    border: 1.5px solid #10b981;
    color: #ecfdf5;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: visible;
    transition: all 0.15s;
}
.face:hover {
    background: #10b981;
    color: #022c16;
}

.face.front  { transform: rotateY(0deg) translateZ(30px); }
.face.back   { transform: rotateY(180deg) translateZ(30px); }
.face.right  { transform: rotateY(90deg) translateZ(30px); }
.face.left   { transform: rotateY(-90deg) translateZ(30px); }
.face.top    { transform: rotateX(90deg) translateZ(30px); }
.face.bottom { transform: rotateX(-90deg) translateZ(30px); }

.cube-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6ee7b7;
    transition: all 0.15s;
}
.cube-btn:hover {
    background: #133927;
    color: #ffffff;
}

/* Картки систем та слайдери */
.plant-card {
    background: #0a1b12;
    border: 1px solid #17422f;
    border-radius: 12px;
    padding: 9px;
    transition: all 0.15s ease;
}
.plant-card:hover {
    border-color: #10b981;
    background: #0f2a1c;
}

.plant-slider {
    accent-color: #10b981;
    height: 5px;
    border-radius: 4px;
    background: #194632;
    outline: none;
}

/* Вертикальний слайдер ярусів */
.layer-peeler-bar {
    width: 38px;
    background: rgba(12, 33, 23, 0.92);
    border: 1px solid #1f543c;
    border-radius: 14px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7);
}

.vertical-range {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 6px;
    height: 160px;
    accent-color: #10b981;
    cursor: pointer;
}

/* Скролбар */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #07130c;
}
::-webkit-scrollbar-thumb {
    background: #163d2c;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #235d43;
}

@keyframes scaleUp {
    from { transform: scale(0.92); 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;
    }
}