:root {
    --room-primary-font: 'Roboto Mono', monospace;
    --room-accent-font: 'Press Start 2P', cursive; /* For potential future use on titles if any */
    --room-text-primary: #E0F0FF; /* Light icy blue, from modals */
    --room-text-secondary: #A0C0E0; /* Lighter blue-grey, from modals */
    --room-glow-color: #00FFDC; /* Cyan/Turquoise, from modals */
    --room-glow-color-rgb: 0, 255, 220;
    --room-dark-bg: #0A192F; 
    --room-border-radius: 6px; /* Consistent small border radius */
}

.room-image-style {
    max-width: 500px;
    width: 100%;
    display: block;
    margin: 0 auto;
}

.room-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.room-button {
    position: absolute;
    top: 16%;
    left: 46%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    width: 110px;
    height: 110px;
    background-image: url('../data/images/roombutton.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Pseudo-elements for icons */
.room-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 65%;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 11;
}

/* Specific icons for each button using pseudo-elements */
#dataminer-button::before {
    background-image: url('../data/images/ui/dataminer.png');
}

#rest-button::before {
    background-image: url('../data/images/ui/bed.png');
}

#inventory-button::before {
    background-image: url('../data/images/ui/inventory.png');
}

#arena-button::before {
    background-image: url('../data/images/galaxy/poi/poi_arena.png');
}

#leaderboard-button::before {
    background-image: url('../data/images/galaxy/poi/poi_radio.png'); /* Using radio tower as a stand-in for leaderboard/ranking icon */
}

/* Hover effect for ALL room buttons - changes the diamond background */
.room-button:hover {
    background-image: url('../data/images/roombuttonhover.png');
}

/* Styling for the labels */
.button-label {
    position: relative;
    font-family: var(--room-primary-font);
    color: var(--room-text-primary);
    font-size: 10px; /* Slightly adjusted for Roboto Mono */
    font-weight: 500; /* Roboto Mono medium weight */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    z-index: 12;
    margin-top: 85px; /* Adjusted for larger button size */
    pointer-events: none;
    line-height: 1.4;
    background-color: rgba(10, 25, 47, 0.9); /* Darker, consistent with modal content bg */
    padding: 4px 10px; /* Adjusted padding */
    border-radius: var(--room-border-radius);
    border: 1px solid rgba(var(--room-glow-color-rgb), 0.5); /* Brighter border */
    box-shadow: 0 1px 4px rgba(0,0,0,0.3), 0 0 5px rgba(var(--room-glow-color-rgb), 0.2) inset;
    min-width: auto; /* Allow natural width */
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.room-button:hover .button-label {
    background-color: rgba(var(--room-glow-color-rgb), 0.9); /* Glow color on hover */
    color: var(--room-dark-bg); /* Dark text on glow hover */
    border-color: rgba(var(--room-glow-color-rgb), 1);
    text-shadow: none;
}

.bed-button {
    top: 55%;
    left: 38%;
}

.desk-button {
    top: 50%;
    left: 75%;
}

.arena-room-button {
    top: 35%;
    left: 70%;
}

.leaderboard-room-button {
    top: 38%;
    left: 50%;
    width: 66px; /* 40% smaller than 110px */
    height: 66px;
}

.leaderboard-room-button .button-label {
    margin-top: 50px; /* Adjusted for smaller button size */
    font-size: 9px;
    padding: 3px 8px;
}

/* Style for the dataminer status badge */
.dataminer-status-badge {
    position: absolute;
    top: -15px; /* Adjust to position above the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff8c00; /* Orange background */
    color: white;
    padding: 3px 8px;
    border-radius: 12px; /* Pill shape */
    font-size: 10px;
    font-family: var(--room-primary-font);
    font-weight: bold;
    z-index: 13; /* Ensure it's above other button elements */
    white-space: nowrap;
    box-shadow: 0px 1px 3px rgba(0,0,0,0.3);
}

.dataminer-status-badge.hidden {
    display: none;
}

/* Special styling for the PRISM Mining label to make it stand out */
#dataminer-button .button-label {
    color: var(--room-text-primary); /* Use a consistent light text color */
    font-weight: 700;
    border-color: rgba(var(--room-glow-color-rgb), 0.5);
    text-shadow: 0 0 5px rgba(0,0,0,0.9); /* Dark shadow for crisp text */
    
    /* Dark background with a subtle, sweeping gradient animation */
    background-size: 200% 100%;
    background-image: linear-gradient(
        90deg,
        rgba(10, 25, 47, 0.9), /* Dark base */
        rgba(var(--room-glow-color-rgb), 0.2), /* Subtle shimmer */
        rgba(10, 25, 47, 0.9) /* Dark base */
    );
    animation: prism-label-shine 4s infinite linear;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Keyframe animation for the subtle gradient sweep */
@keyframes prism-label-shine {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    .room-button {
        width: 82px; /* 25% reduction from 110px */
        height: 82px;
    }

    .button-label {
        margin-top: 64px; /* Adjusted for smaller button size */
        font-size: 9px;
        padding: 3px 8px;
    }

    .leaderboard-room-button {
        width: 50px; /* 25% reduction from 66px */
        height: 50px;
    }

    .leaderboard-room-button .button-label {
        margin-top: 38px; /* Adjusted for smaller button size */
        font-size: 8px;
        padding: 2px 6px;
    }
}