/* Container for the entire account widget */
#account-ui {
    position: absolute;
    top: 2vmin;
    right: 2vmin;
    z-index: 100005; /* Above almost everything */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Ensure it moves out of the way if needed, or stays fixed. 
       Use 'fixed' if you want it visible even if the menu slides, 
       or 'absolute' relative to the body. */
    position: fixed; 
}

/* The Username Display (Main Menu Style) */
#account-name {
    font-family: 'Monoton', cursive;
    font-size: 4vmin;
    color: white;
    text-shadow: 0 0 1vmin black;
    cursor: pointer;
    transition: transform 0.2s, text-shadow 0.2s;
    user-select: none;
    padding: 1vmin;
    /* Add a subtle background to make it pop against the game/menu */
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1vmin;
}

#account-name:hover {
    transform: scale(1.05);
    text-shadow: 0 0 1.5vmin #ff4d4d; /* Red glow on hover like dashboard brand */
}

/* The Dropdown Menu (Dashboard Style) */
#account-dropdown {
    display: none; /* Hidden by default */
    margin-top: 1vmin;
    background-color: rgba(0, 0, 0, 0.9);
    border: 0.5vmin solid white;
    min-width: 25vmin;
    box-shadow: 0 1vmin 2vmin rgba(0, 0, 0, 0.5);
    flex-direction: column;
    animation: fadeIn 0.2s ease-out;
}

/* Show class to toggle display */
#account-dropdown.show {
    display: flex;
}

/* Dropdown Items */
.account-item {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5vmin;
    color: white;
    padding: 2vmin;
    text-align: center;
    cursor: pointer;
    border-bottom: 0.2vmin solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none; /* For links */
    display: block;
}

.account-item:last-child {
    border-bottom: none;
}

.account-item:hover {
    background-color: white;
    color: black;
}

/* Specific styling for Log Out to look a bit different if desired */
#btn-logout:hover {
    background-color: #ff4d4d;
    color: white;
}

/* Animation for dropdown */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-1vmin); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #account-name {
        font-size: 5vmin;
    }
    .account-item {
        font-size: 2.5vmin;
        padding: 3vmin;
    }
  }
