@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    background-color: #070b14;
    touch-action: none;
}

code, pre, .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.builder-card {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(11, 17, 30, 0.98));
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
}

canvas#circuitBoard {
    cursor: default;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: block;
    width: 100%;
    height: 100%;
}

.tool-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Плаваючі круглі кнопки дій (FAB) на полотні для планшетів/смартфонів */
.fab-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-btn:hover {
    transform: scale(1.08);
}

.fab-btn:active {
    transform: scale(0.94);
}

/* Scratch стилі та блоки для дітей */
.scratch-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.scratch-btn:hover {
    transform: translateX(4px);
}
.scratch-btn:active {
    transform: scale(0.97);
}

.scratch-block {
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.scratch-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

input[type=range] {
    accent-color: #0d9488;
    height: 6px;
    border-radius: 4px;
    background: #334155;
}

/* Кастомний темний скролбар */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0b111e;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

aside::-webkit-scrollbar {
    width: 5px;
}
aside::-webkit-scrollbar-track {
    background: rgba(11, 17, 30, 0.5);
}
aside::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

@keyframes bounceShort {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-bounce-short {
    animation: bounceShort 0.6s ease-in-out;
}