/* ||   CSS IMPORTS || */

@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+15&display=swap');


/* ||   RESET || */

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

html, body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

ul {
    list-style-type: none;
}

img {
    display: none;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
}


/* ||   VARIABLES || */

:root {
    --MAIN-CANVAS-COLOR: rgb(0, 162, 255);
    --TEXT-CANVAS-COLOR: rgb(255, 204, 0);
    --LOADING-BAR-COLOR: rgb(5, 165, 165);
    --LINK-HOVER-COLOR: rgb(70, 161, 170);

    --LOADING-BAR-SIZE: 10px;
    --LOADING-BAR-PROGRESS-NUM: 0%;

    --HIND-SILIGURI: "Hind Siliguri", sans-serif;
    --PIXELIFY-SANS: "Pixelify Sans", sans-serif;
    --JERSEY-15: "Jersey 15", sans-serif;

    --text-area-height: 200px;
    --control-square-width-and-height: 250px;
}


/* ||   ANIMATIONS || */

@keyframes jiggle1 {
    0%   { transform: translateX(0); }
    10%  { transform: translateX(4px); }
    20%  { transform: translateX(-4px); }
    30%  { transform: translateX(4px); }
    40%  { transform: translateX(-4px); }
    50%  { transform: translateX(4px); }
    60%  { transform: translateX(-4px); }
    70%  { transform: translateX(4px); }
    80%  { transform: translateX(-4px); }
    90%  { transform: translateX(4px); }
}


/* ||   MAIN LAYOUT || */

#mainCanvas {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vh;
    height: 100vh;
    border: 3px solid black;
    background-color: var(--MAIN-CANVAS-COLOR);
    transform: translateX(-50%);
}

.textArea {
    position: absolute;
    top: 0;
    left: calc(50% + 50vh);
    right: 0;
    width: auto;
    min-width: 180px;
    height: var(--text-area-height);
    border: none;
    background-color: var(--TEXT-CANVAS-COLOR);
    box-sizing: border-box;
}

#sideColumn {
    position: absolute;
    left: calc(50% + 50vh);
    right: 0;
    top: var(--text-area-height, 200px);
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.restartPanel {
    border: 3px solid black;
    background-color: black;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
}

.restartButton {
    font-family: var(--PIXELIFY-SANS);
    font-size: 1.6rem;
    font-weight: 600;
    padding: 1rem;
    background-color: white;
    border: 4px solid black;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    color: black;
}

.restartButton:hover {
    background-color: var(--LINK-HOVER-COLOR);
    color: white;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 4px 0 black;
    border-radius: 12px;
}

.restartButton:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 1px 0 black inset;
    background-color: rgb(40, 120, 130);
}

.restartButton:focus {
    outline: none;
    animation: jiggle1 0.6s ease-in-out;
}


.attributionArea {
    font-family: var(--HIND-SILIGURI);
    border-top: 3px solid black;
    border-bottom: 3px solid black;
    background-color: var(--TEXT-CANVAS-COLOR);
    padding: 0.4rem 0.4rem 0.6rem 0.4rem;
    box-sizing: border-box;
    width: 100%;
    overflow-y: auto;
    flex: 0 0 auto;
    max-height: calc(100vh - var(--text-area-height) - 3px - 4.55rem);
}

.attributionArea::-webkit-scrollbar {
    width: 10px;
}

.attributionArea::-webkit-scrollbar-track {
    background: var(--TEXT-CANVAS-COLOR);
}

.attributionArea::-webkit-scrollbar-thumb {
    background-color: #000;
    border: 2px solid var(--TEXT-CANVAS-COLOR);
    border-radius: 5px;
}

.attributionArea > ul {
    padding-left: 1rem;
    margin: 0;
}

.attributionArea li {
    margin-bottom: 0.4rem;
}

.attributionArea li h2 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.attributionArea li ul {
    padding-left: 1.2rem;
    margin: 0;
}

.attributionArea li ul li {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.attributionArea li a {
    text-decoration: underline;
    color: inherit;
    transition: color 0.3s ease, transform 0.3s ease;
}

.attributionArea li a:hover {
    color: var(--LINK-HOVER-COLOR);
    transform: scale(1.05);
    text-decoration: underline;
}

.attributionArea > ul > li:not(:last-child) {
    border-bottom: 1px dashed black;
    padding-bottom: 0.3rem;
    margin-bottom: 0.3rem;
}

.counters {
    font-family: var(--PIXELIFY-SANS);
    font-size: 2.7em;
    margin-left: 1rem;
}

.loadingScreen {
    margin-top: 30vh;
}

.loadingBar {
    margin: auto;
    border: 5px solid black;
    border-radius: 20px;
    width: 42%;
    padding: 0.55%;
}

.loadingProgressBar {
    background-color: var(--LOADING-BAR-COLOR);
    color: var(--LOADING-BAR-COLOR);
    font-size: var(--LOADING-BAR-SIZE);
    padding: 1.3%;
    border-radius: 20px;
    width: var(--LOADING-BAR-PROGRESS-NUM);
}

.loadingPercentageCounter {
    margin: 1% auto 0;
    text-align: center;
    font-family: var(--PIXELIFY-SANS);
    font-size: 56px;
    font-weight: 500;
}

.controls {
    opacity: 0.8;
    position: absolute;
    top: 0;
    left: 0;
    margin-left: 2vw;
    margin-top: 2vw;
    width: var(--control-square-width-and-height);
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    background-color: rgb(200, 200, 200);
    z-index: 10;
}

/* ||   UTILITY CLASSES || */

.displaynone {
    display: none !important;
}

.displayblock {
    display: block;
}

.jiggle1 {
    animation: jiggle1 0.8s ease-in-out infinite;
}