@font-face {
    font-family: 'Minecraft';
    src: url('Minecraft.ttf') format('truetype'),
         url('https://cdn.jsdelivr.net/gh/South-Paw/typeface-minecraft/dist/minecraft.woff2') format('woff2');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    height: 100vh; overflow: hidden;
    font-family: 'Minecraft', monospace;
    display: flex; justify-content: center; align-items: center;
    color: white; background-color: #1a1a1a;
}

.minecraft-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
    background: url('bg.jpg'); 
    background-repeat: repeat-x;
    background-size: auto 100%; 
    background-position: 0 0;
    animation: rotateBackground 80s linear infinite;
    filter: blur(4px); transform: scale(1.1);
}

@keyframes rotateBackground {
    from { background-position: 0 0; }
    to { background-position: -3000px 0; }
}

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65); z-index: -1;
}

.menu-container { 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; width: 100%; max-width: 900px; padding: 20px;
}

.minecraft-title {
    font-size: 2.5rem; color: #d0d0d0; text-shadow: 4px 4px #3f3f3f; margin-bottom: 10px;
    line-height: 1.2; text-align: center; width: 100%; white-space: normal; word-wrap: break-word;
}
@media (min-width: 800px) { .minecraft-title { font-size: 3.5rem; } }

.subtitle {
    font-size: 1.1rem; color: #aaa; margin-bottom: 40px; text-shadow: 2px 2px #000;
}

/* Grid Layout */
.stats-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 25px;
    width: 100%; max-width: 600px; margin: 0 auto;
}

.stat-item {
    position: relative; height: 54px; width: 100%;
    display: flex; align-items: center; justify-content: center;
}

/* --- TEXTURED BUTTONS --- */
.mc-button {
    height: 100%; width: 100%;
    font-family: inherit; font-size: 1.1rem;
    color: #e0e0e0;
    cursor: pointer; text-shadow: 2px 2px 0px #3f3f3f;
    border: none;
    position: absolute; top: 0; left: 0; z-index: 10;
    
    /* Use the downloaded textures */
    background-image: url('btn-normal.png');
    background-size: 100% 100%; /* Stretch texture to fit */
    background-repeat: no-repeat;
    image-rendering: pixelated; /* Keep it crisp */

    /* Retain CSS borders for the sharp edges */
    box-shadow: 
        inset 2px 2px 0px 0px #C6C6C6,
        inset -2px -2px 0px 0px #575757,
        2px 2px 0px 0px #000, 
        -2px -2px 0px 0px #000, 
        2px -2px 0px 0px #000,  
        -2px 2px 0px 0px #000;  
    margin: 2px;
    transition: none;
}

.mc-button:hover { 
    background-image: url('btn-hover.png');
    color: #ffffa0;
    box-shadow: 
        inset 2px 2px 0px 0px #D8D8D8,
        inset -2px -2px 0px 0px #6D6D6D,
        2px 2px 0px 0px #000,
        -2px -2px 0px 0px #000,
        2px -2px 0px 0px #000,
        -2px 2px 0px 0px #000;
}

.mc-button:active { 
    background-image: url('btn-active.png');
    color: #ffffa0;
    box-shadow: 
        inset 2px 2px 0px 0px #333,
        inset -2px -2px 0px 0px #777,
        2px 2px 0px 0px #000,
        -2px -2px 0px 0px #000,
        2px -2px 0px 0px #000,
        -2px 2px 0px 0px #000;
}

/* --- CENTERED TEXT --- */
.revealed-text {
    font-size: 1.5rem; color: #55FF55; text-shadow: 2px 2px 0px #000;
    opacity: 0;
    
    /* Absolute Centering */
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -55%); /* -55% accounts for font baseline offset */
    
    width: 100%; text-align: center;
    z-index: 5; pointer-events: none; line-height: 1;
}

.version-tag {
    position: fixed; bottom: 10px; left: 10px;
    font-size: 1rem; color: #666; text-shadow: 1px 1px 0 #000;
}

.local-explosion {
    position: fixed; z-index: 100; pointer-events: none;
    transform: translate(-50%, -50%) scale(2.5); 
}

.tnt-primed { animation: tntFlash 0.3s steps(2, start) infinite; }
@keyframes tntFlash { 50% { filter: brightness(1.8) sepia(1) hue-rotate(-50deg) saturate(5); } }
