body {
    font-family: Arial, sans-serif;
    margin: 20px;
    padding: 0;
    background-color: #222;
    color: white;
    overflow-x: hidden;
}

.container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

button, select, input, textarea{
    color: #fff;
    border-radius: 4px;
    background-color: #22222290;
    border: 1px solid black;
}
select, input, textarea{
    margin-right: 4px
}
.header {
    display: block;
    align-items: center;
    background-color: #444444aa;
    border-radius: 10px;
}

.choice-box {
    background-color: #11111180;
    padding: 8px 12px;
    border-radius: 4px;
}
.character-desc button{
    margin-right: 4px
}
.profile-card {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    justify-content: flex-start;
}

.randomise {
    width: 24px;
    height: 24px;
    text-align: center;
    padding: 0
}

.choice-box {
    display: flex;
    gap: 2px;
    align-items: center;
}

.class-card {
    margin-bottom: 12PX;
    ;
}

.info-card,
.class-card {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap
}

.character-desc {
    display: flex;
    font-size: 14px;
    color: #bbb;
    padding: 4px;
    margin: 4px 0;
    width: 100%;
    align-items: center;
    gap: 8px
}

.name {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 320px
}

.character-description {
    display: block;
    font-size: 14px;
    color: #fff;
    background-color: #00000020;
    padding: 4px;
    margin: 4px 0;
    flex: 1 0 auto;
    resize: vertical;
    width: 90%;
    min-height: 24px;
    field-sizing: content;
}

.header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.character-name {
    font-size: 24px;
    font-weight: bold;
    width: 90%;
}

.stats-container {
    display: flex;
    gap: 10px;
}

.stat-box {
    border: 2px solid #900;
    padding: 10px;
    text-align: center;
    background-color: #444;
    border-radius: 5px;
    width: 60px;
}

.stat-box p {
    margin: 5px 0;
}

.skills-table,
.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.skills-table td,
.skills-table th,
.stats-table td,
.stats-table th {
    border: 1px solid #900;
    padding: 5px;
    text-align: center;
}





#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    /* Dark semi-transparent background */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    z-index: 9999;
    /* Ensure it's above everything */
    display: none;
    /* Hidden by default */
}

/* Optional: Add a loading animation */
.loading-content p {
    animation: fadeInOut 1s infinite alternate;
}

@keyframes fadeInOut {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.character-sheet {
    margin-top: 24px;
    display: block;
    align-items: center;
    background-color: #444;
    border-radius: 10px;
    gap: 12px
}

.profile-header {
    border-radius: 10px 10px 0 0;
    display: flex;
    flex-flow: row;
    padding: 0 12px;
    gap: 12px;
    background-color: #11111130;
    justify-content: space-between;
}

.sheet-header {
    border-radius: 10px 10px 0 0;
    display: flex;
    flex-flow: row;
    gap: 12px;
    background-color: #111;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.sheet-style {
    padding: 10px;
    display: flex;
    gap: 12px;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.core {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 12px;
    width: 500px;
    align-content: stretch;
    justify-content: space-evenly;
}

.stat {
    background-color: #000;
    width:210px;
    height: 80px;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
}
.class-init{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tiny{
    font-size: 12px;
    margin: 0
}
.stat-extra{
    text-align: right;
    flex-basis: calc(100% - 88px);
}
.big-stat {
    width: 110px;
    height: 110px;
}
.small-stat{
    width: 56px;
    height: 32px;
}
.huge-stat {
    width: 155px;
    height: 155px;
}

.big-box{
    flex: auto;
    background-color: #000;
    border-radius: 10px;
    padding: 0 16px;
}
.big-box-header{
    display: flex;
    border-bottom: 2px solid #fff;
    justify-content: space-between;
    align-items: center;
}
.character-sheet button{
    width: 23px;
    text-align: center;
    padding: 0
}

.generate-box {
    padding: 8px;
    width: 400px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 4px
}

.generate-box button {
    flex: 1 1;
    height: 100%
}
.class-abilties{
    gap: 10px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.class.stat{
    width: 90px;
    height: 90px;
}
.init.stat{
    width: 80px;
    height: 80px; 
}
.boxes{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stats-big{
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}
.skills{
    display: flex;
    flex-direction: column;
    gap: 4px
}
.top-header{
    height: 60px;
    border-radius: 10px;
    display: flex;
    flex-flow: row;
    padding: 0 12px;
    gap: 12px;
    background-color: #111111aa;
    justify-content: space-between;
    margin-bottom: 12px;
    align-items: center;
}

.home-button{
    height: 70%;
}
button{
    transition: transform 0.2s ease-in-out;
}
button:hover{
    transform: scale(105%);
}
.home-div{
    flex: 1 1 33%;
    display: flex;
    justify-content: flex-start;
    height: 100%;
    align-items: center;
    gap: 4px
}
.top-header a{
    padding-top: 18px;
    height: 100%
}
.info-div{
    flex: 1 1 33%;
    display: flex;
    justify-content: center;
    height: 100%;
    align-items: center;
    gap: 4px
}
.support-div{
    flex: 1 1 33%;
    display: flex;
    justify-content: flex-end;
    height: 100%;
    align-items: center;
    gap: 4px
}
.description-div{
    height: 100%;
    flex: 1 1 50%;
    display: flex;
    justify-content: flex-start;
    height: 100%;
    align-items: center;
    gap: 4px
}
.window {
    position: absolute;
    top: 100px;
    left: 100px;
    width: 400px;
    max-height: 90vh;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    cursor: default;
    background: rgba(51, 51, 51, 50%);
    border: 2px solid #555;
    backdrop-filter: blur(50px);
}

.window-header {
    border-radius: var(--window-borders) var(--window-borders) 0 0;
    padding: 5px;
    cursor: grab;
    display: flex;
    justify-content: flex-end;
    user-select: none;
}
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e; /* Dark track */
    border-radius: 5px;
    margin: calc(var(--window-borders) / 2) 0;
}

::-webkit-scrollbar-thumb {
    background: #555; /* Dark thumb */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #777; /* Lighter on hover */
}
.help-button{
    width: 24px;
    height: 24px;
    text-align: center;
    padding: 0;
    margin-left: 4px;
}
#file1 .description{
    border-radius: 6px !important;
}
.lock-toggle {
    border-radius: 4px;
    background-color: #22222290;
    border: 1px solid black;
    cursor: pointer;
    user-select: none;
    position: relative;
    cursor: pointer;
}
.lock-toggle input {
    display: none;
}

.lock-toggle:hover .help {
    visibility: visible;
    opacity: 1;
}

.random-box{
    position: relative;
}
.move-left{
    transform: translateX(10%) !important; 
}
.help {
    visibility: hidden;
    background-color: black;
    color: white;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    position: absolute;
    right: 50%;
    bottom: 100%;
    transform: translateX(50%);
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.random-box:hover .help {
    visibility: visible;
    opacity: 1;
}

.race-selector-btn {
    cursor: pointer;
}

.race-modal {
    display: none;
    position: fixed;
    top: 210px;
    left: 250px;
    width: 500px;
    height: 200px;
    background: #222222aa;
    backdrop-filter: blur(4px);
    padding: 4px;
    border-radius: 10px;
    z-index: 99;
    padding-left: 12px;
    flex-direction: column;
    align-items: flex-end;
    border: 1px solid black;
}
.close{
    margin-right: 12px;
}
.race-modal-content {
    display: flex;
    height: calc(100% - 36px);
    flex: 1 1 30%;
    font-size: 12px;
    width: 100%
}

.race-modal .close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.race-filters {
    width: 40%;
    display: flex;
    flex-direction: column;
    float: left;
    padding-right: 20px;
    overflow-y: scroll;
    overflow-x: hidden;
}

.race-list {
    padding-left: 8px;
    width: 70%;
    float: left;
    overflow-y: scroll;
}

.race-modal ul {
    list-style: none;
    padding: 0;
}

.race-modal li {
    padding: 5px;
    cursor: pointer;
}

.race-modal li:hover {
    background: #11111190;
}

.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.book-code {
    font-weight: bold;
    padding: 5px;
}

.tooltip {
    visibility: hidden;
    background-color: black;
    color: white;
    text-align: center;
    padding: 8px;
    border-radius: 5px;
    position: fixed; /* Fixes clipping inside small containers */
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
    pointer-events: none; /* Prevents interference with interactions */
}

/* Show tooltip when hovering */
.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}
.window{
    z-index: 9999!important;
}

.race-selector-btn{
 width: 200px
}
.top-bar{
    display: flex;
    margin-bottom: 12px;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    gap: 6px
}
#globalSearchBar{
    flex: 1 1 auto;
}

.character-info{
    background-color: #000;
    border-radius: 10px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-prof{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 6px
}
.prof{
    flex: 1 1 10%;
    width: 10%
}
.number{
    flex: 1 1 10%;
    width: 10%
}
.prof-name{
    flex: 1 1 80%;
    width: 80%;
    text-align: left;
}
.stat-main{
    width: 80px;
    flex-basis: 80px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
}
.stat-num{
    margin: 0
}
.box-header{
    display: flex;
    align-items: center;
    gap: 4px;
}
.guide{
    font-size: 18px;
}

.character-items {
    display: block;
    font-size: 14px;
    color: #fff;
    background-color: #00000020;
    padding: 4px;
    margin: 4px 0;
    flex: 1 0 auto;
    resize: none;
    overflow: hidden scroll;
    width: 100%;
    height: 70%;
}
.class-text{
    width: 25%
}
.add-new{
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-content: flex-end;
    align-items: flex-end;
}
.add-item{
    width: 17px !important
}
.remove-item{
    width: 20px !important
}
.global-generate{
    padding: 12px;
    display: flex;
    margin-bottom:12px;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}
.generate-button{
    height: 36px;
}
.toggle-feature {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.action, .attack-row{
    font-size: 14px;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows items to wrap to a new line */
    position: relative; /* Keeps layout structured */
}
.attack-row{
    width: 100%;
}
.feature-box {
    display: none; /* Hidden by default */
    width: 100%; /* Ensures it spans across */
    margin-bottom: 10px; /* Adds spacing */
}
.feature-text{
    width: 100%; /* Ensures it spans across */
    display: block;
    font-size: 14px;
    padding: 4px;
    flex: 1 0 auto;
    resize: vertical;
    overflow: hidden scroll;
    field-sizing: content;
}


