body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: auto;
    padding: 20px;
}
#main-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 60%;
    max-width: 600px;
}

#random-star-result .red-number {
    color: red;
    font-weight: bold;
}

#initial-section {
    margin-bottom: 20px;
}

input[type="number"] {
    padding: 8px;
    margin: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 50px;
    text-align: center;
}
button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}
button:hover {
    background-color: #0056b3;
}
#input-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 20px;
}
#names, #teams {
    width: 45%;
    text-align: left;
}
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}
input[type="text"] {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    transition: 0.2s ease;
}
input[type="text"]:focus {
    border-color: #007bff;
    outline: none;
}
#pick-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}
#pick-button:hover {
    background-color: #218838;
}
#pairs {
    font-weight: bold;
    margin-top: 20px;
    font-size: 1.2em;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}
.container {
    text-align: center;
    max-width: 800px;
    width: 100%;
}
#input-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 20px auto;
    overflow-y: auto;
}
.name-input, .team-input {
    width: 45%;
    padding: 8px;
    margin: 5px 0;
}
.prefill-button {
    background-color: rgba(255, 204, 0, 0.8);
    color: black;
    margin: 5px; /* Added gap between buttons */
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
}

.prefill-button:hover {
    background-color: rgba(255, 153, 0, 0.8);
}

@media (max-width: 768px) {
    #input-container {
        flex-direction: column;
        align-items: center;
    }

    #connection-lines {
        display: none;
    }
}
#pairs {
    font-weight: bold;
    margin-top: 20px;
    font-size: 1.2em;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Ensure "-" stays centered */
.pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    font-family: monospace;
    white-space: nowrap;
    margin: 5px auto;
    opacity: 0; /* Start invisible */
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.pair.show {
    opacity: 1;
    transform: translateY(0);
}


/* Adjust the name and team spacing */
.name, .team {
    flex: 1;
    text-align: right;
}

.team {
    text-align: left;
}

.separator {
    min-width: 20px;
    text-align: center;
}
#star-selection {
    margin-bottom: 20px;
}
#star-selection label {
    font-size: 1.1em;
    margin-right: 10px;
}
#star-selection select {
    padding: 8px;
    margin: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1em;
}
#star-selection button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}
#star-selection button:hover {
    background-color: #218838;
}
