@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');


/* ========================================================= */
/* |                                                       | */
/* ========================================================= */

@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);
        height: 100%;
    }
    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;
    }
    #mordor-controls {
        display: flex;
        flex-direction: row;
        margin: 0.5rem auto;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        max-width: min(50rem, 100%);
    }
    #mobile-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    .dpad-button {
        width: 4rem;
        height: 4rem;
        background-color: #444;
        color: white;
        border: 0.01 solid #666;
        border-radius: 0.5rem;
        font-size: 1.5rem;
        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;
        text-size-adjust: none;
        color: #ffffff;
        background-color: var(--button-color1);
        padding: 1rem 1rem;
        border-radius: .5rem;
        font-weight: 600;
        margin: 0.5rem auto 0.5rem 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);
    }

    /* Modal Styles */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        align-items: center;
        justify-content: center;
    }
    .modal.show {
        display: flex;
    }
    .modal-content {
        background-color: #fff;
        padding: 2rem;
        border-radius: 0.5rem;
        max-width: 25rem;
        width: 90%;
        box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.3);
        text-align: center;
    }
    .modal-message {
        margin-bottom: 1.25rem;
        font-size: 1rem;
        color: #333;
    }
    .modal-button {
        background-color: #007bff;
        color: white;
        border: none;
        padding: 0.75rem 2rem;
        border-radius: 0.25rem;
        cursor: pointer;
        font-size: 1rem;
    }
    .modal-button:hover {
        background-color: #0056b3;
    }

    /* user account menus */
    .user-header {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        padding: 1rem;
        margin: 0.5rem auto;
        width: 90%;
        background: linear-gradient(135deg, var(--color-1), var(--color-2));
        border-radius: 0.5rem;
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
        gap: 1rem;
        text-align: center;       
        } 
    .user-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        }  
    .user-actions {
            justify-content: center;
            width: 100%;
        }
    .user-avatar {
        width: 4rem;
        height: 4rem;
        border-radius: 50%;
        border: 3px solid var(--base-color);
        object-fit: cover;
    }
    .user-gamertag {
        color: var(--base-color);
        font-size: 1.25rem;
        font-weight: 400;
    }
    .user-gamertag strong {
        font-weight: 700;
        color: var(--nav-color);
    }
    .user-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    .user-btn {
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        transition: all 0.3s ease;
        border: none;
        cursor: pointer;
    }
    .settings-btn {
        background-color: var(--button-color2);
        color: var(--base-color);
    }
    .settings-btn:hover {
        background-color: var(--change-color);
        transform: translateY(-2px);
    }
    .logout-btn {
        background-color: var(--button-color);
        color: var(--base-color);
    }
    .logout-btn:hover {
        background-color: #dc3545;
        transform: translateY(-2px);
    }

}


/* ========================================================= */
/* |                                                       | */
/* ========================================================= */

@media (min-width: 600px) {

#mordor-controls {
        display: flex;
        flex-direction: row;
        margin: 0.5rem auto;
        justify-content: center;
        align-items: center;
        gap: 5rem;
        max-width: min(50rem, 100%);
    }
}

/* ========================================================= */
/* |                                                       | */
/* ========================================================= */

@media (min-width: 1023px) {
    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;
    } 
    .user-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        padding: 1rem;
        margin: 0.5rem auto;
        width: 90%;
        background: linear-gradient(135deg, var(--color-1), var(--color-2));
        border-radius: 0.5rem;
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
        gap: 1rem;
    }
    .user-info {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    .user-actions {
        justify-content: flex-end;
        width: auto;
    }
}