:root {
    --background-color: #000000;
    --input-background: #242424;
    --pk-c1: #3cb9c2;
    --pk-c2: #ffffff;
    --pk-c3: #f38831;
    --pk-c4: #d65897;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'ReadexPro';
    src: url('assets/ReadexPro.ttf');
}

html, body {
    overflow: hidden;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    font-family: ReadexPro, sans-serif;
    color: white;
}

p {
    color: white;
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#lottie-animation {
    width: 50%;
    max-width: 200px;
}

#app {
    display: flex;
    width: 400vw; /* 4 screens */
    height: 100%;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.screen {
    width: 100vw;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    background-color: var(--background-color);
}

.screen_title {
    font-size: 24px;
    margin-bottom: 20px;
    position: absolute;
    top: 10vh;
}

#pk_logo {
    position: fixed;
    width: 30px;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
}

#pk_animated_logo {
    width: 200px;
    margin-bottom: 20px;
}

#greeting {
    font-size: 24px;
    margin-bottom: 30px;
    cursor: pointer;
    padding-bottom: 5px;
}

#greeting .player-name-greeting {
    color: var(--pk-c1);
    font-weight: bold;
}

/* --- Input and Buttons --- */

.input_label {
    background-color: var(--input-background);
    color: white;
    border: none;
    font-size: 20px;
    line-height: 40px;
    border-radius: 10px;
    text-align: center;
    padding: 5px 15px;
}

.menu_button {
    background: none;
    border: none;
    color: var(--pk-c2);
    font-family: ReadexPro, sans-serif;
    margin: 10px;
    font-size: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.menu_button:hover {
    transform: scale(1.1);
}

#install_app_button {
    margin-top: 30px;
    font-size: 18px; /* Slightly smaller font */
    padding: 8px 16px; /* Reduced padding */
    border: 2px solid var(--pk-c1);
    border-radius: 50px;
}


/* --- Popups --- */

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup_content {
    background-color: var(--input-background);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.popup_content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.popup_content .input_label {
    width: 100%;
    margin-bottom: 20px;
}

#pk_qr {
    width: 150px;
    margin-top: 20px;
}

#info_label {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--input-background);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 15px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s;
    z-index: 50;
}

#info_label.show {
    visibility: visible;
    opacity: 1;
    bottom: 110px;
}

/* --- Menu Screen --- */
#menu {
    justify-content: flex-start;
    padding-top: 10vh;
}

#ingame_selection {
    display: none;
    flex-direction: column;
}

#ingame_selection .menu_button {
    font-size: 22px;
}


/* --- Catalog Selection Screen --- */
#catalog_selection_screen {
    justify-content: space-between;
    padding-top: calc(10vh + 40px);
    padding-bottom: 12vh;
}

#catalog_list {
    width: 90%;
    max-width: 500px;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.catalog_item {
    background-color: var(--input-background);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s, background-color 0.3s;
}

.catalog_item.selected {
    border-color: var(--pk-c1);
    background-color: #2a3a3b;
}

.catalog_item h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--pk-c2);
}

.catalog_item p {
    font-size: 15px;
    color: #ccc;
    flex-grow: 1;
}

/* --- Player List Screen --- */
#player_list_box {
    justify-content: flex-start;
    padding-top: 10vh;
    padding-bottom: 12vh;
}
#pl_caption {
    font-size: 20px;
    margin-bottom: 20px;
    position: absolute;
    top: 10vh;
}
.player_input_container {
    display: flex;
    width: 90%;
    max-width: 400px;
    margin-bottom: 20px;
    margin-top: 40px;
}
#player_input {
    flex-grow: 1;
    text-align: left;
}
#add_player_button {
    background: var(--input-background);
    border: none;
    border-radius: 10px;
    margin-left: 10px;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#add_player_button img {
    height: 30px;
}
#player_list_preview {
    width: 90%;
    max-width: 400px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: var(--input-background);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 20px;
}
.player_label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 24px;
}
.remove_player_button {
    background: none;
    border: none;
    cursor: pointer;
}
.remove_player_button img {
    height: 20px;
    width: 20px;
}


/* --- Game Screen --- */
#game {
    justify-content: center;
}
#prompt-box {
    width: 100%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    cursor: pointer;
}
#prompt-text {
    text-align: center;
    font-size: 24px;
    user-select: none;
}
.player-name {
    color: var(--pk-c1);
    font-weight: bold;
}
#open_playerlist_button_global {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#open_playerlist_button_global.visible {
    opacity: 1;
    visibility: visible;
}

#open_playerlist_button_global img {
    width: 25px;
}