* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: black;
    font-family: 'Minecraftia', sans-serif;
    background-image: url('nether.jpeg');
    background-size: cover;
    background-position: center;
}

body {
    background-color: #b9cffb;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main {
    width:1000px;
    height: 811px;
}

.main_title {
    height:60px;
    display:block;
    margin: 0 auto 20px auto;
}

canvas {
    border-radius: 10px;
    display: block;
}

#miniCanvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    border: 3px solid #8B4513;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    background-color: #87CEEB;
}

#gameCanvas {
    position: relative;
    display:none;
}

#bossCanvas {
    display:block;
}

/* 죽었습니다. 화면 구성 */
.dead{
    position: absolute;
    display:none;
    /* display:flex; */
    justify-content: center;
    align-items: center;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background-color: rgba(80, 0, 0, 0.623);
    z-index: 50;
}

.dead_alert{
    font-family: 'galmuri11';
    color:white;
}

.dead_alert div:nth-of-type(1) {
    font-size:40px;
    margin-bottom:50px;
    text-align: center;
}

.dead_alert div:nth-of-type(2) {
    margin-bottom:50px;
    text-align: center;
}

.dead_alert button {
    font-family: 'galmuri11';
    height: 50px;  /* 고정 크기 사용 */
    width: 500px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    background-image: url('https://i.ibb.co/rb2TWXL/bgbtn.png');
    background-position: center;
    background-size: cover;
    background-color: #999;
    margin-bottom: 10px;
    image-rendering: pixelated;
    border: 2px solid #000;
    color: #DDD;
    text-shadow: 2px 2px #000A;
    box-shadow: inset -2px -4px #0006, inset 2px 2px #FFF7;
    padding-bottom: 0.3em;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size:medium;
}

.dead_alert button:hover {
    background-color: rgba(100, 100, 255, .45);
    text-shadow: 2px 2px #202013CC;
    color: #FFFFA0;
    background-blend-mode: multiply;
}

.dead_alert button:active {
    box-shadow: inset -2px -4px #0004, inset 2px 2px #FFF5;
}

#title-screen,
#setting-scene,
#create-scene,
#story-scene,
#score-scene {
    width: 960px;
    height: 650px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

section {
    position: relative;
    margin: 0 auto;
}

#masterBtns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

#masterBtns button {
    font-family: 'galmuri11';
    height: 40px;
    width: 120px;
    cursor: pointer;
    background-color: white;
    border: none;
    font-size: 14px;
}

#masterBtns button:hover {
    background-color: #f4f4f4;
}

#title-screen {
    background-image: url('main/title_small.jpg');
    background-size: cover;
    background-position: center;
    flex-direction: column;
}

#setting-scene,
#create-scene,
#score-scene {
    background-image: url('main/setting_small.jpg');
    background-size: cover;
    background-position: center;
}

.button {
    background-image: url('main/btn.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: white;
    font-family: 'Minecraftia', sans-serif;
    font-size: 20px;
    width: 600px;
    height: 55px;
    line-height: 25px;
    margin-top: 15px;
    border: 3px solid #000;
    border-right-color: #2a2a2a;
    border-bottom-color: #2a2a2a;
    border-left-color: #808080;
    border-top-color: #808080;
    box-shadow: inset -2px -2px 0px #2a2a2a, inset 2px 2px 0px #808080;
    cursor: pointer;
    text-shadow: 1px 1px #000;
    transition: all 0.1s ease-in-out;
}

.button:hover {
    background-image: url('main/btn_hover.png');
    color: #ffff55;
    text-shadow: 1px 1px #000;
}

.button:active {
    box-shadow: inset -2px -4px #0004, inset 2px 2px #FFF5;
}

.setting-panel,
.create-panel,
.score-panel {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 12px;
    color: white;
    font-family: 'Galmuri11', sans-serif;
    font-weight: normal;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.setting-panel h2,
.create-panel h2,
.score-panel h2 {
    font-size: 28px;
    font-weight: normal;
    text-align: center;
}

.setting-group,
.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 18px;
    font-family: 'Galmuri11', sans-serif;
}

.setting-panel select {
    font-size: 16px;
    padding: 4px 8px;
    font-family: 'Galmuri11', sans-serif;
}

#player-name {
    font-family: 'Galmuri11', sans-serif;
    font-size: 18px;
    width: 600px;
    height: 48px;
    padding: 6px 12px;
    border: 3px solid #ffffff;
    background-color: #000000;
    color: white;
    text-align: center;
    text-shadow: 1px 1px #222;
}

/* 스토리 모드 전용 */
#story-scene {
  background-color: black;
}

.story-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

#story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#speech-box {
  position: absolute;
  bottom: 80px;
  left: 30px;
  right: 30px;
  min-height: 80px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-family: 'Galmuri11', sans-serif;
  font-size: 18px;
  padding: 20px;
  line-height: 1.6;
}

#next-dialogue-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

#score-list {
  list-style: none;
  padding: 0;
  font-size: 18px;
  font-family: 'Galmuri11', sans-serif;
  text-align: left;
}

/* 클리어 화면 구성 */
.clear {
    font-family: 'galmuri11';
    color: white;
    position:absolute;
    top:0;
    left:0;
    width:900px;
    height: 650px;
    display:none;
    background-image: url('mainGame/background/soil.png');
    background-position: center;
    background-size: cover;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.clear div:nth-of-type(1) {
    font-size:40px;
    margin-top: 30px;
    margin-bottom:25px;
}

.clear div:nth-of-type(2) {
    margin-bottom:25px;
}

.clear img {
    margin-bottom: 19px;
    width:420px;
}

.clear_item{
    position:absolute;
    width: 32px;
    height: 32px;
}

#craftingTable {
    pointer-events: none;
}

.equipped-highlight {
    outline: 2px solid gold;
}

#start_method {
    position: absolute;
    bottom: 20px;
}

.weapon-option {
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    image-rendering: pixelated;
    width: 20%;
}

.ball-selected {
    border: 2px solid transparent;
    border-color: gold;
}

#skip-story-btn {
    background: none;
    position: absolute;

    font-family: 'Minecraftia';
    right: 0;
    height: 40px;
    line-height: 40px;
    color: white;
    width: 80px;
    border: none;
    cursor: pointer;
    font-size: 30px;
}

.korean {
    font-family: "Galmuri11";
}