/* Main container */
.govee3-wrapper {
    position: relative;
    width: 800px;
    height: 600px;
    margin: 50px auto;
    perspective: 1200px;
    transform-style: preserve-3d;
    background: rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-radius: 10px;
}

/* Surface positioning */
.govee3-surface {
    position: absolute;
    transform-style: preserve-3d;
    transform-origin: center center;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.ceiling {
    transform: rotateX(60deg) rotateZ(-45deg) translateZ(100px);
    background: rgba(200, 200, 200, 0.1);
}

.left-wall {
    transform: rotateY(45deg) translateZ(100px);
    background: rgba(180, 180, 180, 0.1);
}

.back-wall {
    transform: rotateY(-45deg) translateX(-50%) translateZ(100px);
    background: rgba(160, 160, 160, 0.1);
}

/* Hexagon grid layout */
.hex-row {
    display: flex;
    margin-left: 25px;
    margin-bottom: -15px;
    position: relative;
}

.hex-row:nth-child(even) {
    margin-left: 55px;
}

/* Individual hexagon styling */
.hex-tile {
    width: 60px;
    height: 69.28px; /* height = width * 1.1547 */
    margin: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.hex-content {
    position: absolute;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.hex-tile:hover .hex-content {
    background: rgba(255, 255, 255, 0.3);
    transform: translateZ(5px);
}

.hex-tile.active .hex-content {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Color picker styling */
.hex-color-picker {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

/* Controls panel */
.govee3-controls {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    backdrop-filter: blur(5px);
    z-index: 100;
}

.govee3-reset {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    background: #ff4444;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.govee3-reset:hover {
    background: #ff6666;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.govee3-reset:active {
    transform: translateY(0);
    box-shadow: none;
}

#govee3-current-color {
    width: 50px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#govee3-current-color:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .govee3-wrapper {
        width: 600px;
        height: 450px;
    }
    
    .hex-tile {
        width: 45px;
        height: 51.96px;
    }
}

@media (max-width: 650px) {
    .govee3-wrapper {
        width: 400px;
        height: 300px;
    }
    
    .hex-tile {
        width: 30px;
        height: 34.64px;
    }
    
    .govee3-controls {
        flex-direction: column;
        align-items: center;
    }
}
