@import url('https://fonts.googleapis.com/css2?family=Solitreo&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Macondo+Swash+Caps&display=swap');
@import url('https://fonts.googleapis.com/css2?family=TASA+Explorer:wght@400..800&display=swap');

/* mobile */
@media (min-width: 320px) {
    :root {   
        --base-color1: #ffffff;     /* white */
        --base-color2: #000000;     /* black*/
        --nav-color1: #caf5a5;      /* minty green */
        --nav-color2: #cbc9c9;      /* beige like */
        --nav-color3: #b2b5b6;       /* light gray */
        --button-color1: #6c757d;   /* medium grey */
        --button-color2: #20778f;   /* medium teal */
        --button-color3: #8049b3;   /* medium purple */
        --button-color4: #5360d6;   /* medium blue */
        --color-1: #05425d;         /* dark teal */
        --color-2: #600C8D;         /* dark plum */
        --color-3: #f0c78e;         /* medium mellow yellow */
        --color-4: #d4d2f3;         /* light blue gray */
    }

    /* base styles for entire page */
    html {
        font-family: TASA Explorer, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        color: var(--text-color);
    }
    body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        width: 100%;
    }
    header {
        margin: 0 auto 0 auto;
        padding-top: 2rem;
        width: 100vw;
        background-color: var(--base-color2);
    }
    header p {
        margin: 0.5rem auto 0.5rem auto;
        padding-top: 1rem;
        width: 80vw;
        color: var(--nav-color2);
        font-family: TASA Explorer, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 1.25rem;
        font-weight: 400;
        text-align:center;
    }
    main {
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: linear-gradient( 0deg, var(--color-3) 0%, var(--base-color2) 100%);
    }
    #mordor-canvas {
        width: 100%;
        height: 100%;
        max-height: 40rem;
        max-width: 44rem;
        display: block;
        margin: 0 auto;
        image-rendering: pixelated;
        image-rendering: crisp-edges;
        overflow: hidden;
    }
    #mobile-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    .dpad-button {
    width: 64px;
    height: 64px;
    background-color: #444;
    color: white;
    border: 2px solid #666;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    }
    .dpad-button:hover {
    background-color: #555;
    }
    .dpad-button:active {
    background-color: #333;
    transform: scale(0.95);
    }
    .dpad-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    }
    footer {
        background-color: var(--base-color2);
        width: 100%;
        justify-items: center;
    }
    .foot-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .cta-button {
        display: inline-block;
        text-decoration: none;
        color: #ffffff;
        background-color: var(--button-color1);
        padding: 1rem 1.25rem;
        border-radius: .5rem;
        font-weight: 600;
        margin: 1.5rem auto 0 auto;
        position: relative;
        overflow: hidden;
        z-index: 11;
        transition: color 0.5s ease-out;
        }
    .cta-button::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--change-color);
        transform: translateX(-100%);
        transition: transform 0.5s ease;
        z-index: -11;
        }
    .cta-button:hover {
        color: white;
        }
    .cta-button:hover::before {
        transform: translateX(0);
    }
        .primary {
            background-color: var(--primary-color);   
        }
        .secondary {                                    /* cta-button above is for all cta buttons, but this is for the cta secondary pseudo class */
            background-color: var(--secondary-color);
        }

    /* fonts */
    h1 {
        font-family: Solitreo, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 5rem;
        color: var(--color-2);
    }
    h2 {
        font-family: Macondo Swash Caps, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 3rem;
        color: var(--nav-color2);
        text-align: center;  
    }
    h3 {
        font-family: Solitreo, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 3rem;
        color: var(--color-2);
    }
    h4 {
        font-family: TASA Explorer;
        font-weight: 600;
        font-size: 1.25rem;
        font-style: oblique;
    }
    /* containers */
    #mordor-canvas {

        box-shadow: 1rem 1rem 2rem var(--base-color2);
    }
}

@media (min-width: 8000px) {
    footer {
        background-color: var(--base-color2);
        width: 100%;
        justify-items: center;
    }
    .foot-container {
            display: flex;
            flex-direction: row;
            width: min(60rem, 100%);
            padding-top: 2rem;
            padding-bottom: 2rem;
            justify-content: center;
            align-items: center;
            gap: 1rem;
        } 
}