@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

html,
body {
    height: 100%;
    margin: 0;
    background: linear-gradient(to bottom, #0f2027, #203a43, #2c5364);
    color: #fff;
    font-family: "Press Start 2P", cursive;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#title {
    font-size: 2.5em;
    color: #00ffff;
    text-shadow: 2px 2px #000;
    margin-bottom: 0.5em;
}

#subHeading,
#player {
    font-size: 1em;
    margin-bottom: 0.5em;
    text-shadow: 1px 1px #000;
}

button {
    font-family: "Press Start 2P", cursive;
    background-color: #ffcc00;
    color: #000;
    border: 2px solid #000;
    padding: 0.5em 1em;
    border-radius: 5px;
    cursor: pointer;
    margin: 0.5em;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #ffaa00;
}

/* Modal base styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Hide by default */
.hidden {
    display: none;
}

/* Modal content box */
.modal-content {
    background-color: #111;
    padding: 2em;
    border-radius: 10px;
    width: 450px;
    height: 90%;
    border: 2px solid #0f0;
    color: #0f0;
    font-family: "Press Start 2P", cursive;
    position: relative;
    overflow-y: scroll;
}

/* Close button */
.close-button {
    position: absolute;
    top: 0.5em;
    right: 1em;
    font-size: 1.5em;
    cursor: pointer;
    color: #f00;
}

/* Input styling */
#newPlayerName {
    font-family: "Press Start 2P", cursive;
    padding: 0.5em;
    border: 2px solid #fff;
    border-radius: 5px;
    width: 100%;
    margin: 1em 0;
    background-color: #222;
    color: #0f0;
}

/* Player list */
#playerList {
    margin-top: 1em;
}

#playerList ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#playerList li {
    margin: 0.5em 0;
    padding: 0.4em;
    background-color: #333;
    border: 2px solid #0f0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0f0;
}

#playerList li button {
    background-color: #ff5555;
    color: white;
    border: none;
    padding: 0.2em 0.5em;
    font-family: "Press Start 2P", cursive;
    border-radius: 3px;
    cursor: pointer;
}

select {
    font-family: "Press Start 2P", cursive;
    background-color: #222;
    color: #0f0;
    border: 2px solid #0f0;
    border-radius: 5px;
    padding: 0.5em;
    width: 100%;
    max-width: 300px; /* Matches modal content width for consistency */
    margin: 0.5em 0;
    cursor: pointer;
    appearance: none; /* Removes default browser styling */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%230f0" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 0.5em center;
    background-size: 1em;
    transition: border-color 0.3s ease;
}

select:hover {
    border-color: #00ffff; /* Cyan border on hover for consistency with title */
}

select:focus {
    outline: none;
    border-color: #ffcc00; /* Matches button color for focus state */
    box-shadow: 0 0 5px #ffcc00;
}

select option {
    background-color: #111;
    color: #0f0;
    font-family: "Press Start 2P", cursive;
    padding: 0.5em;
}

input[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
