* {
    margin: 0;
    padding: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    width: 100%;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
}

/************* Layout ************/

.header {
    position: relative;
    width: 100%;
    border-bottom: 1px solid #aaa;
}

#burger-menu {
    position: absolute;
    top: .5em;
    right: 1em;
    font-size: 1.5em;
}

#burger-menu i {
    color: black;
}

#connected {
    position: absolute;
    top: .5em;
    left: 1em;
    font-size: 1.5em;
}

#connNo {
    color: red;
}

#connYes {
    color: green;
}

.info {
    width: 70%;
    margin: 0 auto;
    padding: 1em;
    text-align: center;
    border-bottom: 1px solid #aaa;
}

#connStatus {
    color: green;
}

#connStatus.disconnected {
    color: red;
}

.shareURL {
    padding: 0 0.5em;
}

.state {
    padding: 1em 1em;
    text-align: center;
}

.game {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game {
    width: 100%;
    max-width: 500px;
    height: 100vw;
    max-height: 500px;
    /* border: 3px solid #aaa; */
    margin: 10px auto;
}

.side-bar {
    position: absolute;
    right: 0;
    width: 250px;
    padding: 1em 1.5em 2em 1.5em;
    background-color: #fafafa;
}

.description {
    padding: 0 1.2em;
}


/************* General Style ************/

.hidden {
    display: none !important;
}

.buttons {
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    margin: 0 auto;
}

.btn {
    font-size: 1.2em;
    padding: .6em .7em;
    margin: 1em .6em;
    background-color: #fafafa;
    border: 2px solid #aaa;
    border-radius: 5px;
}

.btn.pushed {
    background-color: #cccccc;
}

.btn.disabled {
    color: #aaa;
    border: 2px solid #cccccc;
}

a.btn {
    text-decoration: none;
}

.center {
    text-align: center;
}

h1,
h2,
h3 {
    text-align: center;
    margin: 1em;
}

h2 {
    margin-bottom: 2em;
}

ul {
    list-style: none;
    margin-bottom: 1em;
}

.input-field {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 1em;
}

input.number {
    padding: .3em;
    width: 50px;
}

input.checkbox {
    margin: 0 1em 1em 0;
}

select {
    padding: .2em;
    font-size: 16px;
}

/************* SVG ************/

.label {
    text-anchor: middle;
    dominant-baseline: central;
    font-size: x-small;
    user-select: none;
}

/* Control classes */

.covered .label {
    visibility: hidden;
}

.covered circle {
    fill: skyblue;
}

.solved .label {
    visibility: hidden;
}

.bulb {
    fill: rgb(135, 218, 235);
    stroke: white;
}

.unsolved circle {
    fill: white;
    stroke: #aaa;
}

.engaged polygon {
    fill: orange;
    transform: translate(0, -5px);
}

.unlocked polygon {
    stroke: skyblue;
}

/* Cover */

.cover-clone1 {
    transform: rotate(60deg);
    animation: rot60 0.5s;
}

.cover-clone2 {
    transform: rotate(120deg);
    animation: rot120 0.5s;
}

.cover-clone3 {
    transform: rotate(180deg);
    animation: rot180 0.5s;
}

.cover-clone4 {
    transform: rotate(240deg);
    animation: rot240 0.5s;

}

.cover-clone5 {
    transform: rotate(300deg);
    animation: rot300 0.5s;
}

/* Cover Animation */

@keyframes rot60 {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(60deg);
    }
}

@keyframes rot120 {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(120deg);
    }
}

@keyframes rot180 {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(180deg);
    }
}

@keyframes rot240 {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(240deg);
    }
}

@keyframes rot300 {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(300deg);
    }
}

/* Wave */

#wave {
    opacity: 0;
}

.wave {
    animation: waving 1.5s;
}

/* Wave animation */

@keyframes waving {
    from {
        transform: scale(0);
        opacity: 1;
    }

    40% {
        transform: scale(2);
        opacity: 0.3;
    }

    to {
        transform: scale(0);
        opacity: 0.1;
    }
}

/* Template elements */

#bulb_template {
    display: none;
}

#knob_template {
    display: none;
}

/* Animation */

.scramble {
    animation: scramble 1.4s cubic-bezier(0.9, 0, 0.1, 1.0);
}

@keyframes scramble {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(1800deg);
    }
}

/************* Dialog ************/

#popupOverlay {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100vh;
    background: #FFF;
    opacity: .5;
    z-index: 10;
}

#popupBox {
    position: fixed;
    top: 30%;
    left: calc(50% - 150px);
    background: #eee;
    border-radius: 7px;
    border: 2px solid skyblue;
    width: 300px;
    padding: 1em;
    z-index: 10;
}

/************* Responsivity ************/

@media screen and (min-width:600px) {
    #burger-menu {
        font-size: 2em;
    }
}

@media screen and (min-width: 800px) {
    body {
        max-width: 700px;
    }

    .info {
        padding: 1em 5em;
    }
}

@media screen and (min-width: 1200px) {
    .side-bar {
        right: -250px;
    }
}

@media screen and (min-width:1800px) {
    body {
        max-width: 900px;
    }
}
