/* ====== FONT SETUP ====== */
@font-face {
    font-family: "Minecraft";
    src: url("https://raw.githubusercontent.com/Minato-mba/Minato-mba.github.io/main/assets/fonts/minecraft.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Minecraft";
    src: url("https://raw.githubusercontent.com/Minato-mba/Minato-mba.github.io/main/assets/fonts/minecraft-ten.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
}

/* ====== APPLY FONT TO ENTIRE PAGE ====== */
* {
    font-family: "Minecraft", sans-serif !important;
}

/* ====== BODY ====== */
body {
    margin: 0;
    background-color: #1b1b1b;
    color: white;
    font-family: "Minecraft", sans-serif;
    image-rendering: pixelated;
    overflow: hidden; /* removes page scrollbars */
}

/* ====== TOP BAR ====== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;   /* smaller padding helps on mobile */
    border-bottom: 4px solid #444;
    background-color: #2d2d2d;
    z-index: 1000;
    box-sizing: border-box;
    flex-wrap: nowrap;     /* prevent wrapping */
}

/* top-right should not shrink */
.top-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;        /* prevents it from shrinking */
}

/* title centering remains the same */
.title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    font-size: 24px;
    color: #ffffff;
    white-space: nowrap;
}

/* Responsive title */
@media (max-width: 600px) {
    .dropdown-content {
        min-width: 150px;
        max-height: 200px;
    }
    .title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        text-align: right;
        font-size: 14px;
    }
}


/* ====== CANVAS ====== */
canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

/* ====== DOWNLOAD BUTTON ====== */
.download-button {
    font-family: "Minecraft", sans-serif;
    background-color: #3a9c3a;
    color: #fff;
    border: 3px solid #2c7a2c;
    padding: 6px 12px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 2px 2px #000;
    transition: transform 0.05s, box-shadow 0.05s;
    display: inline-block;
}
.download-button:hover { background-color: #45b045; }
.download-button:active { transform: translate(2px, 2px); box-shadow: 0px 0px #000; }

/* ====== DROPDOWN ====== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    font-family: "Minecraft", sans-serif;
    background-color: #3a3a3a;
    color: #fff;
    border: 3px solid #222;
    padding: 6px 12px;
    cursor: pointer;
    box-shadow: 2px 2px #000;
    transition: transform 0.05s, box-shadow 0.05s;
}

.dropdown-button:hover {
    background-color: #555;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #2d2d2d;
    border: 3px solid #444;
    min-width: 200px;
    max-height: 300px;       /* limit height */
    overflow-y: auto;        /* enable vertical scroll */
    box-shadow: 4px 4px #000;
    z-index: 999;
    padding: 5px 0;
}

/* Optional: style the scrollbar (Webkit) */
.dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #1b1b1b;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.dropdown-content .dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown-content .dropdown-item:hover {
    background-color: #3a3a3a;
}

.dropdown-content img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    image-rendering: pixelated;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ====== PLAYER DROPDOWN ====== */
.player-dropdown {
    margin-left: auto;  /* pushes it all the way to the right */
}
