body, h1, h2, p, input, button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    background: #fff;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

h1, h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #343a40;
    font-size: 1.75rem;  /* Increased font size */
}

input, button {
    font-size: 1.25rem;  /* Increased font size */
    padding: 0.75rem;
    margin: 0.25rem 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

button {
    background: #007bff;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background: #0056b3;
}

.player, .vote-player {
    background: #007bff;
    color: #fff;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    max-width: 300px;  /* Ensures buttons have uniform width */
    text-overflow: ellipsis;  /* Handles overflow text */
    white-space: nowrap;  /* Prevents text wrapping */
    overflow: hidden;  /* Hides excess text */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.player:hover, .vote-player:hover {
    background: #0056b3;
}

.vote-player.disabled {
    pointer-events: none;
}

#setup-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#player-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;  /* Slight increase in gap for better spacing */
}

.player-name-input {
    width: 100%;
    max-width: 300px;
    margin-bottom: 15px;  /* Increased margin */
}

#players-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#player-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;  /* Slightly increased gap */
}

#vote-player-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;  /* Slightly increased gap */
}

#selection-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#start-game-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.result {
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
    font-size: 1.5rem;  /* Increased font size */
}

.play-again-btn {
    background: #ffc107;
    border: none;
    cursor: pointer;
}

.play-again-btn:hover {
    background: #e0a800;
}

/* Media Queries for smaller screens */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
        width: 95%;
    }

    h1, h2 {
        font-size: 1.5rem;  /* Adjusted font size for smaller screens */
    }

    input, button {
        padding: 0.75rem;
        font-size: 1.25rem;  /* Adjusted font size for smaller screens */
    }

    .player, .vote-player {
        padding: 0.75rem 1.5rem;
        max-width: 100%;  /* Adjust width for smaller screens */
    }

    .result {
        font-size: 1.25rem;  /* Adjusted font size for smaller screens */
    }
}