﻿/* 
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com 
Twitter: @rich_clark
*/

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

body {
    line-height:1;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section { 
    display:block;
}

nav ul {
    list-style:none;
}

blockquote, q {
    quotes:none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content:'';
    content:none;
}

a {
    margin:0;
    padding:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

/* change colours to suit your needs */
ins {
    background-color:#ff9;
    color:#000;
    text-decoration:none;
}

/* change colours to suit your needs */
mark {
    background-color:#ff9;
    color:#000; 
    font-style:italic;
    font-weight:bold;
}

del {
    text-decoration: line-through;
}

abbr[title], dfn[title] {
    border-bottom:1px dotted;
    cursor:help;
}

table {
    border-collapse:collapse;
    border-spacing:0;
}

/* change border colour to suit your needs */
hr {
    display:block;
    height:1px;
    border:0;   
    border-top:1px solid #cccccc;
    margin:1em 0;
    padding:0;
}

input, select {
    vertical-align:middle;
}
﻿body {
    --main-bg-color: white;
    --main-text-color: black;
    --popup-bg-color: #b5b5b5;
    --theme-green: green;
}

body.dark-mode {
    --main-bg-color: black;
    --main-text-color: white;
    --popup-bg-color: #4a4a4a;
    --theme-green: #80ff80;
    /* No need to change these colors: grey/gray, lime, red, blue */
}

body {
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    min-width: 750px;
    min-height: 500px;
}

div {
    /* overflow: auto; - removed to prevent unwanted scrollbars */
}

article {
    width: 50%;
}

#Continue {
    float: right;
    margin-top: 20px;
    margin-right: 4px;
    display: inline-block;
    vertical-align: middle;
    background-color: Gray;
    visibility: hidden;
}

#RoomTitle {
    display: inline-block;
    width: 40%;
    text-align: center;
    font-family: sans-serif;
    font-weight: bold;
    font-size: large;
    border: 1px solid var(--theme-green);
    vertical-align: top;
    margin-top: 20px;
    margin-left: 7px;
}

table {
    width: 100%;
    height: 100%
}

#textbutton {
    opacity: 0.9;
    filter: alpha(opacity=90);
}

#textactionbutton {
    opacity: 0.9;
    filter: alpha(opacity=90);
}

#playernamebutton {
    opacity: 0.9;
    filter: alpha(opacity=90);
}

#playernametext {
    opacity: 0.9;
    filter: alpha(opacity=90);
}

#genderchoiceSelect {
    width: auto;
    opacity: 0.9;
    filter: alpha(opacity=90);
}

#playernametext {
    width: 100%;
}

.save-menu-content,
.modal-content {
    background-color: var(--main-bg-color);
    max-height: 80%;
    border: 1px solid grey;
    display: flex;
    flex-direction: column;
    margin: auto;
    margin-top: 40px;  /* menu height + 10 px */
}

.save-menu-content h3,
.modal-content h3 {
    margin: 0 0 4px 0;
}

.save-menu-content > *,
.modal-content > * {
    flex: 0 0 auto;
}

.save-menu-content .savegames-table {
    flex: 1 1 auto;
}

.savegames-header,
.modal-header,
.modal-body,
.modal-footer {
    margin: 8px;
    flex: 0 0 auto;
}

.modal-header {
    border-bottom: 1px solid var(--main-text-color);
}

.modal-footer {
    display: flex;
    justify-content: space-evenly;
}

.btn {
    border: 1px solid grey;
    background: lightgrey;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: #aaa;
}

[disabled] {
    cursor: not-allowed;
}

.btn.btn-danger {
    background: #ffb4b4;
}

.btn.btn-danger:hover {
    background: #d47979;
}

.dark-mod {
    .btn {
        background: #2c2c2c;
    }

    .btn:hover {
        background: #555;
    }

    .btn.btn-danger {
        background: #4b0000;
    }

    .btn.btn-danger:hover {
        background: #862B2B;
    }
}


.savegames-header button {
    margin-top: 4px;
}

.savegames-table {
    height: auto;
}

.savegames-table.btn {
    height: 100%;
    width: 100%;
}

.savegames-table th, .savegames-table td {
    text-align: left;
}

.savegames-table td {
    vertical-align: middle;
    border: none;
}

.savegames-table .save-name {
    width: 200px;
    border: none;
    resize: none;
    vertical-align: middle;
    max-height: 10em;
}

td {
    text-align: center;
}

#selectionmenu {
    z-index: 100;
    position: absolute;
    background-color: var(--main-bg-color);
    min-width: 200px;
    max-width: 300px;
    max-height: 300px;
    /* overflow: auto; - removed to prevent unwanted scrollbars */
    top: 50px;
    visibility: hidden;
    filter: alpha(opacity=60);
}

#Actionchoices {
    width: 100%;
    height: 100%;
}

#RoomObjectsPanel {
    display: inline-block;
    vertical-align: top;
    width: 16%;
    margin: 2px;
}

#RoomObjects {
    width: 97%;
    margin: 2px;
    height: 87%;
}

#VisibleCharactersPanel {
    display: inline-block;
    vertical-align: top;
    width: 15%;
    margin: 2px;
}

#VisibleCharacters {
    width: 97%;
    margin: 2px;
    height: 87%;
}

#InventoryPanel {
    display: inline-block;
    vertical-align: top;
    width: 16%;
    margin: 2px;
}

#Inventory {
    width: 97%;
    margin: 2px;
    height: 87%;
}

#Version {
    float: right;
    display: inline;
    margin-right: 20px;
    position: absolute;
    text-align: center;
    vertical-align: middle;
    margin-left: 20px;
}

#tooltip {
    z-index: 100;
    font-weight: bold;
    position: absolute;
    width: auto;
    height: 25px;
    background-color: var(--main-bg-color);
    visibility: hidden;
}

#MessagePane {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#MessagePane .message {
    background-color: rgba(128, 128, 128, 0.8);
    padding: 5px 10px;
    margin-top: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

#MessagePane .message.error {
    background-color: rgba(255, 128, 128, 0.8);
}

#MessagePane .message.warning {
    background-color: rgba(255, 192, 96, 0.8);
}

#MessagePane .message.success {
    background-color: rgba(128, 255, 128, 0.8);
}

.dark-mode {
    #MessagePane .message.error {
        background-color: rgba(128, 0, 0, 0.8);
    }

    #MessagePane .message.warning {
        background-color: rgba(159, 95, 0, 0.8);
    }

    #MessagePane .message.success {
        background-color: rgba(0, 128, 0, 0.8);
    }
}

#MessagePane .message-text {
    text-align: center;
}

#MessagePane .message-close {
    display: inline;
}

#MessagePane .message-close::after {
    content: 'X';
    color: var(--main-bg-color);
    margin-left: 1em;
    font-size: smaller;
    cursor: pointer;
    opacity: 0.5;
}

#MessagePane .message-close:hover::after {
    opacity: 1.0;
}

#options-form {
    display: flex;
    flex-direction: column;
}

#options-form input[name$="-volume"] {
    width: 3.5em;
}

#options-form input[name="history-size"] {
    width: 4em;
}

#options-form input[type="checkbox"] {
    margin-left: 0;
}

#options-form label {
    padding-left: 3px;
    display: flex;
    gap: 0.25em;
}

* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
}

/* main page layout */

body {
    display: flex;
    flex-direction: column;
    position: absolute;
    overflow-y: hidden;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: 0;
}

#menu {
    top: 0;
    display: inline-block;
    flex: 0 0 auto;
}

.mainrow {
    position: relative;
    flex: 1 1 auto;
    display: flex;
}

#PlayerRow {
    display: flex;
    height: 30%;
    flex: 0 0 auto;
}

.big-picture-mode #PlayerRow {
    height: 10%;
}

#statusbar {
    height: 30px;
    flex: 0 0 auto;
    padding: 10px;
    position: static;
    display: flex;
    align-items: center;
}

/* Package progress indicator */
.package-progress-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: auto;
    cursor: pointer;
    transition: opacity 0.2s;
}

.package-progress-indicator:hover {
    opacity: 0.8;
}

.package-progress-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 12px;
    min-width: 250px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    pointer-events: none;
    font-family: sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

/* mainrow */

#roompanel {
    display: flex;
    flex-direction: column;
    height: auto;
    position: static;
    width: 40%;
}

#MainText {
    padding: 0.5rem 1.5rem 1rem 1.5rem;
    height: 270px;
    flex: 1 1 auto;
    overflow-y: scroll;
    overflow-x: hidden;
    box-sizing: border-box;
}

#MainText hr {
    border: none;
    border-top: 1px dashed grey;
}


#RoomBar {
    display: flex;
    align-items: center;
    border: 0;
    border-top: 1px solid grey;
}

#Continue {
    margin-top: 0;
    margin-left: 0.75rem;
    font-size: 14px;
    font-family: var(--font-game-text);
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    user-select: none;
    opacity: 0.2;
    pointer-events: none;
    flex-shrink: 0;
    visibility: visible !important; /* Override style.css */
}

#Continue:not([disabled]) {
    opacity: 1;
    pointer-events: auto;
}

#Continue:hover:not([disabled]) {
    background: linear-gradient(to bottom, #f9f9f9, #e9e9e9);
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#Continue:active:not([disabled]) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dark-mode #Continue {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode #Continue:hover:not([disabled]) {
    background: linear-gradient(to bottom, #4a4a4a, #3a3a3a);
    border-color: rgba(255, 255, 255, 0.3);
}

/* menu row */

#menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px;
}

.menuitem {
    flex: 0 1 auto;
}

.game-version {
    font-size: small;
}

/* playerrow */

.compass-and-portrait {
    width: 40%;
    display: flex;
}

.compass-and-portrait > * {
    border-right: 1px solid grey;
}

.compass-up-down, .compass-rose {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-up-down {
    flex: 0 0 10%;
}

.compass-rose {
    flex: 0 0 50%;
}

.portrait-holder {
    position: relative;
    overflow: hidden;
    flex: 1 1 auto;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-direction-rows {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.compass-direction-row {
    display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    height: 33%;
}

.compass-direction-row > div {
    flex: 1 1 auto;
    margin: 2px;
    width: 33%;
}

/* other stuff */

#RoomThumb, #RoomThumbImg {
    border: 2px solid transparent;
}

#RoomThumbImg {
    margin: 0;
}

#RoomThumbHolder {
    position: relative;
    height: 60px;
    width: 60px;
    flex-shrink: 0;
}

#RoomTitle {
    flex: 1 1 auto;
    padding-left: 10px;
    text-align: left;
    margin: 0;
    display: block;
    border: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* Allow flex item to shrink */
    max-width: 100%; /* Ensure it doesn't exceed container */
    line-height: 1.5rem;
    cursor: help;
}

#RoomThumbImg.has-actions, #PlayerImg.has-actions {
    border: 2px solid var(--theme-green);
    cursor: default;
}

#RoomThumbImg, .RoomLayeredImage,
#PlayerImg, .PortraitLayeredImage,
#MainImg, .MainLayeredImage {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

#MainVideo,
#MainVideo video {
    width: 100%;
    height: 100%;
}

#RoomThumbImg, .RoomLayeredImage,
#PlayerImg, .PortraitLayeredImage,
#MainImg, .MainLayeredImage,
.compass-rose, .compass-up-down {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#MainImg, .MainLayeredImage {
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

#RoomThumbImg, .RoomLayeredImage,
#PlayerImg, .PortraitLayeredImage {
    top: 2px;
    left: 2px;
    bottom: 2px;
    right: 2px;
}

#inputmenu, #cmdinputmenu, #playernamechoice, #genderchoice, #textchoice, #textactionchoice {
    position: absolute;
    background-color: var(--main-bg-color);
    border: 1px solid grey;
    visibility: hidden;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.8;
    text-align: left;
    max-height: 100%;
}

#inputmenu:not(.cancellable) #CancelInput {
    display: none;
}

#cmdinputmenu:not(.cancellable) #cmdCancelInput {
    display: none;
}

#cmdinputmenu {
    /* Show scrollbars if needed */
    max-height: 100%;
    max-width: 100%;
}

#playernamechoice, #textchoice, #textactionchoice {
    padding: 10px;
}

#playernamechoice input, #textchoice input, #textactionchoice input {
    margin: 10px 0;
    font-size: 24px;
}

.picpanel {
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.inputmenuholder {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#inputchoices, #cmdinputchoices {
    opacity: 0.9;
    filter: alpha(opacity=90);
}

#InputMenuTitle, #cmdInputMenuTitle, #playernameMenuTitle, #genderMenuTitle, #textMenuTitle, #textactionMenuTitle {
    font-weight: 600;
    font-size: 18px;
    padding: 16px 20px;
    color: var(--main-text-color);
}

#inputchoices .inputchoices, #cmdinputchoices .inputchoices, .genderchoiceSelect {
    cursor: pointer;
    padding: 12px 20px;
    margin: 5px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    text-align: center;
    min-width: 120px;
}

.dark-mode #inputchoices .inputchoices,
.dark-mode #cmdinputchoices .inputchoices,
.dark-mode .genderchoiceSelect {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: var(--main-text-color);
}

#inputchoices .inputchoices:hover,
#cmdinputchoices .inputchoices:hover,
.genderchoiceSelect:hover {
    background: linear-gradient(to bottom, #f9f9f9, #e9e9e9);
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.dark-mode #inputchoices .inputchoices:hover,
.dark-mode #cmdinputchoices .inputchoices:hover,
.dark-mode .genderchoiceSelect:hover {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.3);
}

.genderchoiceSelect.selected,
#inputchoices .inputchoices.selected,
#cmdinputchoices .inputchoices.selected {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.15));
    border-color: var(--main-text-color);
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dark-mode .genderchoiceSelect.selected,
.dark-mode #inputchoices .inputchoices.selected,
.dark-mode #cmdinputchoices .inputchoices.selected {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.15));
    border-color: var(--main-text-color);
}

.genderchoiceSelect:focus {
    outline: 2px solid var(--main-text-color);
    outline-offset: 2px;
}

.genderchoiceSelect {
    user-select: none;
    -webkit-user-select: none;
}

#genderchoice {
    outline: none;
}

#genderchoice:focus {
    outline: none;
}

#inputchoices .inputchoices:empty, 
#cmdinputchoices .inputchoices:empty {
    padding: 0;
    margin: 0;
}

#inputchoices .inputchoices:hover,
#cmdinputchoices .inputchoices:hover {
    background-color: var(--popup-bg-color);
    color: var(--main-text-color);
}

#CancelInput, #cmdCancelInput {
    margin: 10px;
    width: 100px;
}

#RoomObjects .RoomObjects:not(.no-actions):hover,
#Inventory .RoomObjects:not(.no-actions):hover,
#VisibleCharacters .VisibleCharacters:not(.no-actions):hover,
#Actionchoices .ActionChoices:not(.no-actions):hover
{
    cursor: default;
    background-color: var(--popup-bg-color);
}

.RoomObjects, .VisibleCharacters {
    padding: 8px;
    margin: 4px 0;
}

/* Center titles and style them */
#RoomObjectsTitle,
#VisibleCharactersTitle,
#InventoryTitle {
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
    padding: 4px 0;
    font-family: var(--font-title, 'Playfair Display', Georgia, serif);
}

.no-actions {
    font-style: italic;
    color: grey;
}

#RoomObjectsPanel, #VisibleCharactersPanel, #InventoryPanel {
    border: 0;
    flex: 1 1 auto;
}

#PlayerImg,
#RoomThumbImg,
#RoomObjects,
#VisibleCharacters,
#Inventory,
#selectionmenu,
#PlayerRow,
#cmdinputmenu,
#tooltip
{
    border: 1px solid grey;
}

#RoomObjects, #VisibleCharacters, #Inventory {
    overflow: auto;
}

#menu {
    border-bottom: 1px solid grey;
}

#roompanel {
    border-right: 1px solid grey;
}

#MainImg {
    border-left: none;
}

.compass-center {
    position: relative;
}

#bIn, #bOut
{
    position: absolute;
    z-index: 1;
    opacity:0.7;
    left: 0;
    right: 0;
    width: 100%;
    height: 50%;
    display: none;
}

#bIn.active, #bOut.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

#bIn {
    top: 0;
}

#bOut
{
    bottom: 0;
}

.big-picture-mode .compass-direction {
    /* When UI is shrunk */
    font-size: small;
}

.compass-direction {
    visibility: hidden;
    overflow: hidden;
}

.compass-direction.active {
    cursor: pointer;
    visibility: visible;
    /* opacity: 0.5; */
    /* background-color: var(--theme-green); */
    border: 1px solid var(--main-text-color);
    font-weight: bold;
    display: flex;
    text-align: center;
    justify-content: center;
    flex-direction: column;
    /* Only make the background transparent, not the text */
    background-color: rgba(0, 128, 0, 0.6);
}

.dark-mode .compass-direction.active {
    background-color: rgba(0, 80, 0, 0.6);
}

.compass-direction.active:hover {
    opacity: 0.75;
}

.hidden {
    display: none !important;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    display: flex;
}

.cheat-menu-content, .import-menu-content, .export-menu-content {
    font-family: sans-serif;
    padding: 15px;
    position: fixed;
    border: 1px solid grey;
    background: var(--main-bg-color);
    display: flex;
    flex-direction: column;
}

.cheat-menu-content {
    top: 15%;
    right: 20%;
    left: 20%;
    bottom: 15%;
}

.import-menu-content, .export-menu-content {
    top: 35%;
    right: 35%;
    left: 35%;
    text-align: center;
}

.export-menu-content a {
    font-size: 32px;
}

.import-menu-content input {
    margin: 20px 0;
}

.import-menu-status {
    margin-bottom: 5px;
}

.cheat-menu-title, .cheat-menu-subtitle {
    flex: 0 0 auto;
}

.cheat-menu-scrollable {
    flex: 1 1 auto;
}

.cheat-menu-scrollable th, .cheat-menu-scrollable td {
    text-align: left;
    vertical-align: top;
}

.cheat-menu-scrollable td {
    padding: 5px 2px;
}

.cheat-menu-variables-body .desc-cell {
    max-width: 200px;
    font-size: 13px;
}

.cheat-menu-actions {
    flex: 0 0 auto;
    text-align: right;
}

.cheat-menu-content h1 {
    margin: 0;
}

.freeze-button.frozen {
    background-color: #00e7ff;
}

.dark-mode .freeze-button.frozen {
    /* No change, lightness is 50% */
    background-color: #00e7ff;
}

.live-timer-display {
    z-index: 1;
    position: absolute;
    right: 0;
    bottom: 0;
}

/* Icon button state (collapsed) */
.live-timer-icon-button {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid var(--main-text-color);
    border-radius: 8px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    box-shadow: -2px -2px 8px rgba(0, 0, 0, 0.2);
}

.live-timer-icon-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.dark-mode .live-timer-icon-button {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.dark-mode .live-timer-icon-button:hover {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

/* Expanded content state */
.live-timer-expanded-content {
    display: none;
    background-color: var(--main-bg-color);
    border: 1px solid var(--main-text-color);
    border-radius: 8px 0 0 0;
    box-shadow: -2px -2px 8px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    overflow: hidden;
}

/* Hide icon button when expanded */
.live-timer-display.expanded .live-timer-icon-button {
    display: none;
}

/* Show expanded content when expanded */
.live-timer-display.expanded .live-timer-expanded-content {
    display: block;
}

/* Hide expanded content (including H4) when NOT expanded */
.live-timer-display:not(.expanded) .live-timer-expanded-content {
    display: none;
}

/* Hide any H4 that's not inside expanded content (legacy cleanup) */
.live-timer-display:not(.expanded) > h4 {
    display: none;
}

.live-timer-display table {
    border-collapse: collapse;
    width: 100%;
}

.live-timer-display h4 {
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    position: relative;
}

.live-timer-display h4:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.live-timer-display h4::after {
    content: '×';
    float: right;
    font-size: 16px;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.live-timer-display h4:hover::after {
    opacity: 1;
}

.dark-mode .live-timer-display h4 {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.dark-mode .live-timer-display h4:hover {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.live-timer-display-rows td {
    padding: 8px 12px;
    font-size: 13px;
}

.live-timer-display-rows tr {
    transition: background-color 0.15s ease;
}

.live-timer-display-rows tr:hover td {
    background-color: rgba(102, 126, 234, 0.1);
    cursor: pointer;
}

.dark-mode .live-timer-display-rows tr:hover td {
    background-color: rgba(102, 126, 234, 0.2);
}

.live-timer-display-rows tr:not(:last-child) td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .live-timer-display-rows tr:not(:last-child) td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-action-btn {
    padding: 4px 8px;
    margin: 0 2px;
    font-size: 12px;
    border: 1px solid var(--main-text-color);
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    transition: all 0.15s ease;
}

.timer-action-btn:hover {
    background-color: var(--popup-bg-color);
}

.timer-skip-btn {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.timer-skip-btn:hover {
    background-color: #764ba2;
}

.timer-cancel-btn {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.timer-cancel-btn:hover {
    background-color: #c0392b;
}

.bad-media {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: gray;
    color: darkred;
    z-index: -1;
    text-align: center;
}

#sfx_button, #music_button, #history_button {
    width: 1.6em;
    height: 1.6em;
    display: inline-block;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

#sfx_button {
    /* Remind icons created by doraclub - Flaticon (https://www.flaticon.com/free-icons/remind) */
    background-image: url('../images/sfx-on.png');
}

#sfx_button.off {
    /* Remind icons created by doraclub - Flaticon (https://www.flaticon.com/free-icons/remind) */
    background-image: url('../images/sfx-off.png');
}

#music_button {
    /* Music icons created by Freepik - Flaticon (https://www.flaticon.com/free-icons/music) */
    background-image: url('../images/music-on.png');
}

#music_button.off {
    /* Music icons created by Freepik - Flaticon (https://www.flaticon.com/free-icons/music) */
    background-image: url('../images/music-off.png');
}

#history_button {
    /* History icons created by Freepik - Flaticon (https://www.flaticon.com/free-icons/history) */
    background-image: url('../images/history-on.png');
}

#history_button.off {
    /* History icons created by Freepik - Flaticon (https://www.flaticon.com/free-icons/history) */
    background-image: url('../images/history-off.png');
}

.RoomObjects,
.ActionChoices,
.compass-direction,
.inputchoices,
button,
label {
    user-select: none;
}

.ps {
    position: relative;
}

/**
 * Modern UI Styles
 * Typography, buttons, and dialog components
 */

/* Split.js Gutter Styling */
.gutter {
    background-color: var(--border-color, rgba(0, 0, 0, 0.1));
    background-repeat: no-repeat;
    background-position: 50%;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.gutter:hover {
    background-color: var(--border-color-hover, rgba(0, 0, 0, 0.2));
}

.dark-mode .gutter {
    background-color: var(--border-color, rgba(255, 255, 255, 0.1));
}

.dark-mode .gutter:hover {
    background-color: var(--border-color-hover, rgba(255, 255, 255, 0.2));
}

.gutter.gutter-horizontal {
    cursor: col-resize;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
}

.gutter.gutter-vertical {
    cursor: row-resize;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
}

/* Split.js container styling */
#player-row-panels-container {
    display: flex;
    flex: 1;
    min-width: 0; /* Allow flex item to shrink */
}

/* Ensure split elements can be sized by Split.js */
.split {
    display: flex;
}

.split.split-horizontal {
    flex-direction: row;
}

.split.split-vertical {
    flex-direction: column;
}

/* Typography - Google Fonts */
:root {
    --font-game-text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-title: 'Playfair Display', Georgia, serif;
}

/* Game text font - easy to read, easy on the eyes */
#MainText {
    font-family: var(--font-game-text);
    font-size: 15px;
    line-height: 1.6;
}

/* Paragraph spacing in MainText */
#MainText .maintext-paragraph {
    margin-bottom: 1rem;
}

#MainText .maintext-paragraph:last-child {
    margin-bottom: 0;
}

/* Title font - for game title, version, room titles, etc. */
.game-title,
.game-version,
#RoomTitle,
.modern-dialog-title,
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 600;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.game-version {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
}

#RoomTitle {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Modern Button Styling */
#menu button,
.btn {
    font-family: var(--font-game-text);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    user-select: none;
}

#menu button:hover,
.btn:hover {
    background: linear-gradient(to bottom, #f9f9f9, #e9e9e9);
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#menu button:active,
.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#menu button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#menu button:disabled:hover,
.btn:disabled:hover {
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: none;
}

.btn-danger {
    background: linear-gradient(to bottom, #dc3545, #c82333);
    color: white;
    border-color: #bd2130;
}

.btn-danger:hover {
    background: linear-gradient(to bottom, #c82333, #bd2130);
    border-color: #a71e2a;
}

.dark-mode #menu button,
.dark-mode .btn {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode #menu button:hover,
.dark-mode .btn:hover {
    background: linear-gradient(to bottom, #4a4a4a, #3a3a3a);
    border-color: rgba(255, 255, 255, 0.3);
}

.dark-mode .btn-danger {
    background: linear-gradient(to bottom, #a71e2a, #8b1a24);
    border-color: #7a1620;
}

.dark-mode .btn-danger:hover {
    background: linear-gradient(to bottom, #8b1a24, #7a1620);
}

/* Disable hover effects for disabled buttons in dark mode */
.dark-mode #menu button:disabled:hover,
.dark-mode .btn:disabled:hover {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: none;
}

/* Disable hover effects for disabled danger buttons */
.btn-danger:disabled:hover {
    background: linear-gradient(to bottom, #dc3545, #c82333);
    border-color: #bd2130;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: none;
}

.dark-mode .btn-danger:disabled:hover {
    background: linear-gradient(to bottom, #a71e2a, #8b1a24);
    border-color: #7a1620;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: none;
}

/* Modern Dialog Component */
.modern-dialog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

/* Ensure nested dialogs have higher z-index */
.modern-dialog-backdrop .modern-dialog-backdrop {
    z-index: 1001;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modern-dialog-content {
    background: var(--main-bg-color, white);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.2s ease;
    overflow: hidden;
}

/* Ensure dialog has solid background in light mode */
body:not(.dark-mode) .modern-dialog-content {
    background: white;
}

.dark-mode .modern-dialog-content {
    background: var(--main-bg-color, black);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modern-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    flex: 0 0 auto;
}

.modern-dialog-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--main-text-color);
}

.modern-dialog-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--main-text-color);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.modern-dialog-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.dark-mode .modern-dialog-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modern-dialog-divider {
    margin: 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex: 0 0 auto;
}

.dark-mode .modern-dialog-divider {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.modern-dialog-body {
    padding: 24px;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Important for flex children to respect overflow */
}

.modern-dialog-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

/* Updated Save/Load Menu */
.savegames-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex: 0 0 auto;
}

.paginated-table {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.pagination-controls {
    flex: 0 0 auto;
}

.pagination-controls .btn.active {
    background-color: rgba(0, 0, 0, 0.2) !important;
    font-weight: bold !important;
    border: 2px solid var(--main-text-color) !important;
}

.dark-mode .pagination-controls .btn.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: var(--main-text-color) !important;
}

.savegames-table {
    overflow-y: auto;
    max-height: 500px;
    width: 100%;
}

.savegames-table table,
.cheat-tab-content table,
.paginated-table table {
    table-layout: fixed;
    width: 100%;
}

.savegames-table table {
    width: 100%;
    border-collapse: collapse;
}

.savegames-table th,
.savegames-table td {
    padding: 0.5rem;
    text-align: left;
    vertical-align: middle;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    background-color: transparent;
    height: 76px;
    line-height: 1.33rem;
}

.savegames-table tbody tr:last-child td {
    border-bottom: none;
}

.dark-mode .savegames-table tbody tr:last-child td {
    border-bottom: none;
}

.dark-mode .savegames-table th,
.dark-mode .savegames-table td {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background-color: transparent;
}

.savegames-table th {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--main-text-color);
    opacity: 0.9;
    text-transform: none;
    background-color: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
    height: 76px !important;
}

.dark-mode .savegames-table th {
    border-bottom-color: rgba(255, 255, 255, 0.15);
    background-color: transparent;
}

.savegames-table tbody tr {
    border: none;
    background-color: transparent;
    height: 76px;
}

.savegames-table tbody tr:not(.empty-row):hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.savegames-table tbody tr:not(.empty-row):hover td {
    background-color: transparent !important;
}

.dark-mode .savegames-table tbody tr:not(.empty-row):hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.dark-mode .savegames-table tbody tr:not(.empty-row):hover td {
    background-color: transparent !important;
}

/* Apply same styling to all paginated tables */
.cheat-tab-content table th,
.cheat-tab-content table td,
.paginated-table table th,
.paginated-table table td {
    padding: 0.5rem;
    text-align: left;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    background-color: transparent;
    height: 70px;
    line-height: 1.33rem;
}

/* Override for savegames table to use 76px - must come after general rule */
.savegames-table.paginated-table table th,
table.savegames-table th,
.savegames-table table th {
    height: 76px !important;
}

.dark-mode .cheat-tab-content table th,
.dark-mode .cheat-tab-content table td,
.dark-mode .paginated-table table th,
.dark-mode .paginated-table table td {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.cheat-tab-content table tbody tr,
.paginated-table table tbody tr {
    border: none;
    background-color: transparent;
    height: 70px;
}

.cheat-tab-content table tbody tr:not(.empty-row):hover,
.paginated-table table tbody tr:not(.empty-row):hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.cheat-tab-content table tbody tr:not(.empty-row):hover td,
.paginated-table table tbody tr:not(.empty-row):hover td {
    background-color: transparent !important;
}

.dark-mode .cheat-tab-content table tbody tr:not(.empty-row):hover,
.dark-mode .paginated-table table tbody tr:not(.empty-row):hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.dark-mode .cheat-tab-content table tbody tr:not(.empty-row):hover td,
.dark-mode .paginated-table table tbody tr:not(.empty-row):hover td {
    background-color: transparent !important;
}

.savegames-table {
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.dark-mode .savegames-table {
    border: none;
}

.save-name {
    width: 100%;
    min-width: 200px;
    padding: 6px 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: var(--font-game-text);
    resize: none;
    font-size: 14px;
}

.dark-mode .save-name {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--main-text-color);
}

.name-column {
    min-width: 250px;
}

.rename-save {
    margin-left: 8px;
    font-size: 12px;
    padding: 4px 8px;
}

/* Options Menu Updates */
#options-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: var(--font-game-text);
}

#options-form label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-game-text);
    font-size: 14px;
}

#options-form input[type="number"] {
    padding: 6px 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: var(--font-game-text);
    width: 80px;
}

#options-form input[type="range"] {
    flex: 1;
    max-width: 200px;
}

.dark-mode #options-form input[type="number"],
.dark-mode #options-form input[type="range"] {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--main-text-color);
}

#options-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

#options-form br {
    margin: 8px 0;
}

/* Menu bar improvements */
#menu {
    padding: 8px 20px;
    gap: 12px;
}

#menu button {
    margin: 0;
}

.menuitem {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cheat Menu Tabs */
.cheat-tab-buttons {
    background-color: var(--main-bg-color);
}

.cheat-tab-button {
    color: #000 !important;
    background-color: transparent !important;
}

body.dark-mode .cheat-tab-button {
    color: #fff !important;
}

.cheat-tab-button:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

body.dark-mode .cheat-tab-button:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.cheat-tab-button.active {
    color: #000 !important;
    background-color: var(--main-bg-color) !important;
    font-weight: 600;
}

body.dark-mode .cheat-tab-button.active {
    color: #fff !important;
}

.cheat-menu-tabs {
    min-width: 1000px;
    min-height: 600px;
    max-width: 95vw;
    max-height: 85vh;
}

/* Fixed height for cheat dialog */
.cheat-menu-dialog .modern-dialog-content {
    height: 85vh;
    max-height: 85vh;
}

.cheat-menu-dialog .modern-dialog-body {
    padding: 0 !important; /* No padding - tabs are directly attached to divider */
    height: calc(85vh - 140px); /* Subtract header and footer heights */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* User selection rules - disable selection globally, then enable for specific elements */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow selection in main text area */
#MainText,
#MainText * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Allow selection in inputs, textareas, and selects */
input,
textarea,
select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Allow selection in tbody of paginated tables (not thead) */
.paginated-table tbody,
.paginated-table tbody * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Cheat menu input styling */
.cheat-tab-content input[type="text"],
.cheat-tab-content input[type="number"],
.cheat-tab-content textarea,
.cheat-tab-content select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px;
    font-family: var(--font-game-text);
    font-size: 14px;
    background: var(--main-bg-color);
    color: var(--main-text-color);
    outline: none;
}

.cheat-tab-content input[type="text"]:focus,
.cheat-tab-content input[type="number"]:focus,
.cheat-tab-content textarea:focus,
.cheat-tab-content select:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.4) !important;
}

.dark-mode .cheat-tab-content input[type="text"],
.dark-mode .cheat-tab-content input[type="number"],
.dark-mode .cheat-tab-content textarea,
.dark-mode .cheat-tab-content select {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08);
    color: var(--main-text-color);
}

.dark-mode .cheat-tab-content input[type="text"]:focus,
.dark-mode .cheat-tab-content input[type="number"]:focus,
.dark-mode .cheat-tab-content textarea:focus,
.dark-mode .cheat-tab-content select:focus {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* General input/textarea/select styling for dark mode */
.dark-mode input[type="text"],
.dark-mode input[type="number"],
.dark-mode textarea,
.dark-mode select {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08);
    color: var(--main-text-color);
}

.dark-mode input[type="text"]:focus,
.dark-mode input[type="number"]:focus,
.dark-mode textarea:focus,
.dark-mode select:focus {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Improved selection menu (custom context menu) styling */
#selectionmenu {
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: var(--main-bg-color);
    padding: 4px 0;
    min-width: 200px;
    max-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.dark-mode #selectionmenu {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#Actionchoices {
    padding: 0;
}

#Actionchoices .ActionChoices {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
    line-height: 1.5;
}

#Actionchoices .ActionChoices:last-child {
    border-bottom: none;
}

#Actionchoices .ActionChoices:not(.no-actions):hover {
    background-color: var(--popup-bg-color);
}

.dark-mode #Actionchoices .ActionChoices {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode #Actionchoices .ActionChoices:not(.no-actions):hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Cheat menu table styling */
.cheat-tab-content table {
    width: 100%;
    border-collapse: collapse;
}

.cheat-tab-content table th,
.cheat-tab-content table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: 60px;
    vertical-align: middle;
}

.dark-mode .cheat-tab-content table th,
.dark-mode .cheat-tab-content table td {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.cheat-tab-content table th:last-child,
.cheat-tab-content table td:last-child {
    text-align: right;
}

.cheat-tab-content table th:last-child {
    /* Remove header text for actions column */
    font-weight: normal;
    color: transparent;
    user-select: none;
    pointer-events: none;
}

.cheat-tab-content table th:last-child::before {
    content: '';
}

.cheat-tab-content {
    overflow-y: auto;
    overflow-x: hidden;
}

