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

/* make dynamic colors in JS */
:root {
    /* hsl color format */
    --hue: 200;
    --saturation: 50%;
    --foreground-color: hsla(var(--hue), var(--saturation), 75%);
    --background-color: hsla(var(--hue), var(--saturation), 20%)
}

body {
    margin: 0;
    background-color: var(--background-color);
    /* keep ball on screen - no scroll bar*/
    overflow: hidden;
}

/* for both paddles */
.paddle {
    /* set is JS - can modify there */
    --position: 50;

    position: absolute;
    /* background-color: white; */
    background-color: var(--foreground-color);
    /* down 50% transform - takes objects size into consideration */
    /* css or = top: 50vh; */
    top: calc(var(--position) * 1vh);
    transform: translateY(-50%);
    /* vh - height is 10x width to look better on all screen sizes */
    width: 1vh;
    height: 10vh;
}

.paddle.left {
  left: 1vw;
}

.paddle.right {
    right: 1vw;
}

.ball {
    /* set is JS - can modify there */
    --x: 50;
    --y: 50;

    position: absolute;
    background-color: var(--foreground-color);
    /* (x,y) because ball will move */
    left: calc(var(--x) * 1vw);
    top: calc(var(--y) * 1vh);
    /* circle the square */
    border-radius: 50%;
    /* dead center of the screen */
    transform: translate(-50%,-50%);
    /* perfect circle */
    width: 2.5vh;
    height: 2.5vh;
}

.score {
    display: flex;
    justify-content: center;
    font-weight: bold;
    font-size: 7vh;
    color: var(--foreground-color);
}

.score > * {
    /* each score takes up half the screen */
    flex-grow: 1;
    flex-basis: 0;
    /* add spacing */
    /* L n R */
    padding: 0 2vh;
    /* U n D */
    margin: 1vh 0;
    /* dim the score */
    opacity: .5;
}

.score > :first-child {
    /* bring the first score back to the center */
    text-align: right;
    /* insert line btwn score */
    border-right: .5vh solid var(--foreground-color);
}