* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #39ad56;
}

.select-box, .play-board, .result-box {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.select-box {
    padding: 20px 25px 25px;
    background: #fff;
    border-radius: 8px;
    max-width: 300px;
    width: 100%;
}

.select-box.hide {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

.select-box .content {
    margin-top: 20px;
}

.select-box header {
    font-size: 23px;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
}

.select-box .title {
    font-size: 17px;
}

.select-box .options {
    display: flex;
    width: 100%;
    margin-top: 20px;
}

.options button {
    width: 100%;
    font-size: 18px;
    padding: 8px 0;
    border: none;
    outline: none;
    background: #39ad56;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.options button:hover,
.result-box .btn button:hover {
    transform: scale(0.9);
}

.options button.playerX {
    margin-right: 5px;
}

.options button.playerO {
    margin-left: 5px;
}

.play-board {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

.play-board.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.play-board .details {
    background: #fff;
    padding: 7px;
    border-radius: 8px;
}

.play-board .details .players {
    position: relative;
    display: flex;
    justify-content: space-between;
}

.play-board .details span {
    position: relative;
    width: 100%;
    padding: 7px 0;
    border-radius: 8px;
    color: #39ad56;
    font-size: 18px;
    text-align: center;
    cursor: default;
    z-index: 4;
    transition: all 0.5s ease;
}

.details span:first-child {
    color: #fff;
}

.details .slider {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: #39ad56;
    border-radius: 8px;
    z-index: 2;
    transition: all 0.5s ease;
}

.details span.active {
    color: #fff;
}

.players.active span:first-child {
    color:#39ad56;
}

.players.active span:nth-child(2) {
    color:#fff;
}

.players.active .slider {
    left: 50%;
}

.play-board .play-area {
    margin-top: 20px;
}

.play-board section {
    display: flex;
}

.play-board section span {
    display: block;
    margin: 2px;
    height: 80px;
    width: 80px;
    background: #fff;
    border-radius: 8px;
    font-size: 42px;
    text-align: center;
    line-height: 82px;
    color: #39ad56;
}

.result-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 300px;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

.result-box.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.result-box .won-text {
    display: flex;
    justify-content: center;
    font-size: 21px;
}

.result-box .won-text p {
    font-weight: 600;
    margin: 0 4px;
}

.result-box .btn {
    display: flex;
    margin-top: 15px;
    justify-content: center;
}

.result-box .btn button {
    font-size: 18px;
    padding: 8px 20px;
    border: none;
    outline: none;
    background: #39ad56;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}
