@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* Root variables */
:root {
    --bg-color-pri: #8888df;
    --bg-color-sec: #fcd57a;
    --shadow-color-light: #ffeab8;
    --heading-color: #fa7085;
    --shadow-color-dark: #0e0d0b;
    --light-text: #FFFDFDff;
    --highlight1: #2988F5ff;
    --highlight2: #E62F78ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-transform: uppercase;
    font-family: 'VT323', monospace;

}

html {
    height: 100%;
}

body {
    background-color: var(--bg-color-pri);
}

main,
.navbar,
.footer {
    max-width: 1400px;
    margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Press Start 2P', monospace;
    color: var(--light-text);
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.button {
    font-family: 'Press Start 2P', monospace;
    color: var(--light-text);
    background-color: transparent;
    border: none;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

li a:hover:not(.active) {
    color: var(--bg-color-sec);
}

.copy-under-box a:hover:not(.active) {
    color: var(--shadow-color-dark);
}

.margin-top {
    margin: clamp(5rem, 8vw, 4rem) 0 0 clamp(0.5rem, 3vw, 1rem);
}

.margin-top-1 {
    margin-top: 2rem;
}

.margin-bottom {
    margin-bottom: 3rem;
}

.margin-bottom-1 {
    margin-bottom: .5rem;
}

.margin-bottom-2 {
    margin-bottom: 1.5rem;
}

.margin-1 {
    margin: .5rem 0.2rem;
}

.margin-right {
    margin-right: 1rem;
}

.pad-left {
    padding-left: 1rem;
}

.hidden {
    display: none;
}

.underline {
    text-decoration: underline;
}

.white {
    color: var(--light-text);
}

/* Navbar */
header {
    width: 100%;
    position: fixed;
    display: flex;
    align-items: center;
    top: 0;
    padding: 0.3rem 0;
    margin: 0 auto;
    color: var(--light-text);
    background-color: var(--bg-color-pri);
    z-index: 101;
}

.navbar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    background-color: var(--bg-color-pri);
    padding: 0 .5rem;
}

.navbar li {
    padding: 0 .2rem;
    text-shadow: 0.1rem 0.1rem var(--shadow-color-dark);
    font-size: clamp(1.4rem, 3vw, 1.7rem);
    word-spacing: -0.2rem;
}

.active {
    color: var(--heading-color);
    cursor: default;
}

/* Main Title */

.mario-box::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
    width: calc(100% + 1rem);
    height: calc(100% + 1rem);
    background-color: var(--bg-color-sec);
    border-radius: 3px;
    box-shadow: inset 0.1rem 0.2rem var(--shadow-color-light),
        inset -0.2rem -0.3rem var(--shadow-color-dark);
    z-index: -1;
    /* Ensures the pseudo-element is behind the content */
}

.mario-box {
    position: relative;
    width: fit-content;
    max-width: 90vw;
    height: fit-content;
    margin-left: .5rem;
}

.main-title {
    font-size: clamp(1.5rem, 6vw, 3.7rem);
    color: var(--heading-color);
    text-shadow: clamp(0.1rem, 0.5vw, 0.3rem) clamp(0.2rem, 1vw, 0.5rem) var(--shadow-color-dark);
    margin: 0;
    line-height: 1.1;
}

.main-title span {
    font-size: clamp(3rem, 12vw, 7rem);
    font-family: 'press Start 2P', monospace;
    margin-bottom: .3rem;
}

.copy-under-box {
    text-align: right;
    font-size: 1rem;
    color: var(--shadow-color-light);
    margin-top: 0;
    translate: clamp(0.4rem, 1vw, 0.4rem) clamp(1rem, 3vw, 1.5rem);
    font-family: 'press Start 2P', monospace;
    font-size: clamp(0.6rem, 1.5vw, 0.9rem);
}

.game-info {
    font-size: clamp(1.3rem, 1.5vw, 1.5rem);
    padding: 3rem 3rem 0 .5rem;
}

.game-info h3 {
    font-size: clamp(1rem, 2rem, 2.5rem);
    text-shadow: clamp(0.1rem, 0.5vw, 0.3rem) clamp(0.1rem, 1vw, 0.3rem) var(--shadow-color-dark);
    color: var(--light-text);
    padding-top: .7rem;
    padding-left: .7rem;
    line-height: 2rem;
}

.pink-box::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
    width: calc(100% + 1rem);
    height: calc(100% + 1rem);
    background-color: var(--highlight2);
    border-radius: 3px;
    box-shadow: inset 0.1rem 0.2rem rgb(255, 139, 159),
        inset -0.2rem -0.3rem var(--shadow-color-dark);
    z-index: -1;
    /* Ensures the pseudo-element is behind the content */
}

.pink-box {
    position: relative;
    width: fit-content;
    max-width: 90vw;
    height: fit-content;
    margin-left: .5rem;
}

.start-game-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--shadow-color-dark);
    background-color: transparent;
    border: none;
    padding: 0.6rem 1rem;
    cursor: pointer;
    text-align: center;
    margin: 0 auto;
    display: block;
}

.start-game-btn:hover {
    transform: scale(1.05);
}

.start-game-btn:active {
    transform: scale(0.9);
}

/* About */

.sec-title {
    /* clamp() calculated using: https://www.marcbacon.com/tools/clamp-calculator/ */
    font-size: clamp(2rem, 1.778rem + 1.111vw, 2.75rem);
    text-shadow: clamp(0.1rem, 0.5vw, 0.3rem) clamp(0.1rem, 1vw, 0.3rem) var(--shadow-color-dark);
    color: var(--heading-color);
    padding-top: .7rem;
    padding-left: .7rem;
}

.sec-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: left;
    padding: 1rem;
}

.about-text {
    font-size: clamp(1.3rem, 1.5vw, 1.5rem);
    margin-top: clamp(1rem, 1.5vw, 1.5rem);
}

.about-img img {
    width: 100%;
}

/* Game App */

.info-container {
    position: absolute;
    top: 5rem;
    left: 3rem;
    text-align: right;
}

.info-container>h3 {
    font-size: clamp(2rem, 1.5rem + 1vw, 2.5rem);
    font-family: 'VT323', monospace;
    color: var(--light-text);
    text-shadow: 0.1rem 0.1rem var(--shadow-color-dark);
}

/* Game controls */
#game-controls1,
#game-controls2 {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    /* ensure it's above canvas */
}

.control-row {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.up-down-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#left-arrow1,
#left-arrow2 {
    background: url(https://res.cloudinary.com/dvf7itpby/image/upload/v1751409414/static/media/sprites/arrowLeft.png) no-repeat center center/cover;
    height: 4rem;
    width: 4rem;
    cursor: pointer;
}

#left-arrow1:active,
#left-arrow2:active {
    height: 3.5rem;
    width: 3.5rem;
    padding: 0.5rem;
}

#up-arrow1,
#up-arrow2 {
    background: url(https://res.cloudinary.com/dvf7itpby/image/upload/v1751409418/static/media/sprites/arrowUp.png) no-repeat center center/cover;
    height: 4rem;
    width: 4rem;
    cursor: pointer;
}

#up-arrow1:active,
#up-arrow2:active {
    height: 3.5rem;
    width: 3.5rem;  
    padding: 0.5rem;
}

#down-arrow1,
#down-arrow2 {
    background: url(https://res.cloudinary.com/dvf7itpby/image/upload/v1751409413/static/media/sprites/arrowDown.png) no-repeat center center/cover;
    height: 4rem;
    width: 4rem;
    cursor: pointer;
}

#down-arrow1:active,
#down-arrow2:active {
    height: 3.5rem;
    width: 3.5rem;
    padding: 0.5rem;
}

#right-arrow1,
#right-arrow2 {
    background: url(https://res.cloudinary.com/dvf7itpby/image/upload/v1751409412/static/media/sprites/arrowRight.png) no-repeat center center/cover;
    height: 4rem;
    width: 4rem;
    cursor: pointer;
}

#right-arrow1:active,
#right-arrow2:active {
    height: 3.5rem;
    width: 3.5rem;
    padding: 0.5rem;
}

/* Overlay in base.html */
.overlay {
    display: block;
    min-height: 6rem;
}

/* Footer */
footer {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    margin: 0 auto;
    background-color: var(--shadow-color-dark);
    color: var(--light-text);
    padding: 0.5rem 0;
    font-family: 'Press Start 2P', monospace;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.footer li {
    padding: 0 .3rem;
    font-size: clamp(1rem, 3vw, 1.7rem);
    word-spacing: -0.2rem;
}

.footer li a:active {
    color: var(--heading-color);
}

/* Profile */

.blue-box::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
    width: calc(100% + 1rem);
    height: calc(100% + 1rem);
    background-color: var(--highlight1);
    border-radius: 3px;
    box-shadow: inset 0.1rem 0.2rem rgb(133, 155, 245),
        inset -0.2rem -0.3rem var(--shadow-color-dark);
    z-index: -1;
    /* Ensures the pseudo-element is behind the content */
}

.blue-box {
    position: relative;
    width: fit-content;
    max-width: 90vw;
    height: fit-content;
    margin-left: .5rem;
}

.profile-title {
    /* clamp() calculated using: https://www.marcbacon.com/tools/clamp-calculator/ */
    font-size: clamp(1.8rem, 1.58rem + 1.111vw, 2.5rem);
    text-shadow: clamp(0.1rem, 0.5vw, 0.3rem) clamp(0.1rem, 1vw, 0.3rem) var(--shadow-color-dark);
    color: var(--heading-color);
    padding-top: .7rem;
    padding-left: .7rem;
    padding-right: .7rem;
}

.profile-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: left;
    padding: 1rem;
}

.profile-text {
    font-size: clamp(1.3rem, 1.5vw, 1.5rem);
    margin-top: 1.5rem;
}

.profile-box::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
    width: calc(100% + 1rem);
    height: calc(100% + 1rem);
    background-color: var(--highlight1);
    border-radius: 3px;
    box-shadow: inset 0.1rem 0.2rem #70adee,
        inset -0.2rem -0.3rem var(--shadow-color-dark);
    z-index: -1;
    /* Ensures the pseudo-element is behind the content */
}

.profile-box {
    position: relative;
    width: fit-content;
    height: fit-content;
    margin-left: .5rem;
}

.profile-btn {
    font-size: clamp(.6rem, 1.111vw, .8rem);
    padding: 0.2rem;
    background-color: var(--highlight1);
    color: var(--light-text);
    cursor: pointer;
}

.profile-btn:hover {
    transform: scale(1.05);
}

.profile-btn:active {
    transform: scale(0.95);
}

.profile-heading {
    color: var(--shadow-color-dark);
    margin-bottom: .3rem;
}

.warning {
    color: var(--highlight2);
    text-shadow: 0.1rem 0.1rem var(--bg-color-pri);
    margin-bottom: .3rem;
    font-size: 1.8rem;
}

.bigger {
    font-size: 1.8rem;
}

.smaller {
    font-size: smaller;
}

.narrower {
    letter-spacing: -1px;
}

hr {
    border: var(--highlight1) dashed 1px;
    margin: .2rem 0;

}

.allauth input[type=text],
.allauth input[type=password],
.allauth input[type=email] {
    padding: 0.3rem 0.2rem;
    font-size: 1.3rem;
    font-family: "VT323", monospace;
    border-radius: 1px;
    border: 2px solid var(--highlight1);
    width: 96%;
    align-items: center;
}

.allauth input {
    margin-bottom: .4rem;
}

.align-right {
    align-self: flex-start;
}

#hint_id_password {
    text-decoration: underline;
    display: block;
    margin-bottom: 1rem;
    font-size: clamp(.9rem, 1.1vw, 1rem);
    color: #32302c;
}

#hint_id_password1 {
    display: block;
    margin-bottom: 1rem;
    font-size: .8rem;
    color: #1c1b19;
    letter-spacing: -.3px;
    padding-right: .5rem;
}

.form-check-input {
    border: 1px solid black;
    border-radius: 1px;
}
.profile-input {
    display: block;
    background-color: #fff;
    font: inherit;
    font-size: 1rem;
    border-radius: 1px;
    border: 2px solid var(--highlight1);
    max-width: 250px;
}

.profile-input:hover {
    border-color: var(--highlight2);
    transition: border-color 0.1s;
}

#id_profile_image::file-selector-button {
    background-color: var(--highlight1);
    color: var(--light-text);
    border: none;
    padding: 0.3rem 0.5rem;
    font: inherit;
    font-size: 1em;
    border-radius: 1px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.1s;
    text-transform: uppercase;
}

#id_profile_image::file-selector-button:hover {
    background-color: var(--highlight2);
    transform: scale(1.05);
}

.profile-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.user-details {
    min-width: 250px;
    flex: 1;
}

.profile-image {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.profile-image img {
    width: 100%;
    max-width: 150px;
    height: auto;
    border: 2px solid #0e0d0b;
    border-radius: 1px;
    box-shadow:
        inset 0.1rem 0.2rem var(--shadow-color-light),
        inset -0.2rem -0.3rem var(--shadow-color-dark);
}

.avatar-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    vertical-align: middle;
    gap: 1rem;
    margin: 0 0.5rem;

}

.profile-btn {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    padding: 0.1rem 0.2rem;
    background-color: var(--highlight1);
    color: var(--light-text);
    font-family: 'VT323', monospace;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.profile-btn:hover {
    transform: scale(1.05);
}

.simple-button {
    background: transparent;
    border: none;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(44, 44, 44, 0.998);
    cursor: pointer;
    padding: 0.5rem 0.3rem;
    transition: color 0.2s, transform 0.1s;
}

.simple-button:hover {
    color: var(--highlight1);
    transform: scale(1.05);
}
/* Media Queries */

/* ABOUT */
@media screen and (min-width: 769px) {
    /* Profile */
    .profile-row {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: last baseline;
    }

    .profile-image {
        text-align: right;
        margin-right: 3rem;
    }

    .avatar-buttons {
        justify-content: flex-end;
    }

    /* About */
    .sec-content {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 1rem;
        max-width: 900px;
        flex-wrap: wrap;
    }

    .sec-content p {
        width: 100%;
        margin-bottom: 1rem;
    }

    .about-img {
        max-width: 30%;
    }

    .about-text {
        flex: 1;
        /* Allow text to take available space */
        padding: 0 1rem;
        margin-top: 0;
    }
}

/* INDEX */
@media screen and (min-width: 963px) {

    .index-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .main-title {
        max-width: 40%;
    }

    .game-info {
        flex: 1;
        margin: clamp(5rem, 8vw, 4rem) 0 0 clamp(0.5rem, 3vw, 1rem);
        /* Allow form to take available space */
        padding: 0 2.5rem;
        max-width: 435px;
    }

    .start-game-btn {
        margin: 5rem auto;
    }
}