:root {
    --bg-dark: #252525; /* Темно-серый фон для стола */
    --panel-bg: rgba(255, 255, 255, 0.95);
    --primary: #ff8fab;
    --accent: #fb6f92;
    --text: #333;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    touch-action: none; /* Блокируем стандартные жесты браузера */
}

#stage-parent {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    /* Небольшой паттерн на фоне */
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Общие стили для панелей */
.ui-panel {
    position: absolute;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    padding: 8px;
    display: flex;
    gap: 8px;
    z-index: 100;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Нижняя панель (Инструменты) */
#toolbar {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    /* Адаптация под мобилки */
    width: auto;
    max-width: 95%;
    justify-content: center;
    flex-wrap: wrap;
}

/* Верхняя панель (Слои) */
#top-bar {
    top: 20px;
    right: 20px;
    flex-direction: column;
    align-items: flex-end;
}

/* Кнопки */
.btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: #f4f4f4;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn:active {
    transform: scale(0.92);
}

.btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 143, 171, 0.5);
    transform: translateY(-2px);
}

/* Элемент слоя */
.layer-item {
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 4px;
    border: 1px solid #eee;
    width: 110px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.layer-item:hover {
    background: #f9f9f9;
}

.layer-item.active {
    border: 2px solid var(--primary);
    background: #fff0f5;
    font-weight: bold;
}

/* Модалка приветствия */
#welcome-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: white;
    padding: 25px;
    border-radius: 24px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

h2 {
    margin-top: 0;
    color: var(--accent);
}
