* {
    touch-action: manipulation; /* Apply to all elements */
}

#control-panel{
    position: fixed; 
    top: 18px;
    left: 10px; 
    z-index: 10000; 
    padding: 10px; 
    padding-bottom:0px;
    border-radius: 8px; 
    width:208px;
    height:50px;
    margin-top:0px;
    overflow: hidden;
    transition:0.3s ease-in;
}

#control-panel.expanded {
    height: 250px;      /* expanded width */
    background-color:#ffb94f;
    border: 2px solid #ffb94f;
    background-color:rgba(0,0,0,0.5) !important;
    box-shadow: #ffb94f !important;
}

.control-panel-container{
    position:absolute;
    top:0px;
    width:55px;
    transition: 0.2s ease-out;
}

.control-panel-container.expanded{
    width:203px;
}

.control-panel-container:hover{
    transition: 0.2s ease-in;
}


#control-panel button{
    background-color:red;
    top:0px;
    width:200px;
    height:40px;
    text-align:left;
    padding-bottom:0px;
    padding-top:0px;
    margin:2px;
    border-radius:10px;
}


.control-panel-toggle{
    width:50px !important;
    height:50px !important;
    border-radius:1000px !important;
    background-color:gainsboro !important;
    transition: 0.2s ease-in;
    font-size:20px;
    color:black;
    border:2px solid rgb(83, 74, 64);
    box-shadow: inset 4px 3px 5px white, 2px 2px 0 #000, /* extra “pixel” edges */
    4px 4px 0 #000;
    text-align:left !important; 
    display: flex;               
    justify-content: flex-start; 
    align-items: center;        
    padding-left: 15px;  
    padding-top:-15px;      
}

.control-panel-toggle:hover{
    border-radius:1000px !important;
    background-color:white !important; 
    box-shadow: inset 4px 3px 5px black, 2px 2px 0 #000, /* extra “pixel” edges */
    4px 4px 0 #000;
}


.control-panel-toggle.expanded{
    position:absolute;
    right:-5px;
    width:50px!important;
    height:50px!important;
    border-radius:1000px !important;
    box-shadow:none !important;
    color:white;
    border:none;
    background-color:rgba(0,0,0,0)!important;
    transition:0.3s ease-out;
    padding-left: 40px!important;  
}


.download-assets{
    background-color:green !important;
}

.download-assets-container{
    position:absolute;
    top:58px;
    width:55px;
    transition: 0.2s ease-out;
}


.clear-assets-container{
    position:absolute;
    top:108px;
    width:55px;
    transition: 0.2s ease-out;
}

.voice-assets-container {
    position:absolute;
    top:158px;
    width:55px;
    transition: 0.2s ease-out;
}

.play-cutscene{
    background-color: blue !important;
}

.play-cutscene-container.active {
  width: 200px; /* stays expanded */
}

.play-cutscene-container {
    position:absolute;
    top:208px;
    width:55px;
    transition: 0.2s ease-out;
}

.play-cutscene-container.active {
  width: 200px; /* stays expanded */
}


#control-panel .icon{
    position:absolute;
    top:13px;
    left: 20px;
    width:20px;
}
#control-panel .text{
    position:absolute;
    top:13px;
    left: 55px;
    width:150px;
}


.voice-btn{
    background-color:#a06041 !important;
}

html{
    width: 1920px;
    height: 1080px;
    margin: 0;
    padding: 0;
}
body {
    margin: 0;
    padding: 0;
    background: #1a1a2e;
    font-family: Arial, sans-serif;
    color: white;
    overflow: hidden;
    /* overflow-y:auto; */
    text-align: center;
    
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 1080px;
    width: 1920px;
    height: 1080px;
}
html, body {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari */
    -khtml-user-select: none;    /* Konqueror HTML */
    -moz-user-select: none;      /* Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Non-prefixed version */
    
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
}

input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#game-container {
    position: absolute;
    padding:0px;
    margin:0px;
    width: 1920px;
    height: 1080px;
    /* width: 100vw;
    height: 100vh; */
}

#ui-overlay {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    pointer-events: none;
    z-index: 0;
}


.panel {
    background-color: #a06041;
    border: 5px solid #534a40;
    padding: 20px;
    pointer-events: auto;
}

.stats-panel {
    position: absolute;
    top:10px;
    left: -50px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
    width: 380px;
    height:310px;
}

.stats-panel .yellow{
    position: absolute;
    top: 7px;
    left: 8px;
    width: 405px;
    height: 335px;
    background-color: #e2b740;
}

.stats-panel .white{
    position: absolute;
    top: 10px;
    left: 10px;
    width: 385px;
    height: 315px;
    background-color: #fff9ea;
}

.stats-content{
    position:absolute;
    top:76px;
    left:8px;
    width:380px;
}


.stats-content p {
    gap:3px;
    display: inline;
    width: 380px;
    display: flex;
    flex-direction: row;
    color: black;
}

.stats-content .progress-bar {
    background-color:limegreen;
    width:342px;
}

.stats-content .progress-fill{
    background-color:lawngreen;
}

.stats-panel h3 {
    font-size:1.4em;
    position:absolute;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 2px 2px 3px rgba(10, 10, 1, 5);
    color: #ffb94f;
    position: absolute;
    bottom: 38px;
    top:10px;
    left: 8px;
    width:380px;
}

.battle-panel {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #ffb94f transparent; /* thumb color + transparent track */
    display: none;
    position: absolute;
    top: 0px;
    right:-50px;
    flex-direction: column;
    width:400px;
    height:750px;
}

.battle-panel .yellow {
    position: absolute;
    top: 5px;
    left: 10px;
    width: 420px;
    height: 775px;
    background-color: #e2b740;
}

.battle-panel .white {
    display:flex;
    flex-direction:column;
    border:2px solid white;
    gap:0;
    position: absolute;
    top: 10px;
    left: 10px;
    width: 395px;
    height: 750px;
    background-color: #fff9ea;
}

button {
    background-color: #a06041;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    pointer-events: auto;
}

button:hover {
    background: #bf7856;
}

.key-indicator {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #34495e;
    border: 2px solid #7f8c8d;
    border-radius: 5px;
    text-align: center;
    line-height: 50px;
    margin: 5px;
    font-size: 20px;
    font-weight: bold;
}

.key-active {
    background: #e74c3c;
    border-color: #c0392b;
}

.progress-bar {
    height: 20px;
    background: #34495e;
    border-radius: 10px;
    overflow: hidden;
    width: 370px;
    margin: 10px 0;
}

.progress-fill {
    height: 20px;
    background: #3498db;
    transition: width 0.3s ease;
    width: 0%;
}
.navbar {
    margin-top:30px;
    display: flex;
    width:1100px;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    padding: 10px;
    border-radius: 10px;
}

.nav-btn {
    flex: 1 1 200px;
    color: #ffb94f;
    background: #a06041;
    padding: 10px 20px;
    border: 3px solid #534a40;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size:13px;
    transition: all 0.3s ease;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 2px 2px 4px rgba(5, 5, 1, 1);
    padding: 1em 2em;
    box-shadow: inset 4px 3px 5px #ffbf5e, 2px 2px 0 #000, /* extra “pixel” edges */
    4px 4px 0 #000;
    line-height:2;
}

    .nav-btn.active {
        background: white;
        box-shadow: inset 4px 3px 5px gray, 2px 2px 0 #000, /* extra �pixel� edges */
        4px 4px 0 #000;
    }

.nav-btn:hover:not(.active) {
    background: white;
    box-shadow: inset 4px 3px 5px gray, 2px 2px 0 #000, /* extra �pixel� edges */
    4px 4px 0 #000;

}

.invisible-container {
    display: flex;
    justify-content: center; /* center horizontally */
    align-items: center;
    position: relative;
    flex: 1;
    width: 95%;
    max-width: 100%;
    height: 90%;
    max-height: 85%;
    min-height: 80%;
}
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 950px 500px, #A06041    10%, #7D3D1E  80%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    font-family: Arial, sans-serif;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content h2 {
    line-height:140px;
    color: #ffb94f;
    padding: 20px 40px;
    font-size: 100px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 2px 2px 10px rgba(5, 5, 1, 1);
    margin-bottom:10px;
}



.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-text {
    font-size: 20px;
    opacity: 0.8;
    margin-top: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#game-container {
    z-index: 0;
    display: none; /* ← Hidden by default */
    pointer-events: auto;
}

