*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f2027,#203a43,#2c5364);
    font-family: sans-serif;
}

.app{
    width: 360px;
    height: 640px;
    background: #0b0b0b;
    border-radius: 36px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
}

.bulb-wrap{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bulb{
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: #1a1a1a;
    position: relative;
    transition: background 0.5s, box-shadow 0.5s, opacity 0.5s;
    opacity: 0;
}

.bulb::after{
    content: "";
    position: absolute;
    width: 85px;
    height: 55px;
    background: #444;
    border-radius: 0 0 16px 16px;
    left: 50%;
    transform: translateX(-50%);
    bottom: -52px;
}

.status{
    color: #fff;
    margin-top: 20px;
    font-weight: bold;
}

.colors{
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.color-btn{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: 0.3s;
}

.color-btn.red{ background: #ff4d4d; }
.color-btn.green{ background: #4dff4d; }
.color-btn.blue{ background: #4d4dff; }
.color-btn.yellow{ background: #ffff4d; }

.color-btn:hover{
    transform: scale(1.1);
}

.main-controls{
    display: flex;
    justify-content: center;
}

.ctrl.power{
    background: #222;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: 0.3s;
}

.ctrl.power:hover{
    background: #444;
}

/* Keyframes for pulsing glow */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 30px var(--glow-color), 0 0 60px var(--glow-color), 0 0 90px var(--glow-color);
    }
    50% {
        box-shadow: 0 0 50px var(--glow-color), 0 0 100px var(--glow-color), 0 0 150px var(--glow-color);
    }
    100% {
        box-shadow: 0 0 30px var(--glow-color), 0 0 60px var(--glow-color), 0 0 90px var(--glow-color);
    }
}

/* Bulb colors */
.bulb.red {
    background: radial-gradient(circle, #fff 10%, #ff4d4d);
    --glow-color: #ff4d4d;
}

.bulb.green {
    background: radial-gradient(circle, #fff 10%, #4dff4d);
    --glow-color: #4dff4d;
}

.bulb.blue {
    background: radial-gradient(circle, #fff 10%, #4d4dff);
    --glow-color: #4d4dff;
}

.bulb.yellow {
    background: radial-gradient(circle, #fff 10%, #ffff4d);
    --glow-color: #ffff4d;
}

/* On class triggers fade-in and glow */
.bulb.on {
    opacity: 1;
    animation: pulseGlow 2s infinite;
}
