*
{
    font-family: 'Open Sans', sans-serif;
}
.container
{
    width: 800px;
    height: 540px;
    position: relative;
    margin: 0 auto;
}
h1, h2
{
    text-align: center;
}
h2
{
    width: 100%;
    position: absolute;
    bottom: 0;
}
input[type='checkbox']
{
    --i: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 50px;
    height:100px;
    left: calc(var(--i) * 130px + 50px);
    top: 330px;
    border: 2px solid;
    background: #a30a0a;
    position: absolute;
    cursor: pointer;
    pointer-events: auto !important;
}
input[type='checkbox']:after
{
    content: 'OFF';
    position: absolute;
    height: 25px;
    line-height: 21px;
    background: #a5a5a5;
    border: solid 2px;
    box-sizing: border-box;
    bottom: 10px;
    left: -2px;
    width: 50px;
    text-align: center;
    color: #404040;
    font-weight: bold;
}
input[type='checkbox']:checked:after
{
    content: 'ON';
    bottom: 65px;
}
input[type='checkbox']:checked
{
    background: #076307;
}

input[type='checkbox'] ~ label
{
    pointer-events: none;
}

#switch1{--i: 0}
#switch2{--i: 1}
#switch3{--i: 2}
#switch4{--i: 3}
#switch5{--i: 4}
#switch6{--i: 5}

#switch1 ~ label[for='switch1']
{
    --switch1: 0;
}

#switch1:checked ~ label[for='switch1']
{
    --switch1: 1;
}

#switch2 ~ label[for='switch2']
{
    --switch2: 0;
}
#switch2:checked ~ label[for='switch2']
{
    --switch2: 1;
}

#switch3 ~ label
{
    --switch3: 0;
}
#switch3:checked ~ label
{
    --switch3: 1;
}

#switch4 ~ label
{
    --switch4: 0;
}
#switch4:checked ~ label
{
    --switch4: 1;
}

#switch5 ~ label
{
    --switch5: 0;
}
#switch5:checked ~ label
{
    --switch5: 1;
}

#switch6 ~ label
{
    --switch6: 0;
}
#switch6:checked  ~ label
{
    --switch6: 1;
}


.lamp
{
    --j: 0;
    filter: drop-shadow(20px 20px 5px rgba(0, 0, 0, 0.4));
    position: absolute;
    transform: scale(.7) translateX(-75px);
    left: calc(var(--j) * 130px + 24px);
    top: 70px;
}

.bulb
{
    --val: 0%;
    position: absolute;
    width: 120px;
    height: 190px;
    background: radial-gradient(transparent 50%, gray), linear-gradient(transparent 50%, yellow 50%);
    background-size: 140px 210px, 100% 200%;
    background-position: -10px -15px, 0 var(--val);
    border-radius: 50%;
    left: 90px;
    top: 40px;
    border: 1px solid rgba(173, 173, 173, 0.56);
    box-sizing: border-box;
}

.bottom
{
    position: absolute;
    width: 80px;
    height: 60px;
    background-color: lightslategray;
    background-image: linear-gradient(transparent 90%, black 90%, black),linear-gradient(5deg, transparent 46%, gray 46%, gray 54% ,transparent 54%),  linear-gradient(90deg, gray, #DDD, #EEE);
    background-size: 100% 100%, 100% 20%, 100% 100%;
    left: 110px;
    top: 210px;
    clip-path: polygon(0 0, 10% 10%, 10% 80%, 50% 100%, 90% 80%, 90% 10%, 100% 0);
}

#lamp1 {--j: 0;}
#lamp2 {--j: 1;}
#lamp3 {--j: 2;}
#lamp4 {--j: 3;}
#lamp5 {--j: 4;}
#lamp6 {--j: 5;}

#lamp1 .bulb
{
    --val: calc((var(--switch2) + var(--switch3) + var(--switch5) + var(--switch6)) * 100%);
}
#lamp2 .bulb
{
    --val: calc((var(--switch2) + var(--switch4)) * 100%);
}
#lamp3 .bulb
{
    --val: calc((var(--switch1) + var(--switch3) + var(--switch4) + var(--switch5)) * 100%);
}
#lamp4 .bulb
{
    --val: calc((var(--switch4) + var(--switch5)) * 100%);
}
#lamp5 .bulb
{
    --val: calc((var(--switch1) + var(--switch3) + var(--switch4) + var(--switch6)) * 100%);
}
#lamp6 .bulb
{
    --val: calc((var(--switch1) + var(--switch5)) * 100%);
}

#reward:before
{
    content: 'Congratulations!';
    font-weight: bold;
    position: absolute;
    width: 100%;
    font-size: 20px;
    line-height: 30px;
    top: 280px;
    left: 0;
    text-align: center;
    animation: reward 1s linear infinite, content .6s linear infinite;
    text-shadow: black 1px 1px;
}
@keyframes reward {
    0%{color: red;}
    20%{color: #fffb00;}
    40%{color: #00ff55;}
    60%{color: #00b7ff;}
    80%{color: #8000ff;}
    100%{color: red;}
}
@keyframes content {
    0%{content: '✨ Congratulations! ✨';}
    20%{content: '😎 Congratulations! 😎';}
    40%{content: '👍 Congratulations! 👍';}
    60%{content: '✔ Congratulations! ✔';}
    80%{content: '🙌 Congratulations! 🙌';}
    100%{content: '👌 Congratulations! 👌';}
}
#reward:after
{
    content: '';
    position: absolute;
    width: 100%;
    height: 30px;
    top: 280px;
    left: 0;
    text-align: center;
    background: white;
    background: linear-gradient();
    --val: calc(((var(--switch2) + var(--switch5) + var(--switch6)) * 30px) - ((var(--switch1) + var(--switch3) + var(--switch4)) * 30px) - 90px);
    background: linear-gradient(transparent 30px, white 30px, white 180px, transparent 180px);
    background-size: 100% 210px;
    background-position: 0 var(--val);
}


