@charset "UTF-8";

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow: visible;
    background: #0d0d11;
}

/* Контент поверх канваса */
#FlexGrid1 {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    min-height: 100vh;
}

/* Канвас как фон на всю страницу */
#container_div {
    position: fixed;  /* fixed чтобы не двигался при прокрутке */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: transparent;
}

#canvas_div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: none;
    background: transparent;
}

/* Кнопка поверх всего */
.toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(20, 20, 28, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, background 0.2s ease;
    pointer-events: auto;
}

.toggle-btn:hover {
    transform: scale(1.08);
    background: rgba(30, 30, 42, 0.95);
}

.toggle-btn svg {
    width: 22px !important;
    height: 22px !important;
    fill: currentColor;
    transition: transform 0.3s ease;
    display: block;
}

.toggle-btn.active svg {
    transform: rotate(90deg);
}

/* Панель поверх всего */
.controls {
    position: fixed;
    bottom: 75px;
    right: 20px;
    background: rgba(20, 20, 28, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 12px;
    color: #ececec;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    user-select: none;
    width: 240px;
    pointer-events: auto;
    
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.controls.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.controls h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8a99ad;
}

.control-group {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group input[type="range"] {
    width: 100%;
    accent-color: #007aff;
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
}

.radio-group input[type="radio"] {
    accent-color: #007aff;
    cursor: pointer;
    margin: 0;
}

.val-badge {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}