@keyframes fade_in {
    0% {
        opacity: 0;
        transform: scale(.95);
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: none;
    }
}

.char-build {
    /* background: rgb(0 0 0 / 20%); */
    border-radius: 10px;
    padding: 0 20px;
    margin: 10px 0;
    /* border: 1px solid rgb(255 255 255 / 30%); */
    width: 90%;
    position: relative;
    overflow: hidden;
    animation: fade_in 300ms;
}

.char-build > div {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.char-build > div > h3 {
    font-size: 1.5em;
    color: white;
    margin: 0;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid rgb(255 255 255 / 30%);
}

.char-build-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.2);
}

.char-build-role {
    margin: 5px 0;
    font-size: 1.25em;
    display: flex;
    justify-content: center;
}

.char-build-role > span {
    background: none;
    padding: 6px 14px 6px 20px;
    color: gray;
    font-weight: bold;
    border-radius: 0 16px 0 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.char-build-role > span.selected-role {
    border-color: lightgray;
    color: lightgray;
}

.char-build-role > span:hover {
    border-color: lightgray;
}

.char-build-role-desc {
    display: flex;
    justify-content: center;
}

.char-build-role-desc > span {
    width: 80%;
    text-align: center;
    color: lightgray;
}


.char-role-build-container {
    display: flex;
    border-radius: 0 20px;
    height: 100%;
    min-height: 0;
}

.char-role-builds-wrapper {
    max-width: 66%;
    padding: 20px 30px;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.char-role-build-section {
    padding: 5px 5px 10px 5px;
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: 10px;
    margin-bottom: 20px;
    background: rgb(0 0 0 / 30%);

    display: flex;
    flex-direction: column;
}

.access-link-section > .char-role-build-section {
    margin-bottom: 0px;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.char-role-build-section > h3 {
    color: lightgray;
    margin: 0;
    margin-bottom: 0.5em;
    background: linear-gradient(-90deg, rgba(74, 93, 135, 1) 0%, rgba(41, 54, 83, 1) 100%);
    padding: 5px;
    border-radius: 5px 5px 0 0;
    text-shadow: -4px 4px 5px rgb(0 0 0 / 20%);
}

.access-link-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
    min-height: 0;
}

.char-role-access-section > h3 {
    display: flex;
    justify-content: space-between;
}

.accessories-substats-button {
    padding: 0px 5px;
    border-radius: 6px;
    font-size: 0.9em;
    color: lightgray;
    cursor: pointer;
    transition: .3s;
}

.accessories-substats-button:hover {
    background: rgba(250, 250, 250, 0.15);
}

.role-stats-section {
    display: flex;
    gap: 30px;
}

/* LINK SKILL */

#char-role-ls-section {
    width: 100%;
}

.link-skill-list {
    display: flex;
}

.link-skill, .stat-slot {
    border: 2px solid rgb(74, 93, 135);
    height: 4em;
    width: 4em;
    border-radius: 5px;
    background-color: rgb(41 54 83);
    background: rgb(74, 93, 135);
    background: linear-gradient(0deg, rgba(74, 93, 135, 1) 0%, rgba(41, 54, 83, 1) 100%);
    position: relative;
    margin: 5px 1em;
    border: 2px solid rgb(74, 93, 135);
    cursor: pointer;
}

.link-skill > span, .stat-slot > span {
    background: rgb(74, 93, 135);
    color: white;
    font-weight: bold;
    aspect-ratio: 1 / 1;
    display: inline-block;
    width: 1em;
    text-align: center;
    z-index: 10;
    position: absolute;
    border-radius: 3px;
    top: -11%;
    right: -8%;
}

.link-skill > img {
    position: absolute;
}

.link-skill-t15 {
    top: 5%;
    left: 5%;
    height: 55%;
}

.link-skill-t20 {
    bottom: 5%;
    right: 5%;
    height: 55%;
}

.link-skill-selected {
    border: 2px solid rgb(153 170 208);
}

/* SLOTS */
.trans-order-list {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0 1em;
}

.stat-slot {
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-slot-image {
    height: 3.5em;
}

.sixth-slot-separator {
    width: 1px;
    background-color: gray;
    height: 2.5em;
}

.trans-order-slot-separator > svg {
    fill: gray;
    stroke: gray;
}

.trans-order-slot-separator {
    margin: 0 5px;
}

.sixth-slot-separator {
    margin: 0 10px;
}
/* ***** */

.accessories-list, .links-list {
    display: flex;
    flex-direction: column;
    padding: 0 5px;
    overflow-y: auto;
    min-height: 0;
    height: 100%;
}

.accessories-list::-webkit-scrollbar , .links-list::-webkit-scrollbar {
    width: 5px;
}

.accessories-list::-webkit-scrollbar-thumb, .links-list::-webkit-scrollbar-thumb {
    cursor: pointer;
    border-radius: 8px;
    background: #34415c;
}

.links-warning {
    color: brown;
    font-style: italic;
    font-size: 0.9em;
    display: block;
    text-align: end;
}

.accessories-build {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
    cursor: pointer;
    background: none;
    padding: 5px 0;
    border-left: 3px solid transparent;
}

.accessories-build:hover, .selected-accessories-build {
    background: rgb(93 123 185 / 10%);
}

.selected-accessories-build {
    background: rgb(93 123 185 / 10%);
    border-left: 3px solid rgb(153 170 208);
}

.accessories-build > .build-rank {
    text-align: center;
    background-color: rgb(34 53 93);
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    color: darkgray;
    font-weight: bold;
}

.accessories-build > .links-build-value {
    text-align: center;
    padding: 10px 0;
    margin: 5px;
    border-radius: 5px;
    color: lightgray;
    font-weight: bold;
    font-size: 0.9em;
    width: 4em;
    flex-shrink: 0;
}

.accessories-build > .accessories-name {
    color: lightgray;
    padding: 0 10px;
}

.accessories-build-thumb, .links-build-thumb {
    height: 3.5em;
    border-radius: 5px;
    background: rgb(74, 93, 135);
    background: linear-gradient(0deg, rgba(74, 93, 135, 1) 0%, rgba(41, 54, 83, 1) 100%);
    position: relative;
    display: flex;
    align-items: center;
}

.conditional-build-thumb {
    background: linear-gradient(0deg, rgb(178 122 40) 0%, rgba(74, 93, 135, 1) 50%, rgba(41, 54, 83, 1) 100%);
}

.not-recommended-build-thumb {
    background: linear-gradient(0deg, rgba(156,81,81,1) 0%, rgba(74,93,135,1) 50%, rgba(41,54,83,1) 100%);
}   

.accessories-build-thumb > .slot-thumb, .links-build-thumb > .slot-thumb {
    height: 80%;
    aspect-ratio: 1 / 1;
    position: relative;
}

.access-preset-dialog {
    height: 75%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* background-color: #111827; Dark background for contrast */
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    color: #e5e7eb; /* Light gray text */
    width: 60%;
    background: rgb(29 41 68);
    position: relative;
}

.access-preset-header {
    height: 5em;
    position: relative;
    border-bottom: 2px solid rgb(54 75 121 / 50%);
    width: 100%;
    flex-shrink: 0;
    background-color: #141b2a;
}

.access-preset-header-content {
    width: 100%;
    height: 100%;
    z-index: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(45deg, #000a1f 0%, rgb(28, 38, 60) 55%, transparent);
}

.access-preset-header-content > h2 {
  font-size: 1.75em;
  margin: 0 1.5em;
}

.access-preset-section {
    width: 100%;
    padding: 20px;
}

.access-preset-section-content {
    display: flex;
    flex-direction: column;
}

.access-substat-row {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #93c5fd;
}

.access-substat-row:last-child {
    border-bottom: none;
}

.access-substat-thumb {
    display: flex;
    gap: 8px;
    position: relative;
    padding-right: 20px;
}

.access-substat-thumb::after {
    content: "";
    display: inline-block;
    width: 1px;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, 0) 100%);
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
}

.access-substat-thumb > img {
    height: 2.5em;
    width: 2.5em;
    object-fit: contain;
}

.access-substat-row-separator {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    margin-right: 20px;
}

.access-substat-spe-level {
    min-width: 120px;
    text-align: center;
    font-weight: bold;
    color: #93c5fd; /* Light blue */
    margin: 0 0.5em;
}

.access-substat-desc {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #d1d5db;
    text-align: justify;
}

.access-substat-desc strong {
    color: burlywood;
}

.links-build-thumb > .slot-thumb {
    margin: 5px;
    border-radius: 10px;
}

.slot-thumb-art {
    height: 100%;
}

.slot-thumb-star {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 50%;
    background: radial-gradient(circle, rgba(255,95,121,1) 0%, rgba(23,23,23,0) 80%);;
}

.char-build-detail-wrapper {
    width: 100%;
    margin: 20px 0;
    min-height: 0;
    max-width: 100%;
}

.char-build-detail {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px 10px;
    position: relative;
    background: rgb(0 0 0 / 30%);
    box-shadow: 5px 5px 5px rgb(0 0 0 / 50%);
}

@media screen and (min-width: 1280px) {
    .char-build-detail::-webkit-scrollbar {
        width: 8px;
    }
    
    .char-build-detail::-webkit-scrollbar-thumb {
        background: #34415c;
        cursor: pointer;
        width: 3px;
        border: 2px solid #1a212e;
        border-radius: 8px;
    }
    
    .char-build-detail::-webkit-scrollbar-track {
        background: #1a212e;
    }
}


.hide-detail-button {
    position: absolute;
    top: 1%;
    right: 5%;
    height: 1.5em;
    width: 1.5em;
    display: none;
    cursor: pointer;
    z-index: 10;
}

.hide-detail-button > path {
    stroke: rgba(74, 93, 135, 1);
}

.hide-detail-button:hover > path {
    stroke: rgb(119, 139, 181);
}

.char-build-head {
    color: white;
    display: flex;
    padding-bottom: 10px;
    border-bottom: 1px solid rgb(255 255 255 / 20%);
}

.char-build-chara-link-head {
    flex-direction: column;
}

.char-build-chara-link-head > .char-build-main-info {
    margin-bottom: 0.5em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid rgb(255 255 255 / 20%);
}

.char-build-bonus-skill-head > .char-build-main-info {
    width: 100%;
    border: none;
    margin-bottom: 0.5em;
    padding-bottom: 0.5em;
}

.char-build-main-info {
    display: flex;
    flex-direction: column;
}

.char-build-main-info > h2 {
    margin: 0;
    padding-bottom: 0.5em;
}

.char-build-main-info > span {
    color: lightgray;
    display: flex;
}

.char-build-detail-section {
    color: white;
    display: flex;
    padding-bottom: 20px;
    padding-top: 10px;
}

.char-build-detail-section-col {
    flex-direction: column;
}

.char-build-detail-section:not(:last-child) {
    border-bottom: 1px solid rgb(255 255 255 / 20%);
}

.char-build-detail-section-name {
    margin: 0;
    color: rgb(255 255 255 / 30%);
    font-weight: bold;
    width: 5em;
    flex-shrink: 0;
}

.char-build-detail-section-col > .char-build-detail-section-name {
    width: 100%;
}

.char-build-detail-section-text {
    color: lightgrey;
    margin: 0;
    padding: 0 10px;
    text-align: justify;
    line-height: 1.3em;
    user-select: text;
}

.char-build-detail-section-text strong {
    color: burlywood;
}

.char-build-detail-link-level-perf {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 20px;
}

.char-build-detail-link-level-perf:last-child {
    border: none;
}

.char-build-detail-link-level-perf .build-perf {
    font-weight: bold;
}

.empty-section-text {
    font-style: italic;
    color: rgb(255 255 255 / 20%);
}

.char-detail-chara-link {
    display: flex;
    padding: 5px 0;
}

.char-detail-chara-link:not(:last-child) {
    border-bottom: 1px solid rgb(255 255 255 / 5%);
}

.char-detail-chara-link > img {
    height: 3.5em;
    border-radius: 10px;
}

.char-detail-chara-link-list {
    justify-content: center;
    font-weight: bold;
    display: flex;
    padding: 10px;
    flex-direction: column;
    color: lightgray;
}

.char-build-composition-section > div {
    background: rgb(0 0 0 / 30%);
    border-radius: 10px;
    padding: 0 10px;
}

.char-build-composition-section > span {
    font-style: italic;
    color: rgb(255 255 255 / 30%);
    font-size: 0.9em;
}

.char-build-bonus-skill-compo {
    display: flex;
    padding: 5px 0;
    margin: 10px 0;
    background: rgb(0 0 0 / 30%);
    border-radius: 10px;
}

.char-build-first-slot {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.char-build-bonus-skill-slot {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.char-build-bonus-skill-slot > img, .char-build-first-slot > img {
    height: 3.5em;
}

.char-build-head-thumb {
    flex-shrink: 0;
}

.char-build-head-thumb > .accessories-build-thumb {
    border: 2px solid rgb(74, 93, 135);
    height: 3.7em;
}

.indicator-conditional::before {
    height: 1em;
    width: 1em;
    display: inline-block;
    background: orange;
    border-radius: 50%;
    content: "";
    margin: 0 5px;
    border: 2px solid #f3cf8d;
    box-sizing: border-box;
}

.indicator-recommended::before {
    height: 1em;
    width: 1em;
    display: inline-block;
    background: green;
    border-radius: 50%;
    content: "";
    margin: 0 5px;
    border: 2px solid #7bcc7b;
    box-sizing: border-box;
}

.indicator-not-recommended::before {
    height: 1em;
    width: 1em;
    display: inline-block;
    background: brown;
    border-radius: 50%;
    content: "";
    margin: 0 5px;
    border: 2px solid #be6a6a;
    box-sizing: border-box;
}

.conditional-indicator-thumb {
    height: 20px;
    position: absolute;
    top: 0px;
    left: 0px;
    margin: 0;
    background: rgb(0 0 0 / 25%);
    border-radius: 20%;
    margin: 0;
    z-index: 3;
}

.not-recommended-indicator-thumb {
    height: 20px;
    position: absolute;
    top: 0px;
    left: 0px;
    margin: 0;
    background: radial-gradient(circle, rgba(200, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 75%), rgb(0 0 0 / 20%);
    border-radius: 20%;
    margin: 0;
}

.link-skill > .not-recommended-indicator-thumb, .link-skill > .conditional-indicator-thumb {
    bottom: 1px;
    top: unset;
    bottom: 0;
    left: 0;
}

@media screen and (max-width: 1200px) {
    .access-link-section {
        grid-template-columns: 1fr;
    }

    .access-link-section > .char-role-build-section {
        margin-bottom: 20px;
    }
}

@media screen and (max-width: 768px) {
    .char-role-builds-wrapper {
        max-width: 100%;
        padding: 10px;
        width: 100%;
    }

    .role-stats-section {
        flex-direction: column;
        gap: unset;
    }

    .access-link-section > .char-role-build-section {
        margin-bottom: 20px;
    }

    .char-role-build-section {
        width: 100%;
    }

    .char-build-detail {
        display: block;
        width: 100%;
        flex-shrink: 0;
        background: rgb(21 28 43);
        transition: .3s;
        z-index: 10;
        padding-top: 2em;
    }

    .char-build-detail-selected {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        margin: 0;
        background: rgb(0 0 0 / 75%);
        z-index: 99;
        display: flex;
        align-items: end;
    }
    
    .char-build-detail {
        height: 80%;
        max-height: 85%;
        overflow-y: auto;
        border-radius: 20px 20px 0 0;
        border: 2px solid rgb(54 75 121);
        border-bottom: 0;
        transition: .3s;
        opacity: .5;
        transform: translateY(2em);
    }

    .char-build-detail-selected > .char-build-detail {
        opacity: 1;
        transform: translateY(0);
    }

    .hide-detail-button {
        display: block;
    }

    .char-build-head {
        padding-top: 1em;
    }

    .access-link-section {
        grid-template-columns: 1fr;
    }

    .char-build {
        padding: 10px 0px;
        width: 100%;
    }

    .accessories-build > .accessories-name {
        display: none;
    }

    .accessories-build-thumb, .links-build-thumb {
        width: 100%;
        justify-content: center;
    }

    .accessories-build-thumb, .links-build-thumb {
        height: 4em;
    }

    .link-skill-list {
        overflow-x: auto;
    }

    .link-skill {
        flex-shrink: 0;
    }

    .trans-order-list {
        justify-content: center;
    }

    .access-substat-row {
        flex-direction: column;
        gap: 10px;
    }

    .access-substat-thumb {
        padding-right: 0;
    }

    .access-substat-thumb::after {
        content: none;
    }

    .access-preset-dialog {
        width: 100%;
        border-radius: 10px 10px 0 0;
        height: 80%;
    }
}