@font-face {
    font-family: 'minecraftmedium';
    src: url('minecraft-webfont.woff2') format('woff2'),
         url('minecraft-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Global pixel font styling */
* {
    font-family: 'minecraftmedium', monospace;
    -webkit-font-smoothing: none;
    -webkit-touch-callout: none;
    image-rendering: -webkit-optimize-contrast; /* WebKit/Safari mobile scaling optimization */
    image-rendering: -moz-crisp-edges;         /* Firefox */
    image-rendering: crisp-edges;
    image-rendering: pixelated;                /* Standard property */
    box-sizing: border-box;
}

/* Helper class for forcing crisp rendering on individual images or wrappers */
.pixel-art {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* 1. FULL-SCREEN BACKGROUND LAYERS (Sunset Sky -> Terrain -> Bedrock Floor -> Stone Fill) */
html {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #101638;

    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;

    background-image: 
        linear-gradient(to bottom, #101638 0%, #301a4e 30%, #8c2759 55%, #d95328 75%, #f4a240 90%, #fbd867 100%),
        url('assets/grass.png'),
        url('assets/dirt.png'),
        url('assets/dirt.png'),
        url('assets/dirt.png'),
        url('assets/bedrock.png'),
        url('assets/stone.png');

    background-position: 
        left top,            /* Sky gradient */
        left top 80px,       /* Grass top edge */
        left top 144px,      /* Dirt row 1 (+64px) */
        left top 208px,      /* Dirt row 2 (+64px) */
        left top 272px,      /* Dirt row 3 (+64px) */
        left bottom,         /* Bedrock pinned to bottom floor */
        left top 336px;      /* Stone background fill */

    background-repeat: 
        no-repeat,
        repeat-x,
        repeat-x,
        repeat-x,
        repeat-x,
        repeat-x,
        repeat;

    background-size: 
        100% 80px,
        64px 64px,
        64px 64px,
        64px 64px,
        64px 64px,
        64px 64px,
        64px 64px;
}

/* 2. CENTERED PAGE CONTENT CONTAINER */
body { 
    margin: 0 auto; 
    width: 95%;
    max-width: 960px; 
    min-height: 100vh;
    padding-bottom: 120px; 
    background: transparent;
}

/* TYPOGRAPHY */
h1 { 
    text-align: left; 
    font-family: 'minecraftmedium', monospace; 
    color: white; 
    text-shadow: 4px 4px black; 
    font-weight: normal; 
    margin-left: 20px; 
    margin-top: 25px;
    margin-bottom: 25px;
}
h2 { 
    text-align: center; 
    font-family: 'minecraftmedium', monospace; 
    color: white; 
    text-shadow: 3px 3px black; 
    font-weight: normal; 
}
h3 { 
    text-align: left; 
    font-family: 'minecraftmedium', monospace; 
    color: white; 
    text-shadow: 3px 3px black; 
    font-weight: normal; 
}
p { 
    margin: 10px auto; 
    width: 100%;
    text-align: left; 
    font-family: 'minecraftmedium', monospace; 
    color: white; 
    text-shadow: 2px 2px black; 
    font-weight: normal; 
}

/* LINKS: Default, Visited, and Hover States */
a { 
    font-family: 'minecraftmedium', monospace; 
    color: #ff7777; /* Normal link color */
    text-shadow: 2px 2px #000000; 
    text-decoration: none;
}

a:visited {
    color: #ff6666; /* red for visited links */
}

a:hover {
    color: #b33636; /* Darker red when hovering over the link */
    text-decoration: underline;
}

.header-box {
    margin: auto; 
    width: 100%;
    background-image: url('assets/header.png');
    padding-top: 10px;
}

marquee p {
    text-shadow: 2px 2px black;
}

.gallery-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr); /* Forces 3 columns */
            gap: 15px;
            margin: 15px auto 0 auto;
            width: 100%;
        }
        
        /* Keeps it responsive on smaller screens */
        @media (max-width: 800px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }
        @media (max-width: 500px) {
            .gallery-grid {
                grid-template-columns: 1fr;
            }
        }