body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Roblox-inspired blocky background */
    background-color: #d3d3d3; /* Fallback color */
    background-image:
        linear-gradient(45deg, #c0c0c0 25%, transparent 25%),
        linear-gradient(-45deg, #c0c0c0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #c0c0c0 75%),
        linear-gradient(-45deg, transparent 75%, #c0c0c0 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    font-family: 'Arial', sans-serif; /* Simple, blocky font */
    color: #333;
}

#game-container {
    background-color: #f8f8f8; /* Lighter container background */
    padding: 30px;
    border: 4px solid #a0a0a0; /* Thicker, slightly darker grey border */
    border-radius: 5px; /* Slightly rounded corners */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow */
    text-align: center;
    width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #3a3a3a; /* Slightly darker heading */
    margin-bottom: 25px; /* Increased spacing */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle text shadow */
}

/* --- Slot Machine Reel --- */
#reel-container {
    background-color: #ffffff; /* White display area */
    border: 3px solid #b0b0b0; /* Adjusted border */
    height: 100px; /* Height for one item */
    width: 90%;
    margin-bottom: 25px;
    overflow: hidden; /* Hide items outside the view */
    position: relative; /* Needed for positioning the indicator */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.15); /* Slightly stronger inset shadow */
    border-radius: 3px; /* Slight rounding */
}

#reel {
    position: relative;
    top: 0;
    transition: top 3s cubic-bezier(0.25, 0.1, 0.25, 1); /* Spin animation */
}

.reel-item {
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    padding: 5px;
}

.reel-item.placeholder {
    font-size: 3em;
    color: #aaa;
}

.reel-item .item-rarity {
    font-size: 0.8em;
    font-weight: normal;
    opacity: 0.8;
    margin-top: 5px;
}

/* Indicator line in the middle */
.reel-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: rgba(255, 0, 0, 0.5); /* Red indicator */
    transform: translateY(-1px);
    z-index: 1; /* Above the reel items */
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.7);
}

#result-display {
    min-height: 50px; /* Space for result text */
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: bold;
}

#result-display .item-name {
     animation: fadeIn 0.5s ease;
}
#result-display .item-rarity {
    font-size: 0.9em;
    font-weight: normal;
    font-style: italic;
    opacity: 0.8;
    animation: fadeIn 0.5s ease 0.1s;
}

/* --- Button --- */
#spin-button {
    background-color: #00a2ff; /* Bright blue button */
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#spin-button:hover {
    background-color: #008be6; /* Darker blue on hover */
}

#spin-button:active {
    background-color: #007acc;
    transform: scale(0.98); /* Slight shrink on click */
}

#spin-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Rarity Colors applied to reel items and result text */
.common { background-color: #b0b0b0; color: #333; } /* Grey */
.uncommon { background-color: #66ccff; color: #004d80; } /* Light Blue */
.rare { background-color: #ff66cc; color: #66004d; } /* Pink/Purple */
.legendary { background-color: #ffd700; color: #805b00; } /* Gold */

/* Apply text colors to result display based on rarity */
#result-display .common { color: #777; } /* Darker grey text */
#result-display .uncommon { color: #0077cc; } /* Blue text */
#result-display .rare { color: #cc0099; } /* Pink/Purple text */
#result-display .legendary { color: #ccaa00; } /* Gold text */


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}