:root {
    --primary-dark: #0a0b39;
    --primary-light: #fafdfe;
    --accent-gold: #fede62;
    --accent-green: #2acb7d;
    --accent-red-dark: #fd5655;
    --accent-red-hover: #fd6f6e;
    --text-dark: #2e0000;
    --text-gray: #777777;
    --shadow-color: #00000033;
    --white: #ffffff
}

@font-face {
    font-family: 'ari';
    src: url(./assets/ari_w9500/ari-w9500.ttf);
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'ari';
    src: url(./assets/ari_w9500/ari-w9500-bold.ttf);
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'ari';
    src: url(./assets/ari_w9500/ari-w9500-display.ttf);
    font-weight: 900;
    font-style: normal;
}

html {
    font-family: ari;
    font-size: 62.5%; 
    font-weight: 100;
    letter-spacing: 0.2rem;
    box-sizing: border-box;
}

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

body {
    text-align: center;
    margin: 0;
    min-width: 100vw;
    min-height: 100vh;
}

@keyframes moveBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 0;
    }
}

.backgroundContainer {
    width: 100%;
    min-height: 100vh;
    height: 100%;
    background-image: url('assets/circuits-logo-bg.png');
    background-size: 10%;
    background-repeat: repeat;
    background-position: 0 0;
    animation: moveBackground 60s linear infinite;
    padding: 2.4rem;
    position: relative;
    z-index: 0;
    display: flex;
    justify-content: center;
}

.backgroundContainer.noAnimation {
    animation-play-state: paused;
}

.backgroundContainer.solidColor {
    background-image: none;
    background-color: var(--primary-dark);
}

.bodyContainer {
    position: relative;
    z-index: 1;
    width: 60rem;
    height: fit-content;
    margin: 0 2.4rem;
    border: 0.1rem solid var(--text-dark);
    background-color: var(--primary-light);
    overflow-x: auto;
}

.toggleButton {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 5rem;
    height: 5rem;
    padding: 0.8rem;
    font-size: 2rem;
    background-color: var(--primary-dark);
    color: var(--primary-light);
    border: 0.2rem solid var(--white);
    border-radius: 0.8rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0.4rem 0.8rem var(--shadow-color);
}

.toggleButton:hover {
    filter: brightness(150%);
}

.parentContainer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-dark);
    border: 0.2rem solid var(--accent-gold);
    width: 100%;
}

.contentContainer {
    padding: 0 2.4rem;
}

h1, h2, h3, h4 {
    margin: 0;
    padding: 0.6rem;
    line-height: 0.8rem;
    text-align: center;
}

.circuits {
    font-size: 4.2rem;
    font-weight: 900;
    margin: 1.8rem 17.5rem;
    color: var(--accent-gold);
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 0.1rem var(--white), 0 0 0.2rem var(--white), 0 0 0.3rem var(--white), 0 0 0.4rem var(--white), 0 0 0.5rem var(--white);
    }
    
    to {
        text-shadow: 0 0 0.2rem var(--white), 0 0 0.3rem var(--white), 0 0 0.4rem var(--white), 0 0 0.5rem var(--white), 0 0 0.6rem var(--white);
    }
}


hr {
    border: none;
    height: 0.1rem;
    width: 100%;
    background-color: var(--accent-gold);
}

.pickIt {
    font-size: 3.8rem;
    font-weight: 100;
    margin: 1.5rem;
    color: var(--primary-light);
    text-shadow: 0 0 0.6rem var(--white);
}

h3 {
    font-size: 3.6rem;
    font-weight: 500;
    margin: 0.4rem;
    line-height: 4.8rem;
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

h4 {
    font-size: 3.2rem;
    font-weight: 100;
    margin: 0 0 1rem 0;
    line-height: 0.8rem;
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

.contents, #php {
    font-size: 1.8rem;
    margin: 1rem 0;
    text-align: left;
}

.contents {
    margin: 2.4rem 0 0 0;
    color: var(--text-dark);
}

#php {
    color: var(--accent-gold);
}

.footerSection {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
}

#github {
    width: 2.8rem;
    height: 2.8rem;
}

.githubContainer:hover {
    filter: brightness(150%);
}

#footer {
    color: var(--text-gray);
    margin: 2rem 0.8rem;
    font-size: 1.2rem;
}

.footerCircuits {
    color: var(--primary-dark);
    text-decoration: none;
}

.footerCircuits:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

#logo {
    position: absolute;
    top: 0.1rem;
    left: 0;
    height: 10.9rem; 
    width: 10.9rem; 
    padding: 0.2rem;
}

.innerheader {
    width: 100%;
    margin: 0;
}

.instructions {
    display: flex;
    justify-content: space-evenly;
    row-gap: 1rem;
    margin-bottom: 0;
    padding-bottom: 0;
}

#amount {
    display: flex;
    flex: 1;
}

.amountNumber {
    margin: 0 0.8rem 0 0;
}

#instruction {
    display: flex;
    flex: 1;
}

.instructionImages {
    width: 5.2rem;
    height: 5.2rem;
}

.number {
    color: var(--text-dark);
    font-size: 3.4rem;
    font-weight: 500;
    margin: -2rem 0 0 1.4rem;
    padding: 0.4rem 0.8rem;
    background-color: var(--accent-red-dark);
    border-radius: 2rem;
    position: relative;
}

#instruction .amountNumber .number {
    background-color: var(--accent-green);
}

#present {
    width: 8rem;
    height: 8rem;
}

.rewards {
    display: flex;
    line-height: 1.6rem;
    justify-content: space-between;
    background-color: var(--primary-dark);
    border: 0.2rem solid var(--accent-gold);
    margin: 0 8.4rem 1.6rem 8.4rem;
    padding: 0.6rem;
}

.leftColumn {
    flex: 0.7;
    text-align: left;
    padding: 0 1rem;
    align-content: space-evenly;
}

.rightColumn {
    flex: 0.3;
    text-align: right;
    padding: 0 1rem;
    align-content: space-evenly;
}

.tile {
    color: var(--primary-light);
    font-size: 1.6rem;
}

#mainButton {
    font-size: 4.8rem;
    font-family: ari;
    font-weight: 500;
    margin: 0 0 1.6rem 0;
    padding: 0 3.2rem;
    background-color: var(--accent-red-dark);
    color: var(--primary-light);
    border-radius: 1.6rem;
    border: 0.2rem solid var(--accent-gold);
    transition-duration: 0.1s;
    cursor: pointer;
    box-shadow: 0 0.8rem var(--text-gray);
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

#mainButton:hover {
    background-color: var(--accent-red-hover);
}

#mainButton:active {
    box-shadow: 0 0.1rem var(--text-gray);
    transform: translateY(0.8rem);
}

.highlight {
    background-color: var(--accent-green);
}

.amountInstructions .highlight {
    background-color: var(--accent-red-dark);
}

h4 .highlight {
    background-color: var(--accent-gold);
}

.prize .highlight {
    background-color: var(--accent-gold);
    border-radius: 0.15rem;
}

.prize {
    font-size: 1.6rem;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--shadow-color);
    z-index: 999;
    pointer-events: auto;
}

#popup {
    display: none;
    position: fixed;
    max-width: 40rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
    border: 0.2rem solid var(--accent-gold);
    border-radius: 0.8rem;
    background-color: var(--white);
    box-shadow: 0 0.4rem 0.8rem var(--shadow-color);
    z-index: 1000;
    text-align: center;
}

#popupTitle {
    font-size: 3.2rem;
    margin: 0 0.2rem 1.4rem 0.2rem;
    color: var(--accent-green);
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

#popupMessage {
    font-size: 3.2rem;
    margin: 0 0.2rem 2rem 0.2rem;
    color: var(--accent-red-dark);
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

#resetButton {
    padding: 1rem 2rem;
    margin-bottom: 1rem;
    font-size: 2.4rem;
    font-family: ari;
    font-weight: 500;
    color: var(--primary-light);
    background-color: var(--accent-red-dark);
    border-radius: 3.2rem;
    border: 0.2rem solid var(--accent-gold);
    cursor: pointer;
    transition-duration: 0.1s;
    box-shadow: 0 0.8rem var(--text-gray);
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

#resetButton:hover {
    background-color: var(--accent-red-hover);
}

#resetButton:active {
    box-shadow: 0 0.1rem var(--text-gray);
    transform: translateY(0.8rem);
}

#gameResult {
    text-align: center;
}

.endContainer {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 4rem auto;
    width: 40rem;
    height: 40rem;
    border-radius: 100rem;
    border: 0.3rem solid var(--accent-gold);
    background-color: var(--primary-dark);
}

.winText {
    color: var(--accent-gold);
    text-shadow: 0 0 0.6rem var(--accent-gold);
}

.loseText {
    color: var(--accent-red-dark);
    text-shadow: 0 0 0.6rem var(--accent-red-dark);
}

.messageOne, .messageTwo, .messageThree, .messageFour {
    font-size: 2rem; 
    margin: 0;
    line-height: 3.5rem;
}

.messageThree {
    font-size: 3.2rem; 
    margin-top: -1rem;
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

.messageFour {
    font-size: 3.2rem; 
    font-weight: 900;
    margin-bottom: 3rem;
    color: var(--accent-red-dark);
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

#endImage {
    max-width: 20rem;
    max-height: 20rem;
    margin: 2rem auto;
    display: block;
}

#finishButton {
    font-family: ari;
    font-size: 3.8rem;
    font-weight: 500;
    margin: 0 0 1.6rem 0;
    padding: 0.2rem 3.2rem;
    background-color: var(--accent-red-dark);
    color: var(--primary-light);
    border-radius: 3.2rem;
    border: 0.2rem solid var(--accent-gold);
    transition-duration: 0.1s;
    cursor: pointer;
    box-shadow: 0 0.8rem var(--text-gray);
    text-shadow: 0.3rem 0.3rem 0 var(--shadow-color);
}

#finishButton:hover {
    background-color: var(--accent-red-hover);
}

#finishButton:active {
    box-shadow: 0 0.1rem var(--text-gray);
    transform: translateY(0.8rem);
}
