/*
    Copyright 2023 by 
    All rights reserved.
    This file is part of the Avalon-NLU repository,
    and is released under the "MIT License Agreement". Please see the LICENSE
    file that should have been included as part of this package.
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');
* {
    margin: 0;
    padding: 0;
    font-family: 'poppins', sans-serif;
}

section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(
        to bottom,
        rgb(12, 60, 79) 0%,
        rgb(20, 76, 98) 10%,
        rgb(33, 96, 115) 20%,
        rgb(54, 108, 123) 30%,
        rgb(90, 85, 93) 40%,
        rgb(78, 64, 65) 50%,
        rgb(50, 62, 66) 60%,
        rgb(22, 49, 66) 70%,
        rgb(6, 38, 62) 80%,
        rgb(3, 28, 54) 90%,
        rgb(3, 28, 54) 100%
    );
    background-position: center;
    background-size: cover;
}

.info-box {
    position: relative;
    width: 45%;
    height: 600px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    margin: 1em;
    padding: 1em;
}

h2 {
    font-size: 2em;
    color: #fff;
    text-align: center;
}

h3 {
    font-size: 1.25em;
    color: #fff;
    text-align: left;
}

.button {
    width: 100%;
    height: 30px;
    border-radius: 40px;
    background: #fff;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 0.75em;
    font-weight: 600;
    margin-top: 1em;
    margin-bottom: 1em;
}

.button:disabled {
    background-color: #CCCCCC;
}

input[type=submit] {
    width: 100%;
    height: 40px;
    border-radius: 40px;
    background: #fff;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin-top: 1em;
    margin-bottom: 1em;
}

.game-id-box {
    position: absolute;
    top: 1em;
    left: 1em;
    color: white;
    font-size: 0.75em;
}

.logout-button {
    position: absolute;
    top: 0;
    right: 1em;
    width: 150px;
}

.add-agents-button {
    position: absolute;
    top: 0;
    right: calc(2em + 150px);
    width: 150px;
}

.table {
    width: 400px;
    height: 400px;
    background-image: url("../img/table.png");
    background-size: contain;
    position: absolute;
    left: calc(50% - 200px);
    top: calc(50% - 190px);
}

.player-box {
    width: 120px;
    height: 120px;
}

.player-frame {
    width: 100px;
    height: 100px;
    margin-left: 10px;
}

.player-name-box {
    position: absolute;
    width: 120px;
    height: 2em;
    bottom: 0;
    left: 0;
}

.player-role-box {
    position: absolute;
    width: 120px;
    height: 2em;
    bottom: -45px;
    left: 0;
}
.brighten-on-hover {
    transition: filter 0.25s ease;
}

.brighten-on-hover:hover {
    filter: brightness(2.0);
}

.player-name {
    position: absolute;
    color: white;
    width: 120px;
    height: 2em;
    bottom: -2px;
    left: 0;
    font-size: 0.9em;
    text-align: center;
}

.player-predicted-role {
    position: absolute;
    color: white;
    width: 120px;
    height: 2em;
    bottom: -47px;
    left: 0;
    font-size: 0.9em;
    text-align: center;
    pointer-events: none;
}

.player-loc-1 {
    position: absolute;
    top: -80px;
    left: 0px;
}

.player-loc-2 {
    position: absolute;
    top: -80px;
    right: 0px;
}

.player-loc-3 {
    position: absolute;
    top: calc(50% - 90px);
    right: -100px;
}

.player-loc-4 {
    position: absolute;
    bottom: -50px;
    right: 0px;
}

.player-loc-5 {
    position: absolute;
    bottom: -50px;
    left: 0px;
}

.player-loc-6 {
    position: absolute;
    top: calc(50% - 90px);
    left: -100px;
}

.evil-ring {
    width: 72px;
    height: 72px;
    box-shadow: inset 0px 0px 5px 5px red;
    border-radius: 50%;
    position: absolute;
    top: 14px;
    left: 24px;
}

.good-ring {
    width: 72px;
    height: 72px;
    box-shadow: inset 0px 0px 5px 5px blue;
    border-radius: 50%;
    position: absolute;
    top: 14px;
    left: 24px;
}

.unknown-ring {
    width: 72px;
    height: 72px;
    box-shadow: inset 5px 0px 5px 5px rgba(255, 0, 0, 0.5), inset -5px 0px 5px 5px rgba(0, 0, 255, 1);
    border-radius: 50%;
    position: absolute;
    top: 14px;
    left: 24px;
}

.disconnected {
    width: 50px;
    height: 50px;
    background-image: url("../img/disconnected.svg");
    background-size: contain;
    position: absolute;
    top: 27px;
    left: 37px;
}

.crown {
    width: 60px;
    height: 60px;
    background-image: url("../img/crown.png");
    background-size: contain;
    position: absolute;
    top: -35px;
    left: 0px;
}

.jester {
    width: 100px;
    height: 70px;
    background-image: url("../img/jester.png");
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    top: -43px;
    right: -25px;
}

.shield {
    width: 60px;
    height: 60px;
    background-image: url("../img/shield.png");
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    top: 20px;
    right: -30px;
}

.x-mark {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 10px;
    left: 20px;
    background-image: url("../img/x-mark.png");
    background-size: contain;
    background-repeat: no-repeat;
}

.player-portrait {
    width: 72px;
    height: 72px;
    position: absolute;
    top: 14px;
    left: 24px;
}

.player-belief {
    width: 120px;
    height: 2em;
    position: absolute;
    bottom: -1.5em;
    left: 0px;
    font-size: 0.75em;
    color: white;
    background-color: transparent;
    background-image: url("../img/name-frame.png");
    background-size: cover;
    background-repeat: no-repeat;
    border: none;
    text-align: center;
    padding-left: 1em;
}

.chat {
    border-width: 1px;
    border-radius: 10px;
    border-color: black;
    border-style: solid;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    width: calc(100% - 20px);
    height: 450px;
    background-color: #ffffff44;
}

.input-text {
    border-width: 1px;
    border-radius: 10px;
    border-color: black;
    border-style: solid;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    width: calc(100% - 20px);
    background-color: #ffffff44;
}

.loading-bar {
    position: absolute;
    width: 150px;
    height: 20px;
    border-radius: 7px;
    top: 60px;
    left: calc(50% - 77px);
}

.loading-bar p {
    position: absolute;
    top: -25px;
    color: white;
    left: 35px;
}

#loading-bar-progress {
    position: absolute;
    width: 50px;
    height: 20px;
    border-radius: 7px;
    top: 0;
    left: 0;
    background-color: rgb(237, 123, 30);
}

.end-turn-button {
    margin-top: 3em;
}

.end-turn-button:hover {
    background-color: lightgray;
}

.quest-bar {
    position: absolute;
    width: 300px;
    height: 60px;
    top: 150px;
    left: 50px;
}

.quest-ring {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 5px;
    box-shadow: 0px 0px 5px 5px lightgray;
    border-radius: 50%;
    color: white;
}

.quest-text {
    text-align: center;
    font-size: 1.25em;
    padding-top: 10px;
}

.quest-image {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 0px;
}

.party-bar {
    position: absolute;
    width: 300px;
    height: 40px;
    top: 225px;
    left: 105px;
}

.party-ring {
    position: absolute;
    width: 30px;
    height: 30px;
    top: 5px;
    box-shadow: 0px 0px 3px 3px lightgray;
    border-radius: 50%;
    color: white;
}

.party-image {
    position: absolute;
    width: 30px;
    height: 30px;
    top: 1px;
}

.voting-bar {
    position: absolute;
    left: 0;
    right: 0;
    top: 275px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#voting-task {
    width: 100%;
    text-align: center;
    color: white;
    font-size: 0.75em;
}

.vote-button {
    width: 100px;
}

.vote-button:hover {
    background-color: lightgray;
}

.voting-buttons {
    display: flex;
    gap: 10px;
}

#pi-5 {
    background-color: maroon;
}

.message-container {
    padding: 2px;
    margin: 2px;
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background-color: rgba(0, 191, 255, 0.3);
}

.help-box {
    position: absolute;
    width: 80%;
    height: 60%;
    background: black;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    margin: 1em;
    padding: 1em;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
}

#help_box {
    display: none;
}

.help-box-role {
    margin-left: 20px;
    display: flex;
    margin-top: 20px;
}

.help-box-role-text {
    float: left;
    margin-left: 20px;
    width: calc(100% - 100px);
}

.help-box-image {
    float: left;
    width: 60px;
    height: 60px;
}

.help-button {
    position: absolute;
    top: 0;
    right: calc(12em + 150px);
    width: 150px;
}

.help_button {
    width: 100%;
    height: 40px;
    border-radius: 40px;
    background: #fff;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin-top: 1em;
    margin-bottom: 1em;
}

.hidden {
    display: none;
}

.dialog {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 60px;
}

.dialog-content {
    background-color: #fefefe;
    margin: 5% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px; /* Maximum width for the dialog */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* Subtle shadow for better visibility */
    text-align: center; /* Center align text */
}

.dialog p {
    margin-bottom: 20px; /* Space between text and buttons */
}

.dialog button {
    margin: 0 10px; /* Space between buttons */
    padding: 10px 20px; /* Button padding */
    font-size: 16px; /* Font size */
    cursor: pointer; /* Pointer cursor on hover */
    border: none; /* Remove default border */
    border-radius: 4px; /* Rounded corners for buttons */
    background-color: #4CAF50; /* Green background for confirm button */
    color: white; /* White text for confirm button */
}

.dialog button#confirmNo {
    background-color: #f44336; /* Red background for cancel button */
}

.dialog button:hover {
    opacity: 0.8; /* Slightly transparent on hover */
}

/* To show the dialog */
.dialog:not(.hidden) {
    display: block; /* Show the dialog when the hidden class is removed */
}

.player_reveal_list {
    padding-left: 30px;
}