@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap');
@font-face {
    font-family: 'DDC';
    src: url('DCC - Manifest.otf') format('opentype');
    font-weight: normal;
}
*{
  font-family: "Crimson Text", serif;
}

:root {
    --gap: 10em;
    --main-clr: white;
    --sec-clr: black;

    --btn-bg: rgb(239, 239, 239);
    --btn-hvr: rgb(205, 205, 205);
    --btn-tx: black;

    --ter-clr: #555;
    --bord-clr: #555;

    --un-tab-clr: rgba(255, 255, 255, 0.5);
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    width: 100dvw;
    margin: 0;
    background-size: cover;
    background-position: center center;
    max-width: 100%;
    overflow: hidden;
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3em;
}

.logo {
    filter: brightness(0) invert(1);
    width: 90%;
}

.btn {
    height: 30px;
    padding: 0 50px;
    background-color: var(--btn-bg);
    border: none;
    color: var(--btn-tx);
    font-size: 12px;
    font-weight: 550;  
    transition: 0.2s ease-in; 
}

.btn:hover {
    background-color: var(--btn-hvr);
}

.base {
    background-color: rgb(239, 239, 239);
    color: black;
}
.base:hover {
    background-color: rgb(205, 205, 205);
}

.sex-btn.selected {
    background-color: #a0a0a0;
    color: var(--main-clr);
}

.text {
    color: var(--main-clr);
    margin: 0.5em 0 ;
}

.text.sm {
    font-size: 12px;
    color: var(--bord-clr);
}

.input {

    height: 30px;
    padding: 0 10px;
    background-color: rgb(239, 239, 239);
    border: none;
    color: rgb(0, 0, 0);
    font-size: 12px;
    font-weight: 550;  
    transition: 0.2s ease-in; 

}

.title {
    font-family: 'DDC', sans-serif;
    font-weight: 300;
    margin: 4px;
    font-size: 80px;
    color: var(--main-clr);
}

.mx {
    max-height: 80px;
}

#cF {
    display: none;
}

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

.pBtn {
    margin: 40px 0;
    background-color: transparent;
    color: rgb(239, 239, 239);
    border: rgb(239, 239, 239) 1px solid;
}

.pBtn.active {
    background-color: rgb(239, 239, 239);
    color: rgb(0, 0, 0);
    border: none;
    
}

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

#Rs-box {
    position: relative;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 40dvw;
    width: 40dvw;
    gap: 1em;
}

.race-card {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1em;
    text-align: center;
    transition: all 0.3s ease-in-out;
    color: var(--main-clr);
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 1;
    cursor: pointer;
}

#Rs-box.race-selected .race-card:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.race-card .race-details {
    display: none;
    margin-top: 1em;
}

.race-card.active {
    position: absolute;
    top: 0;
    left: -15px;
    width: 100%;
    height: 100%;
    z-index: 10;
    transform: scale(1);
}

.race-card.active .rsBtn {
    display: none;
}

.race-card.active .race-details {
    display: block;
}

.rsBtn {
    width: 100%;
    height: 100%;
    background: none;
    border: 1px solid var(--main-clr);
    color: var(--main-clr);
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.rsBtn:hover {
    background-color: var(--un-tab-clr);
}

.choose-btn {
    margin-top: 1em;
}

.corner-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.corner-image {
    position: absolute;
    width: 50px;
    height: 50px;
    filter: brightness(0) invert(1); /* Make the svg var(--main-clr) */
}

.top-left {
    top: 20px;
    left: 20px;
    transform: rotate(90deg);
}

.top-right {
    top: 20px;
    right: 20px;
    transform: rotate(180deg);
}

.bottom-left {
    bottom: 20px;
    left: 20px;
    transform: rotate(0deg);
}


.bottom-right {
    bottom: 20px;
    right: 20px;
    transform: rotate(-90deg);
}

#Og {
    display: none; /* Initially hidden, to be shown by script */
    height: 84dvh;
    justify-content: center;
    justify-content: center;

}

#origens {
    height: 100%;
    display: flex;
    overflow-x: hidden;
    padding-bottom: 1em;
    gap: 1em;
    flex-direction: column;
    align-items: center;
}


#origens {
  --sb-track-color: #99999917;
  --sb-thumb-color: #ffffff;
  --sb-size: 16px;
}

#origens::-webkit-scrollbar {
  width: var(--sb-size)
}

#origens::-webkit-scrollbar-track {
  background: var(--sb-track-color);
  backdrop-filter: blur(10px);
  border-radius: 1px;
}

#origens::-webkit-scrollbar-thumb {
  background: var(--sb-thumb-color);
  border-radius: 1px;
  
}

@supports not selector(::-webkit-scrollbar) {
  #origens {
    scrollbar-color: var(--sb-thumb-color)
        var(--sb-track-color);
  }
}

.origin-card {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1em;
    color: var(--main-clr);
    width: 382px;
    user-select: none;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    flex-shrink: 0; /* Prevent cards from shrinking */
    transition: all 0.3s ease-in-out;
}

.origin-card:not(.originSelected) {
    height: 117px;
    transition: all 0.3s ease-in-out;
}

.origin-card .origin-details {
    display: none;
    transition: all 0.3s ease-in-out;
}

.origin-card.originSelected {
    flex-direction: column;
    align-items: self-start;
    transition: all 0.3s ease-in-out;
}

.origin-card.originSelected .title {
    margin: 42px 42px 0;

}

.origin-card.originSelected .origin-details {
    display: block;
    margin: 0px 42px 42px 42px;
}

#Mg {
    display: none;
    color: var(--main-clr);
}

.types {
    display: flex;
    justify-content: space-between;
    gap: 1em;
}

.type-card {
    height: 150px;
    width: 150px;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--main-clr);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    user-select: none;
}

.type-card:hover {
    background-color: rgba(25, 25, 25, 0.5);
}

.type-card img {
    height: 70%;
}

.type-info {
    width: 500px;
}

short {
  cursor: pointer;
}

.tooltip {
  position: absolute;
  background: #111;
  color: var(--main-clr);
  border-radius: 8px;
  padding: 10px;
  min-width: 180px;
  max-width: 250px;
  box-shadow: 0 4px 8px rgba(0,0,0,.3);
  z-index: 1000;
  display: none;
}

.tooltip .title {
  font-size: 40px;
  margin: 0;
}

.tooltip .subtitle {
    height: 1px;
    font-size: 10px;
    color: #5f5f5f;
    position: relative;
    top: -6px;
}

.tooltip .text {
  font-size: 13px;
  margin: 6px 0;
  text-align: end;
}

.tooltip .text.sm {
  font-size: 11px;
  opacity: 0.8;
  max-width: none;
}

/* Cores por categoria */
.Status     { color: blueviolet;}
.Pericia    { color: red; }
.Raça       { color: orange; }
.Atributo   { color: gold; }
.MagiaFicha { color: greenyellow; }
.Habilidades { color: rgb(71, 210, 32);}
.Origem     { color: deepskyblue; }

.Habilidades .icon-svg { background-color: violet;}
.Status .icon-svg     { background-color: blueviolet;}
.Pericia .icon-svg    { background-color: red; }
.Raça .icon-svg       { background-color: orange; }
.Atributo .icon-svg   { background-color: gold; }
.MagiaFicha .icon-svg { background-color: greenyellow; }
.Origem .icon-svg     { background-color: deepskyblue; }

.icon-svg {
  display: inline-block;
  vertical-align: middle; /* Align with text */
  width: 20px;
  height: 20px;
  -webkit-mask: var(--svg-icon) no-repeat center / contain;
  mask: var(--svg-icon) no-repeat center / contain; 
}

hr {
  border: none;
  border-top: 1px solid #666;
  margin: 4px 0;
}

hr.small {
    margin: 0 50px;
}

.pericias-list span {
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.pericias-list span:hover {
  background: rgba(255,255,255,0.2);
}

/* Tooltip principal */
#tooltip {
  position: absolute;
  display: none;
  background: #222;
  padding: 12px;
  border: 1px solid var(--ter-clr);
  border-radius: 6px;
  min-width: 200px;
  max-width: 300px;
  font-family: sans-serif;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  color: #fff;
}

.pericias-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Botão de perícias dentro do tooltip */
#tooltip .pericias-btn {
    height: 30px;
    padding: 0 50px;
    background-color: rgb(239, 239, 239);
    border: none;
    color: rgb(0, 0, 0);
    font-size: 12px;
    font-weight: 550;  
    transition: 0.2s ease-in; 
    margin-top: 10px;
}

#tooltip .pericias-btn:hover {
    background-color: rgb(205, 205, 205);
}

/* Tooltip lateral (lista de perícias) */
#right-tooltip {
  position: absolute;
  display: none;
  background: #222;
  padding: 10px;
  border: 1px solid var(--ter-clr);
  border-radius: 5px;
  min-width: 150px;
  font-family: sans-serif;
  font-size: 13px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  color: #fff;
}

#right-tooltip strong {
  display: block;
  margin-bottom: 6px;
}

#right-tooltip short {
  display: block;
  margin: 3px 0;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
#right-tooltip short:hover {
  background: #333;
}

/* Tooltip flutuante de perícia */
#pericia-tooltip {
  position: absolute;
  display: none;
  background: #333;
  padding: 8px;
  border: 1px solid #666;
  border-radius: 5px;
  max-width: 200px;
  font-size: 0.85em;
  z-index: 1100;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#foco {
    display: none;
    flex-direction: column;
    height: 100dvh;
}

.focos {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 400px;
    height: 400px;
    background-size: contain;
    margin: 0 auto;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url(img/magic.svg);
}



.foco-card {
    position: absolute;
    width: 30px;
    height: 30px;
    padding: 1em;
    color: var(--main-clr);
    border: 5px var(--main-clr) solid;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    user-select: none;
}

.C{
    top: 0;
    left: 0;
}
.CC{
    top: 0;
    right: 0;
} 

.CCC{
    bottom: 0;
    left: 0;
}

.CCCC{
    bottom: 0;
    right: 0;
}

#foco-info-box {
    height: 195px;
    margin-top: 5px;
    
}

.foco-info {
    width: 400px;
}

.foco-btns {
    margin-bottom: 10px;
    display: none;
}

.foco-btns .focosM {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--main-clr);
    border: none;
    width: 30px;
    height: 30px;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    user-select: none;
}

.foco-btns .focosM:hover {
    background-color: rgba(25, 25, 25, 0.5);
}


.foco-btns .focosM:first-child {
    border-radius: 20px 0 0 20px;
}

.foco-btns .focosM:last-child {
    border-radius: 0 20px 20px 0;
}

#Suporte, #Controle, #Elemental, #Dinamico {
    position: absolute;
    top: 74px;
}

#ptsTxt {
    position: relative;
    rotate: 90deg;
    position: relative;
    left: -20px;
    display: flex;
    align-items: center;
    top: 4.5px;
    font-size: 13px;

}

#ptsTxt .icon-svg {
    width: 10px;
    height: 10px;
    margin-left: 6px;
    margin-top: 2px;
    -webkit-mask: var(--svg-icon) no-repeat center / contain;
    mask: var(--svg-icon) no-repeat center / contain; 
}

.typeElements {
    transform: scale(0.7);
    position: absolute;
    right: 30px;
    display: none;
    flex-direction: row;
    bottom: 0;
}

.typeElements hr {
    border-left: 1px solid;
    margin-right:1em ;
}

.typeElements span .typeElementsInfo {
    display: flex;
    align-items: center;
}

.typeElements span .typeElementsInfo img {
    margin-right: 5px;
}

.focoClose {
    opacity: 0;
    position: relative;
    height: 69px;
    width: 69px;
    border-radius: 50%;
    border: none;
    background-color: var(--main-clr);
    transition: 0.5s ease-in-out;
    pointer-events: none;
    user-select: none;
}

.focoClose:hover {
    color: #222;
}
#elementos {
    display: none;
    flex-direction: column;
    width: 516px;
}

#elementos .elementsTitle {
    display: flex;
    align-items:flex-end;
    justify-content: space-between;
}

#elementos .elementsTitle .title {
    position: relative;
    bottom: -7px;
    
}

#elementos .elementsTitle .title .title {
    bottom: 0;
}    


#elementos .elementos-simples-titulo,
#elementos .elementos-avancados-titulo {
    display: flex;
    align-items: center;
    gap: 1em;
    width: 120%;
    position: relative;
    right: 10%;
}

#elementos .elementos-simples-titulo hr,
#elementos .elementos-avancados-titulo hr{
    width: -webkit-fill-available;
}

#elementos .elementos-simples-titulo{

    flex-direction: row-reverse;
}

#elementos .elementos-simples-titulo .title,
#elementos .elementos-avancados-titulo .title {
    font-size: 50px;
}


.elementos-simples, .elementos-avancados {
    display: flex;
    gap: 28px;
    height: 74px;
    align-items: center;
    justify-content: center;

}

.element-card {
    height: 50px;
    width: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.element-card img {
    height: 55%;
    user-select: none;
}

.element-card:hover {
    background-color: rgba(25, 25, 25, 0.5);
}

.elementos-info-box {
    display: flex;
    height: 150px;
    width: 100%;
    margin-top: 5em;
}

.elementos-info {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.elementos-info .title-box {
    display: flex;
    align-items: center;
    gap: 1em;
    width: 100%;
    justify-content: center;
}

#element-title {
    display: flex;
    align-items: center;
    max-height: 80px;
}

.elementos-info .title-box hr {
    width: -webkit-fill-available;
}

.elementos-info .btn{
    margin-top: 1em;
    width: 150px;
}

img.reverse {
    transform: rotateX(180deg);
}

.selected {
    background-color: rgba(205, 205, 205, 0.5);
}

.selected:hover {
    background-color: var(--un-tab-clr);
}

#element-tooltip {
    position: absolute;
    display: none;
    background: #111;
    color: var(--main-clr);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1100;
}

.element-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#element-tooltip.disabled {
    background-color: var(--ter-clr);
    color: #aaa;
}

#Pr {
    display: none;
    width: 600px;
    gap: 2em;
}

#Pr .pr-block {

    width: 50%;
    height: 100%;
    color: var(--main-clr);
}

#Pr .pr-block #pericias {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 300px;
    background-color: #222;
    border: 1px solid var(--ter-clr);
    max-height: 550px;
    justify-content: flex-start;
    overflow: auto;
}

#ptsDisplay {
    position: relative;
    color: var(--main-clr);
    left: 229px;
    top: 54px;
    background-color: #393535;
    border-radius: 50px;
    width: 36px;
    display: flex;
    justify-content: center;
}

#Pr .pr-block #pericias .pBlock {
    margin: 10px;
    background-color: #111;
    border: 1px solid var(--ter-clr);
    padding: 10px;
}

.p-card {
    display: flex;
    background-color: #393535;
    margin-top: 10px;
    border-radius: 20px;
    align-items: center;
    padding: 0 5px 0 10px;
    height: 40px;
    justify-content: space-between;
    color: white;
}

.p-card span {
    max-width: 10px;
}

.p-card .nbr {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.p-card .p-btns {
    width: 100px;
    height: 30px;
    display: flex;
    align-items: center;
}

.pc-btn {
    width: 50%;
    height: 100%;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--main-clr);
    font-size: 12px;
    font-weight: 550;
    transition: 0.2s ease-in;
    cursor: pointer;
    user-select: none;
    border-radius: 50px 0 0 50px;
}

.p-btns .pc-btn:last-child {
    border-radius: 0 50px 50px 0;
}


.pc-btn:hover {
    background-color: var(--un-tab-clr);
}

.race-skills {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid #666;
    text-align: left;
}

.race-skills h4 {
    margin: 0 0 0.5em 0;
}

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

.race-skills li {
    margin-bottom: 0.5em;
}

.ineditavel button {
    cursor: not-allowed;
    opacity: 0.5;
}


#pericias-display-block {
    width: 258px;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    background-color: #111;
    border: 1px solid var(--ter-clr);
}

#pericias-display-block::-webkit-scrollbar {
    display: none;
}

#pericias-display .title {
    font-size: 50px;
    color: var(--main-clr);
    text-align: center;
}

.pericias-list-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.roll-pericia-btn {
    height: 25px;
    padding: 0 15px;
    font-size: 10px;
    margin-left: 10px;
    border-radius: 15px;
    cursor: pointer;
}

#pericias-display .pBlock {
    margin: 10px 0;
    background-color: #222;
    border: 1px solid var(--ter-clr);
    padding: 10px;
}

#pericias-display .pBlock .text {
    color: white;
}

#pericias-display .pb-title .text {
    margin-bottom: 10px;
}

#game {
    display: none;
    grid-template-columns: 320px 1fr;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}

#multiTask {
    width: calc(100% - 258px);
    min-width: calc(100% - 258px);
    height: 97%;
    display: flex;
    flex-direction: column;
    border:var(--main-clr) 1px solid;
    margin: 10px;

}

#multiTask header {
    display: flex;
    flex-direction: row;
    height: 30px;
    width: 100%;
    min-height: 30px;

}

#multiTask header .line {
    width: -webkit-fill-available;
    height: 98%;
    border-bottom: solid 1px var(--main-clr);
}

#multiTask header .Sline {
    width: 10px;
    height: 98%;
    border-bottom: solid 1px var(--main-clr);
}


.mTBtn {
    width: 200px;
    height: 100%;
    background-color: transparent;
    border: solid var(--main-clr) 1px;
    border-top: none;
    color: var(--un-tab-clr);
    cursor: pointer;
}

#multiTask header .mTBtn:last-child {
    border-right: none;
    width: 201px;
}

#multiTask header .mTBtn:first-child {
    border-left: none;
}

.mTBtn.active {
    border-bottom: none;
    color: var(--main-clr);   
}

.mt-content {
    width: 100%;
}

#magias-content {
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: center;
    align-items: center;
}

#magias-content .title {
    width: 80%;
}

.magias-content {
    width: 80%;
    height: 405px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: min-content;
    gap: 1em;
    border: 1px solid var(--ter-clr);
    overflow-y: auto;
    padding: 1em;
    box-sizing: border-box;
}

#options-content {
    flex-direction: column;
    height: 100%;
    color: var(--main-clr);
    align-items: center;
}

#options-content #options-container {
    width: 80%;
}

.panel {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.panel .box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #111;
    border: 1px solid var(--ter-clr);
    width: 80%;
    max-width: 800px;
    height: auto;
    min-height: 400px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease-in-out;
}

.exit-box {
    position: absolute;
    top: 5px;
    right: 5px;
    color: white;
    background-color: #222;
    cursor: pointer;
    user-select: none;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.panel .box div {
    display: flex;
    flex-direction: column;
    width: 90%;
    height: 90%;

}

#MagicCreate, #AbilityCreate {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#MagicCreate section, #AbilityCreate section{
    display: flex;
    flex-direction: column;
}

#MagicCreate section #magicDescription, #AbilityCreate section #abilityDescription{
    height: 100px;
}

.magic-card, .ability-card, .trauma-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #111;
    border: 1px solid var(--bord-clr);
    height: 130px;
    
}

.trauma-card {
    color: white;
}

.magic-card .title, .ability-card .title{
    text-align: center;
}

#habilidades-content {
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.habilidades-content {
    width: 80%;
    height: 405px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: min-content;
    gap: 1em;
    border: 1px solid var(--ter-clr);
    overflow-y: auto;
    padding: 1em;
    box-sizing: border-box;
}

#habilidades-content h3.title {
    width: 80%;
    text-align: end;
}

.central {
    display: flex;
    width: 80%;
}

.delete-btn {
    background-color: rgb(189, 41, 41);
    color: white;
}

.delete-btn:hover {
    background-color: rgb(160, 17, 17);
}

#MagicInfo, #AbilityInfo, #ItemInfo {
    display: none;
}

#inventario-content {
    display: flex;
    gap: 1em;
    align-items: center;
    height: 563px;
    width: 100%;
    align-items: flex-start;
}

#inventario-content .inv-side {
    width: 50%;
    height: 600px;
}

#inventario-content .inv-side:first-child {
    display: flex;
}

#inventory {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Add gap between items */
    height: calc(83% - 2em - 2px);
    width: 250px;
    border: 1px solid var(--ter-clr);
    overflow-y: auto;
    padding: 1em;
    box-sizing: border-box;
    margin: 1em;
    margin-top: 0;
}

.item-card {
    background-color: #222;
    border: 1px solid #444;
    color: white;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    border-radius: 4px;
}

.item-card:hover {
    background-color: #333;
}

.item-content {
    justify-content: space-between;
}

.item-content button {
    background-color: #444;
    border: none;
    border-radius: 5px;
    color: white;
    transition: background-color 0.2s ease-in-out;
}

.item-content button:hover {
    background-color: #333;
}

.item-action-menu {
    position: absolute;
    display: none;
    flex-direction: column;
    background-color: #111;
    border: 1px solid var(--ter-clr);
    border-radius: 5px;
    z-index: 1100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.item-action-menu button {
    background: none;
    border: none;
    color: var(--main-clr);
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.item-action-menu button:hover {
    background-color: #333;
}

.invAddBtn {
    width: 250px;
    margin-left:16px;
}

#useInput {
    height: 200px;
    width: 98%;
    border: var(--ter-clr) 1px solid;
    background-color: #99999917;
    color: var(--main-clr);
}

.arma-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 281.587px;
    height: 150px;
    background-image: repeating-linear-gradient(-2deg, var(--ter-clr), var(--ter-clr) 8px, transparent 8px, transparent 18px, var(--ter-clr) 18px), repeating-linear-gradient(88deg, var(--ter-clr), var(--ter-clr) 8px, transparent 8px, transparent 18px, var(--ter-clr) 18px), repeating-linear-gradient(178deg, var(--ter-clr), var(--ter-clr) 8px, transparent 8px, transparent 18px, var(--ter-clr) 18px), repeating-linear-gradient(268deg, var(--ter-clr), var(--ter-clr) 8px, transparent 8px, transparent 18px, var(--ter-clr) 18px);
    background-size: 2px 100%, 100% 2px, 2px 100% , 100% 2px;
    background-position: 0 0, 0 0, 100% 0, 0 100%;
    background-repeat: no-repeat;
    user-select: none;
}

.arma-area .pre {
    color: #999;
    font-size: 15px;
    text-align: center;
}

#ItemCreate {
    display: none;
    justify-content: space-between;
}
#ItemCreate section {
    display: flex;
    flex-direction: column;
    overflow: auto;
}

#ItemCreate section::-webkit-scrollbar

#dice-multiplier-options {
    gap: 5px;
}

.item-card.equipped {
    border-left: 3px solid #4CAF50; /* Green border to indicate equipped */
    background-color: #2a3a2b; /* Slightly green background */
}

.peso-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    border: 1px solid var(--ter-clr);
    height: 127px;
}

.peso-area .sm {
    position: relative;
    top: -3px;
    height: 0;
    margin: 0;
    right: 42%;
}

.peso-area .title {
    color: var(--main-clr);
}

#guardados {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Add gap between items */
    height: calc(91% - 2em - 2px);
    width: 250px;
    border: 1px solid var(--ter-clr);
    overflow-y: auto;
    padding: 1em;
    box-sizing: border-box;
}

.inv-side.d {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.inv-side.d .text, .inv-side.d #guardados {
    margin-right: 1em;
}

#ItemInfo, #ItemCreate {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
#ItemCreate section textarea {
    height: 100px;
}

#additional-weight-panel .box {
    display: flex;
    flex-direction: column;
    gap: 20px;

}

#additional-weight-panel .box p {
    margin-bottom: 50px;
}

#traumas-content {
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: center;
    color: var(--main-clr);
}

.traumas-content {
    width: 80%;
    height: 405px;
    display: flex;
    flex-direction: column;
    gap: 1em;
    border: 1px solid var(--ter-clr);
    overflow-y: auto;
    padding: 1em;
    box-sizing: border-box;
}


#dice-div {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
    position: fixed;
    opacity: 0;
    pointer-events: none;
    transition: 0.5s opacity ease-in-out;
    z-index: 999999999;
    background-color: #0000006c;
}

#dice-div div{
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--main-clr);
    background: #020024;
    background: linear-gradient(90deg, rgba(2, 0, 36, 0) 0%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
}

#nmbW {
    opacity: 0;
    transition: 1s ease-in-out;

}

#dados-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

#dados-content .title {
    margin-top: 50px;
}

#perTop {
    display: flex;
    flex-direction: column;
    align-items: center;

}

#perTop #playerImg {
    background-color: red;
    width: 200px;
    height: 200px;
    border-radius: 10px;
    border: none;
    background-size: cover;
}

#perTop #chEdit {
    position: relative;
    display: flex;
    width: 100%;
    margin-top: 10px;
    justify-content: space-around;
}

.bar {
    width: -webkit-fill-available;
    height: 62px;
    background-color: #222;
    position: relative;
}

.barDiv {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: white;
    
}

.barDiv p{
    z-index: 10;
    position: absolute;
    bottom: -10px;
}

.barFill {
    height: 100%;
    transition: 0.3s;
}

.barBlock {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-top: 10px;
}

.barBtn {
    background-color: #222;
    border: none;
    color: white;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barBtn:hover {
    background-color: #333;
}

.barBtn:active {
    background-color: #444;
}

#hpBarFill { 
    background-color: #E01B24;
    width: 10%;
}

#mpBarFill {
    background-color: #1C71D8;
    width: 20%;
}

#spBarFill {
    background-color: #ffffff;
    width: 30%;
}

#hpBar::after {
    content: '';
    height: 100%;
    width: 100%;
    background-image: url(img/vida.png);
    position: absolute;
    left: 0;
    top: 0;
    background-size: cover;
}

#spBar::after {
    content: '';
    height: 100%;
    width: 100%;
    background-image: url(img/medo.png);
    position: absolute;
    left: 0;
    top: 0;
    background-size: cover;
}

#spValue {
    color: black;
}

#mpBar::after {
    content: '';
    height: 100%;
    width: 100%;
    background-image: url(img/magia.png);
    position: absolute;
    left: 0;
    top: 0;
    background-size: cover;
}



.diario-toolbar {
  margin-bottom: 10px;
  background-color: #333;
  padding: 5px;
  border-radius: 5px;
}

.diario-toolbar button, .diario-toolbar select {
  margin-right: 5px;
  background-color: #444;
  color: white;
  border: 1px solid var(--bord-clr);
  border-radius: 3px;
  cursor: pointer;
}

.diario-toolbar button:hover, .diario-toolbar select:hover {
  background-color: var(--bord-clr);
}

.diario-toolbar input[type="color"] {
  border: none;
  background: none;
  width: 30px;
  height: 20px;
  padding: 0;
  vertical-align: middle;
}

.diario-editor {
  border: 1px solid #ccc;
  padding: 10px;
  height: 400px;
  background-color: #f8f8f8;
  color: black;
  border-radius: 5px;
  font-family: 'Crimson Text', serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-y: auto;
}

.personagem-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 20px;
    padding-bottom: 0;
    color: var(--main-clr);
    max-height: 84dvh;
    overflow-y: auto;
    width: 100%;
}

#bio-content, #other-content {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
}

.personagem-info-basica {
    position: relative;
    max-height: 84dvh;

}

.personagem-info-basica p {
    margin: 5px 0;
}

.personagem-info-basica .btn {
    position: absolute;
    bottom: 0;
    width: 100%;
}

.personagem-biografia {
    display: flex;
    flex-direction: column;
    max-height: 80dvh;
    min-height: 80dvh;
    overflow: auto;
}

.personagem-biografia label {
    margin-top: 10px;
    font-weight: bold;
}

.biografia-input {
    display: flex;
    padding: 5px;
    margin-top: 5px;
    background-color: #333;
    border: 1px solid var(--bord-clr);
    color: var(--main-clr);
    border-radius: 3px;
    resize: vertical;
}

#diario-content {
    flex-direction: column;
}

#periciasEditorBox {
    position: fixed;
    width: 100%;
    height: 100%;
    background: black;
    color: var(--main-clr);
    overflow-y: scroll;
    top: 0;
    left: 0;
    z-index: 20;
    
}

#periciasEditorBox #periciasEditor,
#statusEditor {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(9, 1fr);
    grid-column-gap: 14px;
    grid-row-gap: 14px;

}

.periciasEditorBoxContent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.closeBox {
    background-color: white;
    color: black;
    border-radius: 5px;
    width: 100px;
    height: 30px;
    margin: 5px;
    transition: 0.3s;
}

.closeBox:hover {
    background-color: #e7e7e7;
}

.pericia-edit,
#statusEditor div {
    
    position: relative;
    height: 40px;
    display: flex;
    background-color: #444;
    font-family: "Crimson Text", serif;
    align-items: center;

}


.pericia-edit input {
    border: 4px solid #444444;
    height: 100%;
    position: absolute;
    right: 10px;
}

#statusMaxEditor {
    display: flex;
    justify-content: space-around;
    margin-top: 28px;
}

/* Mobile: troca hover por click */
@media (hover: none) and (pointer: coarse) {
    .tooltip {
        display: none !important; /* evita hover automático */
    }
}


#MobileMTBtn {
    position: relative;
    display: none;
    width: 200px;
    background-color: transparent;
    border: solid var(--main-clr) 1px;
    border-top: none;
    color: var(--un-tab-clr);
    cursor: pointer;
}

#mMTImage{
    position: absolute;
    top: 3px;
    transform: rotate(180deg);
}

#MobileMTBtn.active {
    transform: rotate(0deg);
}

.close-btn-per {
    display: none;
    justify-content: center;
    align-items: center;
    height: 20px;
    width: 20px;
    background-color: transparent;
    border: 1px solid var(--ter-clr);
    border-radius: 5px;
    color: var(--ter-clr);
    transition: 0.3s;
    cursor: pointer;
}

.close-btn-per:hover {
    color: #333;
    border-color: #333;
}


#enterPer {
    display: none;
    background-color: #111;
    border:solid var(--main-clr) 1px;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 1em;
    color: white;
    position: fixed;
    bottom: 0;
    z-index: 1000000;
    cursor: pointer;
}

@media (max-width: 500px) {
    #foco {
        width: 90dvw;
    }

    .foco-info {
        width: 100%;
    }

    .focos {
        width: 90dvw;
        height: 90dvw;
    }

    #foco-info-box {
        position: absolute;
        bottom: 0;
        width: 90dvw;
    }

    #pericias-display-block {
        position: absolute;
        width: 100%;
        height: 100dvh;
        top: 0;
        left: 0;
        z-index: 10000000;
    }

    .close-btn-per {
        display: flex;
    }

    #multiTask {
        width: 100%;
    }

    #enterPer {
        display: block;
    }
}

/* Responsividade geral */
@media (max-width: 768px) {
    body, main {
        flex-direction: column;
        width: 100%;
        overflow-x: hidden;
    }

    .personagem-content {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    #Pr, #periciasEditorBox, #game {
        width: 100%;
        overflow-x: auto;
    }

    .btn, .input {
        font-size: 14px;
    }

    .origin-card, .type-card, .element-card {
        width: 80%;
        max-width: 350px;
    }

    #sex-div .btn {
        padding: 0 20px;
    }
    #Rs-div {
        justify-content: center;
    }

    .race-card {
        width: 80%;
        height: 80%;
        min-width: 80%;
        min-height: 80%;
    }

    .race-card .rsBtn {
        font-size: 3dvw;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .race-details {
        overflow-x: hidden;
        overflow-y: auto;
        padding: 10px 10px 10px 25px;
    }

    .race-details::-webkit-scrollbar-track{
        background-color: transparent;
    }

    
.race-details {
  --sb-track-color: transparent;
  --sb-thumb-color: #ffffff6b;
  --sb-size: 14px;
}

.race-details::-webkit-scrollbar {
  width: var(--sb-size)
}

.race-details::-webkit-scrollbar-track {
  background: var(--sb-track-color);
  border-radius: 3px;
}

.race-details::-webkit-scrollbar-thumb {
  background: var(--sb-thumb-color);
  border-radius: 3px;
  
}

@supports not selector(::-webkit-scrollbar) {
 .race-details {
    scrollbar-color: 
    var(--sb-thumb-color)
    var(--sb-track-color);
  }
}

.type-info {
    width: 80dvw;
}

.type-card {
    width: 25dvw;
    height: 25dvw;
    max-width: 350px;
}

#typeDescription {
    margin-bottom: 10px;
}

.types {
    width: 80dvw;
}

    #MobileMTBtn {
        display: block;
        width: 100%;
    }

}

#mt-menu {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
}

@media (max-width: 768px) {

    .bar {
        width: 236px;
        height: 97px;
        background-color: #222;
        position: relative;
    }

    .barBtn {
        background-color: #222;
        border: none;
        color: var(--main-clr);
        margin-left: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 54px;
    }

    .barBlock {
        justify-content: space-between;
    }

    #multiTask header {
        position: relative;
    }

    #mt-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 30px;
        left: 0;
        width: 100%;
        background-color: #111;
        border: 1px solid var(--ter-clr);
        z-index: 100;
        align-items: stretch;
    }

    #MobileMTBtn.active + #mt-menu {
        display: flex;
    }

    #mt-menu .mTBtn {
        display: block;
        width: 100%;
        border: none;
        border-bottom: 1px solid var(--ter-clr);
        margin: 0;
        text-align: left;
        padding: 10px;
    }
    
    #mt-menu .mTBtn:last-child {
        border-bottom: none;
    }

    #mt-menu .Sline, #mt-menu .line {
        display: none;
    }

    #inventario-content {
        flex-direction: column;
        align-items: center;
    }

    #inventario-content .inv-side:first-child {
        flex-direction: column;
        justify-content: flex-start;
        height: auto;
    }

    #inventario-content .inv-side {
        width: auto;
    }

    #inventory {
        width: auto;
        margin: 0 0 1em;
        height: 400px;
    }

    #guardados {
    
        height: 400px;
        margin: 0 0 2em 1em;
    }

#diceRollerArea .box {
    height: auto;
    padding: 20px;
    gap: 15px;
}

.dice-roller-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.dice-roller-content .input {
    width: 80%;
    text-align: center;
}

.dice-roller-content .btn {
    width: 90%;
}

#rollResult {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid var(--ter-clr);
    background-color: #222;
    border-radius: 5px;
    width: 90%;
    box-sizing: border-box;
    text-align: center;
}


    .habilidades-content {
        grid-template-columns: auto;
    }

    .ability-card .title {
        font-size: 329%;
    }

    .btn-container {
        scale: 0.89;
    }

    #dados-content .title {
        margin-top: 0px;
    } 

    #dados-content .text {
        text-align: center;
        font-size: 12px;
        color: #9f9f9f;
    }
    
    #Pr {
        flex-direction: column;
        height: 90dvh;
        overflow: hidden;
    }

    .pr-block {
        width: 100%;
    }

    .personagem-biografia, #bio-content, #other-content {
        overflow: hidden;
    }

    #periciasEditorBox #periciasEditor {
        grid-template-columns: repeat(3, 1fr);
    }
}

#arquivoJSON {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 114px;
    background-color: #222;
    color: var(--main-clr);
}

#arquivoJSON  {
    background-color: transparent;
    border: none;
}

#update-notification {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #222;
    color: var(--main-clr);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--ter-clr);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 15px;
}

#update-notification p {
    margin: 0;
}

#update-notification button {
    background-color: #444;
    color: var(--main-clr);
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.item-creation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1em;
    padding: 1em;
    border: 1px solid var(--ter-clr);
    background-color: #222;
    color: var(--main-clr);
    border-radius: 8px;
}

.item-creation-grid .full-width {
    grid-column: 1 / -1; /* Span across all columns */
}

.item-creation-grid label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.item-creation-grid input[type="text"],
.item-creation-grid input[type="number"],
.item-creation-grid textarea,
.item-creation-grid select {
    width: 100%;
    padding: 0.5em;
    margin-bottom: 1em;
    border: 1px solid var(--ter-clr);
    background-color: #333;
    color: var(--main-clr);
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.item-creation-grid textarea {
    resize: vertical;
    min-height: 80px;
}

.item-creation-grid button {
    background-color: #4CAF50;
    color: var(--main-clr);
    padding: 0.7em 1.5em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.item-creation-grid button:hover {
    background-color: #45a049;
}

.item-creation-grid .button-group {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
    grid-column: 1 / -1;
}



.hidden {
    display: none;
}

    .arma-area .btn-container {
        display: flex;
        gap: 10px;
        margin-top: 10px;
        flex-direction: column;
        position: absolute;
        scale: 0.5;
        right: -24px;
        top: -17px;
        
    }

.item-content {
    display: flex;
    scale: 0.6;
    position: relative;
    left: -34px;
}

.magic-card.favorited,
.ability-card.favorited,
.item-card.favorited,
.trauma-card.favorited {
    border: 2px solid gold; /* Or any other visual indicator */
    background-color: #333;
}

.ability-card .favorite-star,
.magic-card .favorite-star,
.trauma-card .favorite-star{
    position: absolute;
    color: white;
    top: 3px;
    right: 8px;
}

.ability-card .title,
.magic-card .title,
.trauma-card .title {
    font-size: 60px;
}



.white {
    color: white;
}

.chEBtn {
    height: 40px;
    width: 40px;
    padding: 0;
    color: #ffffff;
    background-color: #222;
    transition: 0.3s;
}

.chEBtn:hover {
    background-color: #555;
}

.on{
    background-color: #545454;
}

.on:hover {
    background-color: #747474;
}

.divMark {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bord-clr);
    padding: 0 10px;
    margin-bottom: 10px;
}

#openMindArea {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    width: 100dvw;
    background-color: rgba(0, 0, 0, 0.253);
    backdrop-filter: blur(2px);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    height: 20px;
    width: 20px;
    background-color: #111;
    border: var(--bord-clr) 1px solid;
    border-radius: 5px;
    color: var(--main-clr);
    transition: 0.3s;
    cursor: pointer;
}