/* Room Grid */
.room-grid {
    background-color: #1a1a1a;
    background-image: linear-gradient(#333 1px, transparent 1px), linear-gradient(90deg, #333 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Sound Nodes */
.sound-node {
    transition: transform 0.1s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
    touch-action: pan-x;
    cursor: grab;
    position: absolute;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 50%;
    user-select: none;
}

.sound-node.active {
    touch-action: none;
}

.sound-node:active {
    cursor: grabbing;
    scale: 1.1;
    z-index: 100;
}

/* Active State (In Room) */
.sound-node.active {
    box-shadow: 0 0 25px currentColor;
}

/* Inactive State (In Dock) */
.sound-node.docked {
    position: relative;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    box-shadow: none;
    opacity: 0.7;
    filter: grayscale(0.5);
}

.sound-node.docked:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: translateY(-5px) !important;
}

/* Pulse Animation for Active Nodes */
@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.sound-node.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s infinite;
    z-index: -1;
    pointer-events: none;
}

/* Dock Styling */
#dock {
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
}

@media (max-width: 768px) {
    #dock {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        background-color: transparent !important;
        backdrop-filter: none !important;
        border: none !important;
        padding: 0.5rem !important;
        max-height: none;
    }
    #dock::-webkit-scrollbar {
        height: 4px;
    }
    #dock::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
}

.dock-slot {
    width: 60px;
    height: 60px;
    border: 2px dashed #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}