html {
    --radius: 380;
    --spacing: 50;
    --tick-width: 10;
    --tick-length: 30;
    --fives-length: 60;
    --minute-hand-width: 10;
    --minute-hand-length: 350;
    --hour-hand-width: 10;
    --hour-hand-length: 220;
    --duration: 20;
    --hide-text: 0;
    --relative: 1;
    --area-opacity: 50;
    --ringtone: ringtones/A-Tone.mp3
}

html,
body {
    margin: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: Arial;
    user-select: none;
    -webkit-user-select: none;
}

html.hasTouch .no-touch,
html:not(.hasTouch) .touch
{
    display: none
}

svg {
    height: 100%;
    width: 100%;
    transform: rotate(-90deg) scale(1, -1);
    user-select: none;
    -webkit-user-select: none;
    fill: transparent;
}

#background {
    fill: rgba(255,255,255,.5);
}

circle {
    fill: transparent;
}

.tick {
    cx: 50%;
    cy: 50%;
}

#fives {
    stroke: black;
    r: calc(var(--radius) + var(--fives-length));
    stroke-width: var(--fives-length);
    stroke-dasharray: var(--tick-width),
        calc((var(--radius) + var(--fives-length)) * 2 * 3.141592653589793 / 12 - var(--tick-width));
}

#ones {
    stroke: black;
    r: calc(var(--radius) + var(--tick-length));
    stroke-width: var(--tick-length);
    stroke-dasharray: var(--tick-width),
        calc((var(--radius) + var(--tick-length)) * 2 * 3.141592653589793 / 60 - var(--tick-width));
}

.area {
    cx: 50%;
    cy: 50%;
    transform-origin: center center;
    r: calc((var(--radius) + var(--spacing)) / 2);
    stroke-width: calc(var(--radius) - var(--spacing));
    opacity: var(--area-opacity);
}

#red {
    fill: transparent;
    stroke: rgba(255,0,0,1);
}
#green {
    fill: transparent;
    stroke: rgba(0,128,0,1);
}

.hand {
    fill: black;
    transform-origin: center center;
}

#minute {
    width: var(--minute-hand-length);
    height: var(--minute-hand-width);
    x: calc(var(--minute-hand-width) * -2 + 50%);
    y: calc(var(--minute-hand-width) / -2 + 50%);
}

#hour {
    width: var(--hour-hand-length);
    height: var(--hour-hand-width);
    x: calc(var(--hour-hand-width) * -2 + 50%);
    y: calc(var(--hour-hand-width) / -2 + 50%);
}

#goGitHub {
    position: absolute;
    right: 5px;
    bottom: 5px;
    text-decoration: none;
    color: black;
}

.info,
#currentTime {
    position: fixed;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}

.info {
    text-align: center;
    font-size: 3vmin;
    color: grey;
    text-shadow: 0 0 5px white;
    top: 66%;
    margin-top: .5em;
    z-index: 1;
}

#currentTime {
    font-size: 5vmin;
    bottom: 10px;
    left: 10px;
}

@media (max-width: 400px),
(max-height: 400px) {
    .info,
    #goGitHub,
    #currentTime {
        display: none;
    }
}

html[style^="--hide-text: 1"] .info,
html[style^="--hide-text: 1"] #goGitHub,
html[style^="--hide-text: 1"] #currentTime
{
    display: none;
}

#show-settings {
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 40px;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 0.95;
    transition: .3s all;
}

#show-settings:hover {
    background: #dddddd;
}

#show-settings:active {
    background: #bbbbbb;
}

.popup.open {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 2;
}

.popup form {
    position: relative;
    width: 800px;
    max-width: 100%;
    box-sizing: border-box;
    margin: 2em auto;
    background: white;
    min-height: 80%;
    padding: 20px;
}

.popup .close {
    font-size: 28px;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 8px;
}

.popup .close:hover {
    background: lightgrey;
}

fieldset {
    margin: .5em;
}

label {
    display: block;
    line-height: 2em;
}

input, select {
    font-size: 16px;
    padding: 3px;
    margin-top: 3px;
    left: 180px;
    position: absolute;
}

input {
    width: 70px;
}

select {
    width: 80px;
}

.numeric {
    text-align: right;
}

button {
    padding: 7px 15px;
    background: white;
    border: 2px solid #777;
    border-radius: 5px;
}
