body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1e1e2f, #282846);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup-content {
    background: #2e2e4e;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 80%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    animation: popupFade 0.5s ease;
}

@keyframes popupFade {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup h2 {
    margin-top: 0;
    font-size: 24px;
    color: #ffd369;
}

.popup p {
    font-size: 16px;
    margin: 15px 0 25px;
    line-height: 1.5;
}

.popup button {
    padding: 10px 20px;
    font-size: 16px;
    background: #ffd369;
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.popup button:hover {
    background: #ffb347;
}

.hidden {
    display: none;
}

#playerInput {
    margin-top: 20px;
}

#playerInput label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #ffd369;
}

#playerInput input {
    padding: 10px;
    font-size: 16px;
    border-radius: 10px;
    border: none;
    outline: none;
    text-align: center;
    width: 80%;
    margin-bottom: 15px;
}

#playerInput button {
    padding: 10px 20px;
    font-size: 16px;
    background: #ffd369;
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

#playerInput button:hover {
    background: #ffb347;
}

.message {
    margin-top: 15px;
    font-size: 16px;
    color: #9effa8;
    font-weight: bold;
    display: none;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1e1e2f, #282846);
    color: #fff;
}

/* Flex container */
.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Left: Player table */
.left-panel {
    width: 25%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-right: 2px solid rgba(255,255,255,0.1);
}

#playerTable {
    width: 100%;
    border-collapse: collapse;
}

#playerTable th, #playerTable td {
    padding: 10px;
    text-align: center;
}

.player-header {
    position: relative;
}

.player-header .edit-icon {
    display: none;
    position: absolute;
    right: 5px;
    cursor: pointer;
    color: #ffd369;
}

.player-header:hover .edit-icon {
    display: inline;
}

.color-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
}

.center-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.right-panel {
    width: 25%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 2px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.current-player {
    margin-bottom: 20px;
    text-align: center;
}

.player-info {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.actions .btn {
    background: #ffd369;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.actions .btn:hover {
    background: #ffb347;
}

#triangleContainer {
    display: flex;
    flex-direction: column;
    align-items: center; /* centers each row */
    margin-top: 20px;
}

.triangle-row {
    display: flex;
    justify-content: center;
    margin: 4px 0;
}

.spacer {
    display: inline-block;
    width: 20px;
}

.circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: white;
    margin: 4px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

.circle:hover {
    transform: scale(1.15);
}

#winnerMessage {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ffd369;
}

.winner-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

#winnerScore {
    font-size: 18px;
    color: #9effa8;
}

#restartBtn {
    padding: 10px 20px;
    font-size: 16px;
    background: #ffd369;
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

#restartBtn:hover {
    background: #ffb347;
}
