:root {
    --background: rgba(0, 0, 0, 0.85);
    --background-lighter: rgba(50, 50, 50, 0.85);
    --background-light: rgba(255, 255, 255, 0.95);
    --background-dark-grey: rgba(100, 100, 100, 1.0);
    --background-grey: rgba(200, 200, 200, 1.0);
    --background-transparent: rgba(0, 0, 0, 0.7);
    --exp-bar-color: rgb(100,200,225);
    --text-color: #fff;
    --text-color-dark: black;
    --text-color-light: rgb(50,50,50);
    --global-rank-color: rgba(255, 255, 255, 0.6);
    --highlight: rgba(30,30,30,0.85);
    --border-color: rgba(250,250,250,1.0);
    --button-color: #ffcc00;
    --secondary-color: rgb(100,200,225);
    --secondary-color-darker: rgb(92, 169, 202);
    --gems-border: rgb(100,200,225);
    --gems-background: rgba(0,200,225,0.2);
    --coins-border: rgb(255, 204, 0);
    --coins-background: rgba(255, 204, 0,0.2);
    --def-effect-color: rgba(100,200,225, 0.5);
    --attack-effect-color: rgba(255, 180, 0, 0.5);
    --warning-color: rgb(200, 50, 50);
    --fsize17: 17px;
    --fsize18: 18px;
    --fsize20: 20px;
    --fsize22: 22px;
    --fsize25: 25px;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    top:0px;
    position:absolute;
    overflow: hidden;
    background-color: black;
    font-family: 'Montserrat', serif;
    user-select: none;
    letter-spacing: 0px;
    font-size: 17px;
    font-weight:450;
}

img {
    user-select: none;
    pointer-events: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

button {
    all:unset;
}

.video-container {
    position: fixed; /* Use fixed positioning to cover the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide any overflow */
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%; /* Fill the width of the wrapper */
    height: auto; /* Maintain aspect ratio */
    min-height: 100%; /* Ensure it covers the height of the wrapper */
    transform: translate(-50%, -50%);
    object-fit: cover; /* Cover the entire area */
    -webkit-user-drag: none;
}

  
.color-white {
    color: white;
}

.lower-menus {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    min-height: 0;
}

.carbon-border {
    position: relative;
    border-radius: 1rem;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.carbon-dark-border {
    position: relative;
    border-radius: 1rem;
    padding: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.15);
}

.menu {
    display:flex;
    flex-direction:column;
    height:100vh;
}
.symbol {
    display: inline; /* Ensures it behaves like text */
    height: 1em; /* Keeps aspect ratio */
    vertical-align: middle; /* Aligns with text baseline */ 
    transform: scale(1.75);
    margin-left:0.25em;
    margin-right:0.25em;
}


.carbon-fibre {
    color: var(--text-color);
    background-image: 
      linear-gradient(to right, var(--background), var(--background)), 
      repeating-linear-gradient(-45deg, rgba(255,255,255, 0.45), rgba(255,255,255, 0.45) 1px, transparent 1px, transparent 6px);
}

.carbon-plain {
    color: var(--text-color);
    background-image: 
      linear-gradient(to right, var(--background), var(--background));
}

.carbon-dark {
    color: var(--text-color);
    background-image: 
      linear-gradient(to right, black, var(--background));
}

.carbon-blue {
    color: var(--text-color-dark);
    background-image: 
      linear-gradient(to right, var(--secondary-color), var(--secondary-color));
}

.carbon-red {
    color: var(--text-color-dark);
    background-image: 
      linear-gradient(to right, var(--warning-color), var(--warning-color));
}

.carbon-yellow {
    color: var(--text-color-light);
    font-weight: 500;
    background-image: 
      linear-gradient(to right, var(--button-color), var(--button-color)), 
      repeating-linear-gradient(-45deg, rgba(255,255,255, 0.45), rgba(255,255,255, 0.45) 1px, transparent 1px, transparent 6px);
}


.carbon-light {
    color: var(--text-color-dark);
    font-weight: 500;
    background-image: 
      linear-gradient(to right, var(--background-light), var(--background-light)), 
      repeating-linear-gradient(-45deg, rgba(255,255,255, 0.45), rgba(255,255,255, 0.45) 1px, transparent 1px, transparent 6px);
}

.carbon-grey {
    color: var(--text-color-dark);
    font-weight: 500;
    background-image: 
      linear-gradient(to right, var(--background-grey), var(--background-grey)), 
      repeating-linear-gradient(-45deg, rgba(255,255,255, 0.45), rgba(255,255,255, 0.45) 1px, transparent 1px, transparent 6px);
}

.carbon-dark-grey {
    color: var(--text-color-dark);
    font-weight: 500;
    background-image: 
      linear-gradient(to right, var(--background-dark-grey), var(--background-dark-grey)), 
      repeating-linear-gradient(-45deg, rgba(255,255,255, 0.45), rgba(255,255,255, 0.45) 1px, transparent 1px, transparent 6px);
}

.carbon-lighter {
    color: var(--text-color);
    background-image: 
      linear-gradient(to right, var(--background-lighter), var(--background-lighter));
}

img:not([src]) {
    font-size: 0; /* Hide the text by setting font size to 0 */
    position: relative; 
    opacity: 0;
}

.slide-left {
    transition: transform 0.3s ease; /* Transition effect for the transform property */
    cursor: pointer;
}

.slide-right {
    transition: transform 0.3s ease; /* Transition effect for the transform property */
}

.slide-forward {
    transition: transform 0.3s ease; /* Transition effect for the transform property */
}

.brighten {
    transition: transform 0.3s ease; /* Transition effect for the transform property */
}

.darken {
    transition: transform 0.3s ease; /* Transition effect for the transform property */
}

.slide-left:hover {
    transform: translateX(-40px);
}

.slide-right:hover {
    transform: translateX(10px);
}

.slide-forward:hover {
    transform: scale(1.05);
}

.brighten:hover {
    filter: brightness(1.5);
    transform: scale(1.01);
}

.expand:hover {
    transform: scale(1.01);
}

.darken:hover {
    filter: brightness(0.75);
}

.brighten.carbon-yellow:hover {
    filter: brightness(1.1);
    transform: scale(1);
}

.character-container {
    display: flex;
    left: 75px;
    bottom:0px;
}

.character-image {
    max-height: 100%;
    height: calc(100vh - 70px);
}

#character-map {
    cursor:pointer;
}

/* visual novel */

.novel-container .game-screen {
    position: absolute;
    top:0px;
    left:0px;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.game-screen div {
    pointer-events: all;
}

.controls {
    position: absolute;
    top:0px;
    left:0px;
    margin:15px;
    display:flex;
    flex-direction:row;
    gap:20px;
    z-index: 4;
}

.button-large {
    display: flex;
    padding:15px;
    align-content:center;
    justify-content:center;
    cursor:pointer;
    flex-wrap: wrap;
    border-radius:5px;
    font-size:18px;
    padding-left: 30px;
    padding-right: 30px;
}

.button-medium {
    padding:10px;
    align-content:center;
    justify-content:center;
    cursor:pointer;
    border-radius:5px;
}

.button-small {
    padding:10px;
    padding-left:13px;
    padding-right:13px;
    align-content:center;
    justify-content:center;
    cursor:pointer;
    border-radius:5px;
    font-size:15px;
}


.flipped {
    transform: scaleX(-1);
}

.raised {
    transform: translateY(-200px);
}

.dimmed {
    filter: brightness(70%);
}

.removed {
    display: none !important;
}

.hidden {
    opacity: 0 !important;
    pointer-events: none !important; 
}

.displaynone {
    display: none !important;
}

.hidden div {
    opacity: 0;
    pointer-events: none !important; 
}

.hidden button {
    opacity: 0;
    pointer-events: none !important; 
}

*::-webkit-scrollbar {
    background-color: transparent;
    width: 15px;
}
*::-webkit-scrollbar-track {
    background-color: transparent;
}
*::-webkit-scrollbar-thumb {
    border-radius: 20px;
    border: 4px solid transparent;
    background-color: rgba(0,0,0,0.1);
    background-clip: content-box;
}

/* Dim Animation */
.dim {
    filter: brightness(100%);
    animation: dim 0.5s forwards; /* Adjust duration as needed */
}

@keyframes dim {
    to {
      filter: brightness(70%);
    }
}

@keyframes cooldown {
    to {
      transform: translateY(100%);
    }
}

.undim {
    filter: brightness(70%);
    animation: undim 0.5s forwards; /* Adjust duration as needed */
}

@keyframes undim {
    to {
      filter: brightness(100%);
    }
}


@keyframes slideInFromRight {
    from {
        transform: translateX(100%); /* Start off-screen to the right */
        opacity: 0; /* Optional: Make it fade in as well */
    }
    to {
        transform: translateX(0); /* End at its original position */
        opacity: 1;
    }
}

@keyframes fadeInStd {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Darken Animation */

@keyframes darken {
    to {
      background: rgba(0,0,0,0.2);
    }
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s forwards; /* Adjust duration as needed */
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}


.fade-in-fast {
    opacity: 0;
    animation: fadeInFast 0.2s forwards; /* Adjust duration as needed */
}

@keyframes fadeInFast {
    to {
        opacity: 1;
    }
}

/* Fade Out Animation */
.fade-out {
    opacity: 1;
    animation: fadeOut 0.5s forwards; /* Adjust duration as needed */
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

.fade-out-fast {
    opacity: 1;
    animation: fadeOut 0.2s forwards; /* Adjust duration as needed */
}

@keyframes fadeOutFast {
    to {
        opacity: 0;
    }
}


.novel-container .character-name {
    position:relative;
    height:50px;
    color:rgb(255,215,0);
    justify-content: center;
}

.novel-container .dialogue {
    position:relative;
    margin-left:200px;
    margin-right:200px;
    flex-grow:1;
    font-size: var(--fsize20);

}

/* Preloader */


.preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;  
    user-select: none;
    z-index: 99;
}

.preloader-reactive {
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;  
    user-select: none;
    z-index: 1;
}

.black {
    background-color: black;
}


.white {
    background-color: white;
}


/* modes menu */

.background-container {
    position: fixed; /* Use fixed positioning to cover the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide any overflow */
    backdrop-filter: blur(5px);
}

.background-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%; /* Fill the width of the wrapper */
    height: auto; /* Maintain aspect ratio */
    min-height: 100%; /* Ensure it covers the height of the wrapper */
    transform: translate(-50%, -50%);
    object-fit: cover; /* Cover the entire area */
}

.stage-menu .background-container {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide any overflow */
    backdrop-filter: none;
}

.stage-menu .background-container img {
    top: 50%;
    left: 50%;
    width: 100%; /* Fill the width of the wrapper */
    height: auto; /* Maintain aspect ratio */
    min-height: 100%; /* Ensure it covers the height of the wrapper */
    transform: translate(-50%, -50%);
    opacity: 1;
    object-fit: cover; /* Cover the entire area */
}


.blurred {
    filter: blur(5px);
}

.slide-in-fast {
    opacity: 0;
    animation: slide-in 0.15s ease-out forwards;
}


.slide-in {
    opacity: 0;
    animation: slide-in 0.3s ease-out forwards;
}

@keyframes slide-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
.slide-in-long {
    opacity: 0;
    animation: slide-in-long 0.5s ease-out forwards;
}

@keyframes slide-in-long {
    0% {
        transform: translateX(20%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(50%);
    opacity:0;
    animation: slide-up 0.2s ease-out forwards;
}

@keyframes slide-up {
    0% {
        opacity:0;
        transform: translateY(50%);
    }
    100% {
        opacity:1;
        transform: translateY(0);
    }
}


/* Delay animations for each menu item */
.mode-item.story {
    animation-delay: 0s;
}
.mode-item.challenge {
    animation-delay: 0.05s;
}
.mode-item.training {
    animation-delay: 0.1s;
}

.modes-menu .controls {
    top: 85px;
}

/* For Webkit browsers (Chrome, Safari) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* For Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* For Edge */
input[type="number"]::-ms-clear {
    display: none;
}


.hide-preloader {
    filter: opacity(100%);
    animation: hide-preloader 0.1s forwards;/
}


@keyframes hide-preloader {
    to {
      filter: opacity(0%);
    }
}

.hide-preloader-long {
    filter: opacity(100%);
    animation: hide-preloader 0.5s forwards;
}


@keyframes hide-preloader-long {
    to {
      filter: opacity(0%);
    }
}
