* {
    margin: 0;
    scrollbar-width: none;
}

body {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: rgb(100, 0, 155);
}

a{
    color: white;
}

#main-menu {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}
#button-frames {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: scroll;
}
#menu-holder {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    /* gap: ; */
}
#menu-button-container {
    width: auto;
    height: 90vh;
    
    overflow-y: scroll;
    overflow-x: hidden;

    scroll-behavior: smooth;
    scrollbar-width: thin;

    /* border: solid rgb(100, 0, 155) 0.5rem; */
    /* border-radius: 5rem; */
    scrollbar-color: black blueviolet;

}

#subcreature-frame {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100vw;
    height: 100vh;
}
#play-screen {
    width: 100vw;
    height: 100vh;

    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#selections {
    width: 100vw;
    height: 50vh;

    display: flex;
    justify-content: space-evenly;
    align-items: center;
}
.selection {
    width: 28vw;
    height: 35vw; /* Slightly taller for a card feel */
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 4px solid #fff;
    background-color: #3d005e;
    background-image: url('./Images/background.png'), linear-gradient(135deg, #64009b 0%, #3d005e 100%);
    
    background-size: cover;    
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), inset 0 0 50px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;

    /* font-size: 1.2rem !important; */
    color: #00f2ff;
    font-family: 'Courier New', Courier, monospace; /* Arcade feel */
    /* line-height: 1.4; */
}
.selection:hover {
    transform: scale(1.05) translateY(-10px);
    border-color: #00f2ff; /* Cyber blue glow */
    box-shadow: 0 15px 30px rgba(0, 242, 255, 0.4);
}

#creature-selection-frame {
    width: 55vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgb(100, 0, 155);
    border-top-right-radius: 5rem;
    border-top-left-radius: 5rem;
    border: solid black 0.5rem;
}

#player-turn-selection {
    color: blue; 
    border-left: solid black 0.5rem;
    border-right: solid black 0.5rem; 
    background-color: white; 
    border-top-right-radius: 5rem; 
    border-top-left-radius: 5rem; 
    padding: 1rem 1rem 0 1rem;
}

#creature-selection-holder {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    overflow: auto;
    scrollbar-width: none;
    border-top-right-radius: 5rem;
    border-top-left-radius: 5rem;
    border-top: solid black 0.5rem;
}
#typeChartDisplay,
#attacksCatalog {
    /* Dimensions & Positioning */
    max-width: 35vw;
    height: 85vh;
    padding: 2.5rem;
    
    /* Elegant Sidebar Shape */
    border-top-left-radius: 3rem;
    border-bottom-left-radius: 3rem;
    border: 0.3rem solid rgba(255, 255, 255, 0.2);
    border-right: none; /* Blends into the screen edge */

    /* Typography */
    font-size: clamp(1rem, 1.2vw, 2rem);
    color: #f0f0f0;
    line-height: 1.6;

    /* Background: Deep Purple with Glass Effect */
    background: linear-gradient(135deg, rgba(80, 0, 120, 0.95), rgba(40, 0, 70, 0.98));
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);

    /* Layout */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    
    /* Scrolling */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #9370DB transparent;
}

/* Custom Scrollbar for Drawer */
#typeChartDisplay::-webkit-scrollbar,
#attacksCatalog::-webkit-scrollbar {
    width: 6px;
}

#typeChartDisplay::-webkit-scrollbar-thumb,
#attacksCatalog::-webkit-scrollbar-thumb {
    background: #9370DB;
    border-radius: 10px;
}

/* Headers inside the drawers */
#typeChartDisplay h2,
#attacksCatalog h2 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #9370DB;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #e0bbff;
}

/* List Item Styling (Assuming you use <li> or <div> for moves/types) */
.remove-list-style div, 
.remove-list-style li {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.remove-list-style div:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #9370DB;
    padding-left: 1.2rem;
}
#scoreboardDisplay{
    width: auto;
    overflow-y:scroll;
    display: flex;
    justify-content: center;
    align-items: center;
    border: solid black 0.5rem;
    border-radius: 4rem;
}
#type-select-container{
    text-align: center;
    background-image: url('./Images/pure-card.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-size: 2.5em;
    width: auto;
    height: 10em;
    border: none;
    background-color: transparent;
}
#type-select-container option{
    color: purple;
    background-color: black;
}

#sudden-death-timer {
    color: red;
    position: absolute;
    top: 6px;
}
#rounds-display {
    color: lavender;
    position: absolute;
    top: 8px;
}
#winner-heading {
    color: yellow;
    display: none;
    /* position: absolute; */
    z-index: 2;
}
#page-buttons-holder{
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}
#dark-transition {
    width: 100vw; 
    height: 100vh; 
    display: none; 
    position: absolute; 
    z-index: 1; 

    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* CLASSES */
.reponse{
    border: solid black 0.5rem;
    width: auto;
    height: auto;
    margin: 5rem 0 5rem 0;

    padding: 1rem;
}
.button-frame {
    overflow: scroll;
}
.content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* gap: 5rem; */
    font-size: 3vw;
    text-align: center;
    color: lavender;
}
#updates-screen .content{
    margin: 2rem 0 2rem 0;
    border: solid black 0.5rem;
}
.response {
    /* margin: 10rem 0 10rem 0; */
    /* margin-top: 12rem; */
    margin-bottom: 3rem;
    margin-top: 3rem;
}
.creature-frame-button{
    background-image: url('./Images/pure-card.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 10em;          /* scales with font-size */
    height: 4em;          /* scales with font-size */
    background-color: transparent;
    font-size: 2.5em;       /* can adjust this */
    border-radius: 2em;
    cursor: pointer;
    transition: all 0.1s ease;
    color: black;
    border: none;
    font-weight: 900;
}
.home-screen-button, .return-to-playscreen{
    pointer-events: all;
    font-size: 5vw;
    width: 8vw;
    height: auto;
    background: red;
    border: solid black 0.5rem;
    border-radius: 10rem;
    cursor: pointer;
    margin: 2rem;
    z-index: 999;
}

.creature-box{
    width: 16rem;
    min-height: 10rem; 
    max-height: 35rem; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    background-image: url('./Images/card.png'); 
    background-size: 100% 100%; 
    background-repeat: no-repeat; 
    background-size: fixed;
}

.creature-chooseButton{
    width: 100%;
    font-size: 5vh;
    position: relative;
    top: 15px; 
    cursor: pointer; 
    transition: all ease 0.5s 1s;
    border: none; 
    background: none; 
    color: white;
    margin-bottom: 2rem;
    font-weight: bold;
}
.creature-type{
    font-size: 4vh;
    font-weight: bold; 
    position: relative;
    bottom: 0;
    background-color: #9e55bd;
    border: solid black 0.5rem;
    border-radius: 12rem;
    padding: 0.5rem;
}
.type-element{
    /* margin: 2rem; */
    width: 100%;
}
.type-element p {
    margin: 0;
    padding: 0;
}
.lightblue-color {
    color: lightblue;
}
.lightcoral-color {
    color: lightcoral;
}

.player-heading{
    text-align:center; 
    font-size: 1.9rem; 
    margin: 1rem 1rem;
    font-weight: bold;
}

.center-text { 
    text-align: center;
}
.remove-list-style {
    list-style-type: none;
}
.top-bar {
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}
.top-bar-close {
    align-self: flex-start;
}

.top-bar-logo {
    position: relative;
}

.menu-logo {
    margin: auto;
    transform: rotate(-5deg);
    z-index: 11;
}
.menu-button {
    background-image: url('./Images/button-card.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 10em;          /* scales with font-size */
    height: 4em;          /* scales with font-size */
    background-color: transparent;
    font-size: 2.5em;       /* can adjust this */
    border-radius: 2em;
    cursor: pointer;
    transition: all 0.1s ease;
    color: lavender;
    border: none;
    font-weight: 900;
    margin: 1rem 0 1rem 0;
}
.menu-button:hover, .creature-frame-button:hover {
    background-image: url('./Images/pure-card.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    color: black;
}

.flex-status{
    display: flex; 
    justify-content: space-evenly; 
    flex-wrap: wrap; 
    align-items: center; 
    gap: 1rem;
}
.flex-status-column{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.background-fade-img {
    background-image: url('./Images/background.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.decoration {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    /* background-repeat: repeat-x;
    background-size: contain; */
}

.top {
    top: 0.2rem;
    /* background-image: url('/top_decores.png'); */
}

.bottom {
    bottom: 0.2rem;
    /* background-image: url('/bottom_decores.png'); */
}

.attack-list {
    font-size: clamp(1rem, 2vw, 5vw);
}
/* ANIMATIONS */
.bounceIn {
    animation: bounceIn 2.5s ease forwards;
}

.divider {
    width: 100vw;
    height: 1.5rem;
    background-color: black;
    margin: 2rem 0 2rem;
    opacity: 0.6;
}
@keyframes bounceIn {
    0% {
        font-size: 1vw;
    }
    50% {
        opacity: 1;
        font-size: 3vw;
    }
    70% {
        font-size: 4vw;
    }
    100% {
        font-size: 5vw;
    }
}

.slideToTop {
    animation: slideToTop 2.5s ease-out;
    animation-delay: 0.5s;
    left: 50%;
    transform: translateX(-50%);
}
@keyframes slideToTop {
    0% {
        transform: translate(-50%, 0);
    }
    100% {
        transform: translate(-50%, -100vh);
    }
}

.slideToMiddle {
    animation: slideToMiddle 2.5s ease-out;
    animation-delay: 0.5s;
    left: 50%;
    transform: translateX(-50%);
}
@keyframes slideToMiddle {
    0% {
        transform: translate(-50%, 100vh);
    }
    100% {
        transform: translate(-50%, 0);
    }
}
#page-count {
    font-size: clamp(1rem, 3vw, 6rem);
    color: lavender;
}
/* PLAY SCREEN STYLES */
#play-screen {
    width: 100vw;
    height: 100vh;

    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#selections {
    width: 100vw;
    height: 50vh;

    display: flex;
    justify-content: space-evenly;
    align-items: center;
}
.selection {
    width: 25vw;
    height: 25vw;   

    cursor: pointer;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    align-items: center;

    border: solid white 0.5rem;

    background-color: rgb(100, 0, 155);
    color:  lavender;

    border-radius: 2rem;
    text-align: center;

    /* transition: all 1s ease; */
}
#info-section {
    width: 25vw;
    height: 25vw;   

    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;

    border: solid white 0.5rem;

    background-color: rgb(100, 0, 155);

    border-radius: 2rem;

    /* transition: all 0.5s ease; */
}
.info-section-frame{
    display: none;
}
.selection:hover, #info-section:hover{
    border-color: black;
}
/* .selection:hover, #info-section:hover {
    background: lavender;
    color:  rgb(100, 0, 155);

    font-size: 1.2em;
}
#info-section:hover > button{
    color: black;
    font-weight: bold;
} */
.selection h2{
    font-size: 3em;
    
    position: relative;
    bottom: 35%;

    border-radius: 5rem;
}
.selection h3{
    width: 100%;

    font-size: 1.5em;
    margin: 1rem;
    color: red;

    background-color: lavender;

    border-radius: 5rem;
}
.info-section-button {
    background-image: url('./Images/button-card.png'); 
    background-size: 100% 100%; 
    background-repeat: no-repeat; 
    background-size: fixed;

    width: 7em;
    max-width: 7em;
    height: 100%;

    font-size: 2.5em;
    margin: 1rem;

    border-radius: 5rem;

    background-color: transparent;
    color: lavender;
    border: none;

    cursor: pointer;
}
.info-section-button:hover {
    background-image: url('./Images/pure-button-card.png'); 
    background-size: 100% 100%; 
    background-repeat: no-repeat; 
    background-size: fixed;

    width: 7em;
    height: 100%;

    font-size: 2.5em;
    margin: 1rem;

    border-radius: 5rem;

    background-color: transparent;
    color: black;
    font-style: italic;
    border: none;

    cursor: pointer;
}
.not-ready {
    font-size: 5em;
    padding: 1rem;
    position: relative;
    top: 5rem;

    color: red;
    background-color: rgb(37, 37, 37);

    border-radius: 5rem;
    border: solid black 0.5rem;
}
.ready {
    cursor: pointer;
    font-size: 5em;
    padding: 1rem;
    position: relative;
    top: 5rem;

    color: lime;
    background-color: rgb(255, 255, 255);

    border-radius: 5rem;
    border: solid lime 0.5rem;
}
/* SELECTIONS SCREEN */
#selection-screens {
    width: 100vw;
    height: 100vh;

    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#selection-frames {
    display: none;
}
/* MAP SELECTION FRAME */
#map-selection-frame {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.85); /* Darken background to make maps pop */
    overflow: hidden;
}

#map-catalog {
    width: 90vw;
    height: 70vh;
    display: grid;
    /* Creates a responsive grid that fits maps automatically */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    
    border-top: solid #9370DB 0.4rem; /* Matching your BlueViolet theme */
    border-bottom: solid #9370DB 0.4rem;
    
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #9370DB #1a1a1a;
}

/* Custom Scrollbar for Chrome/Safari/Edge */
#map-catalog::-webkit-scrollbar {
    width: 10px;
}
#map-catalog::-webkit-scrollbar-track {
    background: #1a1a1a;
}
#map-catalog::-webkit-scrollbar-thumb {
    background: #9370DB;
    border-radius: 10px;
}

.map-display {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.map-display:hover {
    background: rgba(147, 112, 219, 0.2);
    border-color: #9370DB;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.map-display h2 {
    color: lavender;
    font-family: 'Segoe UI', sans-serif;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px black;
    font-size: 1.5rem;
}

.map-display img {
    width: 100%;
    height: auto;
    max-width: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin: 1rem 0;
}

.map-display button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    background: #9370DB;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.map-display button:hover {
    background: #b19cd9;
    letter-spacing: 1px;
}

.map-display button:active {
    transform: scale(0.95);
}
#beasteskit-selection-frame{
    width: 100vw;
    height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    overflow: hidden;
}
#selection-heading {
    font-size: 3vw;
    color: rgb(80, 90, 238);
}
#beasteskits-content-container {
    width: 80vw;
    /* min-width: 50rem; */
    /* max-width: 85vw; */
    height: 80vh;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    gap: 2rem;

    /* border: orange solid 0.5rem; */
    border-top: solid black 0.5rem;
    border-bottom: solid black 0.5rem;
    border-left: solid black 0.5rem;

    /* background-color: rgb(100, 0, 155); */
    background: transparent;

    /* overflow: hidden; */
    /* overflow: scroll; */
    overflow-y: scroll;
    overflow-x: hidden;
    /* scrollbar-width: none; */
}
#beasteskit-stats-revealer {
    max-width: 45vw;
    height: 100vh;

    font-size: clamp(1.2rem, 2vw, 10rem);

    display: flex;
    flex-direction: column;
    
    gap: 0.5rem;
    padding: 2rem;

    border-top-left-radius: 5rem;
    border-bottom-left-radius: 5rem;
    border: solid black 0.5rem;

    padding: 2rem;
    overflow-y: scroll;
    overflow-x: hidden;
    
    background-color: rgb(100, 0, 155);
    scrollbar-color: white white;
    scrollbar-width: thin;
}
/* Styles the entire scrollbar */
#beasteskit-stats-revealer::-webkit-scrollbar {
  width: 12px;
}

/* Styles the track (background) */
#beasteskit-stats-revealer::-webkit-scrollbar-track {
  background: orange;
}

/* Styles the thumb (draggable handle) */
#beasteskit-stats-revealer::-webkit-scrollbar-thumb {
  background-color: blue;
  border-radius: 20px;
  border: 3px solid orange; /* creates padding around the thumb */
}


#name-display {
    width: 100%;

    font-size: 3vw;

    /* margin-bottom: 5rem; */
}
.display-status {
    margin: 2rem 0 2rem 0;
}
#status-header {
    margin-top: 4rem;
    text-align: center;
}
.status-heading {
    font-size: 3vw; 

    align-self: flex-start;
}
.status-div {
    width: 100%; 

    margin-top: 2rem;

    display: flex; 
    flex-direction: column; 
    align-items: center;

    background-color: lavender;

    border: dashed black 0.35rem;
}
#image-display {
    width: 8rem;
    height: 8rem;

    padding: 0;
    margin: 0;
}
.attacks-display {
    width: 25vw;
    height: 90vh;
    flex-direction: column;
    text-align: center;
    overflow-y: scroll;
    gap: 0.5rem;
}
.status-list {
    font-size: 2vw;
    margin: 1.5rem;

    /* border: solid 1rem cyan; */
    border: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;

    border-radius: 1rem;
}
.status-list:hover {
    transform: scale(1.05) translateY(-10px);
    border-color: #00f2ff; /* Cyber blue glow */
    box-shadow: 0 15px 30px black;
}
/* #beasteskits-content {
    border: solid black 0.5rem;

    width: 50rem;
    height: auto;

    overflow-y: auto;
    overflow-x: hidden;

    background-color: rgb(100, 0, 155);
} */
.page {
    margin-top: 5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    grid-auto-rows: auto;                  /* rows grow automatically */
    gap: 1rem;
    width: 50vw;
}
.beasteskit-display {
    width: fit-content;
    height: fit-content;

    /* border: solid cyan 0.5rem; */

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: center;

    /* margin-bottom: 5rem; */
    margin-top: 2rem;

    background-image: url('./Images/beasteskit-card.png');
    background-size: 100% 100%; 
    background-repeat: no-repeat; 
    background-size: fixed;
}
.beasteskit-display button {
    font-size: large;

    width: 100%;

    font-weight: 900;

    border: solid black 0.25rem;
    border-bottom: none;
    border-radius: 2rem;

    cursor: crosshair;
}
.beasteskit-display p {
    width: 100%;
    
    font-size: x-large;
    font-weight: 900;

    color: lavender;
    /* border: solid rgb(100, 0, 155) 0.5rem; */
    border-bottom: none;
    border-right: none;
    border-left: none;
    
    padding: 0.5rem;

    text-align: center;

    position: relative;
    bottom: 0.5rem;
}
.beasteskit-display img {
    height: 10rem;
    width: 10rem;
}

/* PAGE BUTTONS */
#page-buttons-holder {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    gap: 1.5rem;
}
#pages-display {
    color: lavender;
    font-size: 3vw;
}
.page-button {
    background: none;
    color: lavender;

    border: 0.5rem solid black;
    border-top: none;

    font-size: 3vw;
    cursor: pointer;
}
#weakStatusDiv{
    display: none !important;
}
/* Loading screen */
#loading-screen{
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(20,0,40,0.95));
  z-index: 9999;
  transition: opacity 350ms ease, visibility 350ms ease;
  visibility: visible;
  opacity: 1;
}

#loading-screen.loading-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-wrap{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  color: #fff;
}

.progress-bar{
  width: 320px;
  height: 14px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.08);
}

.progress-fill{
  height: 100%;
  /* background: linear-gradient(90deg,#ff7a18,#ffd200); */
  background-color: magenta;
  width: 0%;
  transition: width 300ms ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

#loading-text{
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}
/* Scoreboard styles */
#scoreboardContent { 
    height: 90vh;
    overflow-y: scroll;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  padding: 1rem;
  box-sizing: border-box;
  color: lavender;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial;
}

/* Control bar at top (add player) */
#scoreboardContent > div:first-child {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
#scoreboardContent input[type="text"],
#scoreboardContent input[placeholder] {
  flex: 1 1 auto;
  padding: 0.6rem 0.8rem;
  border-radius: 1rem;
  border: 0.35rem solid black;
  background: rgba(255,255,255,0.06);
  color: lavender;
  font-size: 1.1rem;
  outline: none;
}
#scoreboardContent input::placeholder { color: rgba(230,230,250,0.5); }

/* Add player button in control bar */
#scoreboardContent > div:first-child button {
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  border: 0.35rem solid black;
  background-image: url('./Images/button-card.png');
  background-size: cover;
  background-position: center;
  color: lavender;
  font-weight: 900;
  cursor: pointer;
}

/* Player card */
.score {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.5rem;
  background-image: url('./Images/pure-card.png');
  background-size: cover;
  background-position: center;
  border: 0.5rem solid black;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

/* Left column: rank & name */
.score h1, .score h2, .score h3 {
  margin: 0;
  color: black;
  text-shadow: none;
}
.score h1 { font-size: 1.4rem; font-weight: 900; color: yellow; }
.score h2 { font-size: 1.2rem; font-weight: 900; color: lavender; }
.score h3 { font-size: 1rem; font-weight: 700; color: lightgreen; }

/* Middle stretch area (optional) */
.score .meta {
  flex: 1 1 auto;
  padding-left: 1rem;
}

/* Buttons group on right */
.score > button,
.score .btn {
  margin-left: 0.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: 1rem;
  border: 0.35rem solid black;
  background-color: transparent;
  cursor: pointer;
  font-weight: 900;
  color: black;
  min-width: 3.8rem;
}

/* Specific button visuals */
.score .addWin {
  background-image: url('./Images/pure-card.png');
  color: lime;
  background: transparent;
}
.score .removeWin {
  background-image: url('./Images/pure-card.png');
  color: #ff4a4a;
  background: transparent;
}
.score button:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.55);
}

/* Remove player button smaller / subtle */
.score button:last-of-type {
  background: rgba(0,0,0,0.06);
  color: lavender;
  border-style: dashed;
}

/* Responsive: stack card items on narrow screens */
@media (max-width: 700px) {
  .score {
    flex-direction: column;
    align-items: stretch;
  }
  .score > button { width: 100%; }
}

/* Gamemode selector tweaks */
#gamemodes-screen {
  width: 100vw;
  height: 100vh;
  display: none;
  flex-direction: row;
  gap: 2rem;
  justify-content: space-around;
  align-items: center;
  padding: 2rem;
    overflow: hidden;
}
#gamemodes-screen .gamemode-content {
  background-color: rgba(0,0,0,0.25);
  border: 0.5rem solid black;
  padding: 1.5rem;
  width: auto;
  text-align: center;
  color: lavender;
  border-radius: 1.25rem;
    height: auto;
}
#gamemodes-screen .gamemode-content h2 { margin-bottom: 0.5rem; font-size: 4vw;}
#gamemodes-screen .gamemode-content p { margin-bottom: 1rem; font-size: 2.5vw;}
#gamemodes-screen .home-screen-button {align-self: flex-start; position: relaitve;}
/* reuse existing button-card visuals */

.gamemode-select {
  background-image: url('./Images/button-card.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
  border: none;
  padding: 0.8rem 1.2rem;
  font-weight: 900;
  cursor: pointer;
  color: lavender;
  border-radius: 2rem;
  font-size: 3.5vw;
}

/* selected states */
.gamemode-selected {
  background-image: url('./Images/pure-card.png') !important;
  color: black !important;
  box-shadow: 0 0 16px rgba(255,255,255,0.4);
  transform: scale(1.03);
}

#cpu-level-prompt {
  width: 100vw;
    height: 100vh;
  display: none;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  border: 0.5rem solid black;
  background-color: transparent;
  /* background-color: rgb(100,0,155); */
  color: lavender;
  border-radius: 1rem;
    text-align: center;
}
#cpu-level-prompt button {
  background-image: url('./Images/button-card.png');
  background-size: cover;
  background-position: center;
  padding: 0.8rem 1.2rem;
  border-radius: 2rem;
  border: solid lavender 0.5rem;
  font-weight: 900;
  cursor: pointer;
  color: lavender;
    font-size: 3.5vw;
    background-color: transparent;
}
#cpu-level-prompt h3 {
    font-size: 3vw;
}
.cpu-selected {
  background-image: url('./Images/pure-card.png') !important;
  color: black !important;
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

/* --- Battle Frame Layout --- */
#creature-battle-frame {
    display: none; /* Ensure it shows when active */
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    height: 100vh;
    padding: 1rem;
    gap: 1rem;
    background: transparent;
    transition: all 0.5s ease;
}

/* --- Side Panels (Attack Displays) --- */
.attack-display {
    display: flex !important;
    flex: 1; /* Equal width for both sides */
    max-width: 25vw;
    height: 80vh;
    background: white; /* Semi-transparent dark look */
    border: 0.3rem solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 1.5rem;
    backdrop-filter: blur(8px); /* Blurs the background behind the UI */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: white;
    overflow-y: auto;
    flex-direction: column;
    gap: 3rem;
}

/* --- Animated Health Bar --- */
.display-health {
    text-align: center;
    position: relative;
    background-color: #222; /* Empty bar color */
    border: 2px solid #000;
    border-radius: 0.5rem;
    height: 2rem;
    line-height: 2rem;
    overflow: hidden;
    font-weight: 900;
    text-shadow: 1px 1px 2px black;
    margin: 1rem 0;
    z-index: 1;
}

/* --- Modified Health Bar Fill --- */
.display-health::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    
    /* Use the variable provided by JS, default to 100% */
    width: var(--hp-width, 100%); 
    
    /* Use the variable provided by JS, default to red-ish */
    background: var(--hp-color, linear-gradient(90deg, #ff4b2b, #ff416c)); 
    /* border:solid linear-gradient(90deg, #00d2ff, #3a7bd5) 0.5rem; */
    
    transition: width 0.4s ease-out, background 0.3s ease;
    z-index: -1;
}

/* Blue bar for Player 1 */
#player1-hp.display-health::before {
    /* background: var(--hp-color, linear-gradient(90deg, #ff4b2b, #ff416c)) !important;  */
    background: var(--hp-color, linear-gradient(90deg, blue, blue)); 
}

/* --- The Canvas Section --- */
canvas {
    border: 0.4rem solid #000;
    background: #000;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    border-radius: 10px;
}

#sudden-death-timer {
    position: absolute;
    top: -40px;
    width: 100%;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2px;
}

/* --- Attack List Styling --- */
.grid-style-attacks {
    display: grid;
    grid-template-columns: 1fr; /* Single column for better readability */
    gap: 10px;
    padding: 0;
}

.grid-style-attacks li {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 10px;
    border-left: 5px solid;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

#list-attacks-player1 .grid-style-attacks li { border-color: #ff4a4a; }
#list-attacks-player2 .grid-style-attacks li { border-color: #4aa3ff; }

.grid-style-attacks li:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.1);
}
.display-alert {
    font-size: 1.3rem;
    color: black;
}

/* FILTER POPUP STYLES (add to styles.css) */
#filter-container { position: absolute; top: 12%; display: inline-block; margin-bottom: 0.5rem; }
#filter-button {
  background: linear-gradient(90deg,#333,#555);
  color: #fff;
  border: none;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
#filter-button:hover { transform: translateY(-1px); }

/* Popup defaults hidden */
#filter-popup {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #111;
  color: #eee;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.6rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 9999;
}
#filter-popup h4 { margin: 0 0 0.4rem 0; font-size: 0.95rem; color:#ffd700;}
.filter-row { display:flex; align-items:center; gap:0.5rem; margin-bottom:0.45rem;}
.filter-row label { font-size:0.95rem; color:#ddd;}
.filter-row input[type="checkbox"] { width:18px; height:18px; }

#filter-actions { display:flex; gap:0.5rem; justify-content:flex-end; margin-top:0.5rem;}
#filter-actions button {
  padding:0.35rem 0.6rem; border-radius:6px; border:none; cursor:pointer; font-weight:600;
}
#apply-filter { background: linear-gradient(90deg,#28a745,#1e7a3d); color:#fff; }
#clear-filter { background: linear-gradient(90deg,#e74c3c,#b33934); color:#fff; }

#no-results { color: #fff; margin-top: 0.75rem; padding: 0.25rem 0.5rem; }

.beasteskit-display.disabled { opacity: 0.35; pointer-events: none; }
.beasteskit-display button.disabled-btn { opacity: 0.6; cursor: not-allowed; }

#popup-description {
    /* Dimensions & Positioning */
    width: 45vw;
    min-width: 300px; /* Prevents it from getting too thin on mobile */
    max-height: 70vh; /* Better to use max-height than fixed height for content */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers the absolute element perfectly */

    /* Display */
    display: none; /* Switch to 'flex' via JS to show */
    justify-content: center;
    align-items: center;
    z-index: 999;

    /* Styling */
    background-color: #ffffff;
    border: 1px solid black; /* Thinner, lighter border */
    border-radius: 12px;       /* Rounded corners */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Soft shadow */
    
    /* Typography & Spacing */
    padding: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.8rem;
    color: #333;
    line-height: 1.6;

    /* Behavior */
    overflow-y: auto; /* Only show scroll if needed */
}