h1 {
    user-select: none;
    font-size: 40px;
    text-align: center;
    line-height: 3;
    color: #ffffcc;
}

h2 {
    user-select: none;
    font-size: 24px;
    text-align: center;
    line-height: 3;
    color: #ffffcc;
    margin-bottom: 12px;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 1.6em;
    color: #8899AA;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000;
}

a {
    color: #FF9900;
    text-decoration: none;
}

    a:hover {
        color: #FFCC00;
    }


p {
    margin-bottom: 24px;
}

.collapsible-list {
    width: auto;
    height: auto;
}

.list-header {
    user-select: none;
    padding: 4px;
    background-color: #557733;
    color: #FFCC00;
    border-radius: 8px;
    border: 2px solid #FFCC00;
    cursor: pointer;
}

    .list-header:hover {
        background-color: #225566;
    }

.list-header-expanded {
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    border-bottom-width: 0px;
}

.list-footer {
    padding: 4px;
    background-color: #557733;
    color: #FFCC00;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border: 2px solid #FFCC00;
    border-top-width: 0px;
}

    .list-footer:hover {
        background-color: #225566;
    }

.list-container {
    display: block;
    border: 2px solid #FFCC00;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 360px;
}

.thead-top-padding {
    position: sticky;
    top: 0px;
    height: 8px;
    width: 100%;
    z-index: 9;
    background-color: #666655;
}

thead {
    position: sticky;
    top: 8px;
    z-index: 10;
    background-color: #FFCC00;
}

.ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.list {
    margin-top: -8px;
    border: none;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.list-row {
    width: 100%;
    position: relative;
}

.list-header-cell {
    background-color: #225566;
    color: #FFCC00;
    text-align: center;
    padding: 2px;
    overflow-wrap: break-word;
}

.list-cell {
    padding: 2px;
    overflow-wrap: break-word;
}

table th {
    border-top: 2px solid #FFCC00;
    border-right: 2px solid #FFCC00;
    border-bottom: 2px solid #FFCC00;
}

    table th:first-child {
        border-left: 2px solid #FFCC00;
    }

table td {
    border-right: 2px solid #444433;
    border-bottom: 2px solid #444433;
}  

    table td:first-child {
        border-left: 2px solid #444433;
    }

.spinner {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #557733;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
        border-top-color: #557733;
    }

    50% {
        transform: rotate(180deg);
        border-top-color: #AAAA44;
    }

    100% {
        transform: rotate(360deg);
        border-top-color: #557733;
    }
}

.custom-dropdown {
    user-select: none;
    position: relative;
    display: block;
}

.dropdown-toggle {
    padding: 2px 4px;
    padding-right: 24px;
    border: 2px solid #FFCC00;
    border-radius: 4px;
    background-color: #225566;
    color: #FFCC00;
    cursor: pointer;
    height: 28px;
    overflow-x: visible;
    min-width: 120px;
    cursor: pointer;
}
    .dropdown-toggle > span {
        top: 0px;
        right: 2px;
        position: absolute;
    }

    .dropdown-toggle.open {
        border-bottom-left-radius: 0px;
        border-bottom-right-radius: 0px;
    }

    .dropdown-toggle.disabled {
        background-color: #666655 !important;
        color: #888877 !important;
        cursor: auto;
    }

.dropdown-menu {
    display: block;
    position: absolute;
    background-color: #666655;
    color: #FFCC00;
    border: 2px solid #FFCC00;
    border-top-width: 0px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    padding: 0;
    list-style: none;
    margin: 0;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1000;
    min-width: 100%;
    white-space: nowrap;
    overflow: visible;
    max-width: none;
}

    .dropdown-menu li {
        padding: 8px 16px;
        cursor: pointer;
    }

        .dropdown-menu li:hover {
            background-color: #888877;
        }

.tooltip {
    position: relative;
}

.tooltip.with-indicator {
    border-bottom: 1px dotted #FFCC00;
    cursor: help;
}

.tooltip .tooltiptext {
    display: inline-block;
    visibility: hidden;
    background-color: #557733;
    color: #FFCC00;
    text-align: center;
    border-radius: 4px;
    padding: 0;
    margin: 0;
    position: absolute;
    z-index: 1;
    left: 0;
    top: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

    /*.tooltip .tooltiptext::after {
        content: "";
        position: relative;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #557733 transparent transparent transparent;
    }*/

    .tooltip:hover .tooltiptext {
        visibility: visible;
        opacity: 1;

    }

    .tooltip .tooltiptext:not(:empty):has(img) {
        background-color: transparent;
    }

.language-dropdown {
    min-width: 160px;
}

.version-dropdown {
    min-width: 270px;
}

.class-dropdown {
    min-width: 150px;
}

.custom-button {
    position: relative;
    display: inline-block;
    user-select: none;
    padding: 4px;
    background-color: #557733;
    color: #FFCC00;
    border-radius: 8px;
    border: 2px solid #FFCC00;
    cursor: pointer;
    text-align: center;
}

    .custom-button .tooltiptext {
        visibility: hidden;
        opacity: 0;
        min-width: 280px;
        position: absolute;
        z-index: 1;
        top: 110%;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.8rem;
        background-color: #557733;
        color: #FFCC00;
        text-align: center;
        border-radius: 4px;
        padding: 0;
        margin: 0;
        transition: opacity 0.3s;
        border: 2px solid #FFCC00;
    }
     
    .custom-button:hover
    {
        background-color: #225566;
    }

    .custom-button:hover {
        background-color: #225566;
    }

        .custom-button:hover .tooltiptext {
            visibility: visible;
            opacity: 1;
        }

.custom-button.disabled {
    background-color: #666655 !important;
    color: #888877 !important;
    cursor: auto;
}

.image-wrapper {
    position: relative;
    display: inline-block;
}

    .image-wrapper img {
        display: block;
    }

.edit-icon {
    position: absolute;
    top: 0.75vw;
    right: 0.75vw;
    width: 0.75vw !important;
    height: 0.75vw !important;
    font-size: 0.75vw !important;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper .edit-icon .material-icons {
    font-size: 200%;
    width: 200%;
    height: 200%;
    line-height: 1;
}

.yellow {
    color: #FFCC00;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal {
    background: #444433;
    padding: 1rem;
    border-radius: 8px;
    width: 90vw;
    height: 90vh;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.image-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.1s ease;
}

    .image-item:hover {
        image-rendering: pixelated;
        transform: scale(1.1);
        transform-origin: center center;
    }

.savegame-row:hover {
    color: #ff9900;
    cursor: pointer;
}

.error {
    color: #ee4422;
    text-align: center;
}

.custom-input {
    padding: 8px 12px;
    font-size: 1rem;
    width: 100%;
    height: 28px;
}

input.custom-input {
    background-color: #444433;
    border: 2px solid #222211;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
}

    .custom-input:focus {
        border-color: #FFCC00;
        color: #FFCC00;
    }

.input-icons {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    pointer-events: none;
}

.input-container {
    position: relative;
}

.input-arrow-icon {
    display: block;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    overflow: hidden;
}

.char-stat-grid-1 {
    display: grid;
    grid-template-columns: 1fr 8fr 4fr 8fr;
    gap: 0.5rem;
    align-items: center;
    white-space: nowrap;
}

.char-stat-grid-2 {
    display: grid;
    grid-template-columns: 1fr 8fr 1fr 8fr;
    gap: 0.5rem;
    align-items: center;
    white-space: nowrap;
}

.warn-button {
    background-color: #ee4422;
    color: #FFCC00;
}

.small-text {
    font-size: 0.8em;
}

.item-slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    font-size: 1rem;
    background-color: #444433;
    border: 2px solid #222211;
    border-radius: 0px;
    outline: none;
    transition: border-color 0.2s ease;
    aspect-ratio: 1;
    cursor: pointer;
}

    .item-slot .image-wrapper {
        display: block;
        width: 50%;
        height: auto;
    }

.item-amount {
    position: absolute;
    bottom: 1px;
    right: 1px;
    font-size: 1em;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.pick-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.5rem;
}

.item-type-dropdown {
    min-width: 350px;
}

.material-icons.disabled {
    color: #888877 !important;
    cursor: auto;
}