@font-face {
  font-family: "cookieRun Regular";
  src: url("../CookieRunFont_OTF/CookieRun\ Regular.otf") format("opentype");
}
@font-face {
  font-family: "cookieRun Black";
  src: url("../CookieRunFont_OTF/CookieRun\ Black.otf.otf") format("opentype");
}
@font-face {
  font-family: "cookieRun Bold";
  src: url("../CookieRunFont_OTF/CookieRun\ Bold.otf") format("opentype");
}

body {
  font-family: "cookieRun Regular";
}

.lobby {
  overflow: hidden;
  position: relative;
  min-width: 1280px;
  height: 100vh;
  /* width: 100vh; */
  background-image: url("The Witchs Kitchen.png");
  background-size: auto 100vh;
  background-position: center;
  background-repeat: no-repeat;
  background-color: black;
}

@keyframes cookie_idle {
  0% {
    background-size: 264px 270px;
    height: 270px;
  }
  50% {
    background-size: 264px 265px;
    height: 265px;
  }
  100% {
    background-size: 264px 270px;
    height: 270px;
  }
}
.lobby .cookie_lobby {
  position: absolute;
  left: 50%;
  bottom: 50%;
  background-image: url("키키.png");
  background-size: 264px 270px;
  width: 264px;
  height: 270px;
  margin-left: -132px;
  margin-bottom: -135px;
  animation: cookie_idle 1s infinite;
}

@keyframes notice {
  0% {
    background-size: 240px 142px;
  }
  50% {
    left: 7vw - 6px;
    bottom: 16.5px;
    width: 252px;
    height: 149px;
    background-size: 252px 149px;
    line-height: 141.5px;
    font-size: 42px;
  }
  100% {
    background-size: 240px 142px;
  }
}

.lobby .notice {
  font-family: "cookieRun Bold";
  color: red;
  text-align: center;
  line-height: 135px;
  font-size: 40px;
  position: absolute;
  left: 7vw;
  bottom: 20px;
  width: 240px;
  height: 142px;
  background-image: url("notice.png");
  background-size: 240px 142px;
  text-shadow: 1px 1px 1px #000;
  /* text-shadow: -2px 0 red, 0 2px red, 2px 0 red, 0 -2px red; */
  animation: notice 2s infinite;
}
.lobby .notice_page {
  position: absolute;
  display: none;
  width: 50vw;
  height: 60vh;
  top: 50%;
  left: 50%;
  margin-top: -30vh;
  margin-left: -25vw;
  background-color: orange;
  border: 5px double wheat;
  border-radius: 10px;
  /* background-image: url('../lib/how_to_play.png');
  background-size: 50vw 70vw; */
  overflow-y: scroll;
  /* color: white;
  text-align: center;
  font-size: 20px; */
}
.lobby .notice_page::-webkit-scrollbar {
  width: 20px;
}
.lobby .notice_page::-webkit-scrollbar-track {
  background-color: orange;
}
.lobby .notice_page::-webkit-scrollbar-thumb {
  background-color: wheat;
  background-clip: padding-box;
  border: 4px solid transparent;
  border-radius: 10px;
}
.lobby .notice_page img {
  width: 100%;
}

.lobby .play_button {
  font-family: "cookieRun Bold";
  position: absolute;
  right: 5vw;
  bottom: 40px;
  width: 15%;
  height: 80px;
  background-color: orange;
  border-radius: 10px;
  border-color: wheat;
  border-width: 5px;
  font-size: 50px;
  color: white;
  text-shadow: 1.5px 1.5px 1.5px #000;
  /* text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; */
}

.lobby .top_bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 135px;
  width: 90vw;
  margin-left: 5vw;
  margin-right: 5vw;
}

/* .lobby .top_bar .setting_box {
  display: flex;
  width: 16.6%;
  justify-content: space-between;
  align-items: center;
} */
/* .lobby .top_bar .setting_box .my_page_button {
  font-family: 'cookieRun Regular';
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 150px;
  height: 50px;
  background-color: #0f2897;
  border-radius: 10px;
  border-color: rgb(144, 165, 250);
  border-width: 4px;
}
.lobby .top_bar .setting_box .my_page_button .my_page_text {
  font-size: 25px;
  color: rgb(144, 165, 250);
  text-shadow: 1px 1px 1px #000;
} */
.lobby .top_bar .reset_button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background-color: #0f2897;
  border-radius: 50px;
  border-color: rgb(144, 165, 250);
  border-width: 4px;
}
.lobby .top_bar .reset_button .reset_button_icon {
  font-size: 26px;
  color: rgb(144, 165, 250);
  text-shadow: 1px 1px 1px #000;
}

.lobby .top_bar .score_box {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lobby .top_bar .score_box .highest_score {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 42px;
  width: 230px;
  border: 4px double rgb(144, 165, 250);
  border-radius: 10px;
  background-color: rgba(0, 34, 255, 0.368);
}
.lobby .top_bar .score_box .highest_score .highest_score_text {
  color: white;
  font-size: 25px;
  text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}
.lobby .top_bar .score_box .score {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 230px;
  height: 50px;
}
.lobby .top_bar .score_box .score .score_text {
  color: white;
  font-size: 20px;
  text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}

.lobby .top_bar .rank_box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lobby .top_bar .rank_box .rank_image {
  display: flex;
  width: 146px;
  height: 90px;
  background-image: url("No_rank.png");
  background-size: 146px 90px;
}
.lobby .top_bar .rank_box .rank {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 146px;
  height: 20px;
  padding: 5px;
}
.lobby .top_bar .rank_box .rank .rank_text {
  font-family: "cookieRun Bold";
  color: white;
  font-size: 20px;
}

@keyframes guide_roll {
  0% {
    height: 0px;
  }
  100% {
    height: 289.6px;
  }
}

.lobby .rank_guide {
  position: absolute;
  display: none;
  overflow: hidden;
  left: 5vw;
  top: 140px;
  width: 146px;
  height: 289.6px;
  background-image: url("rank_Guide.PNG");
  background-size: 146px 289.6px;
  /* background-repeat: no-repeat; */
  z-index: 10;
  animation: guide_roll 1s forwards;
  border: 4px solid wheat;
  border-radius: 3px;
}
.lobby .rank_guide .rank_guide_text {
  text-align: right;
  vertical-align: middle;
  line-height: 41.3px;
  padding-right: 10px;
}
/* 
.lobby .my_page {
  position: absolute;
  display: none;
  width: 50vw;
  height: 60vh;
  top: 50%;
  left: 50%;
  margin-top: -30vh;
  margin-left: -25vw;
  background-color: orange;
  border: 5px double wheat;
  border-radius: 10px;
  color: white;
  text-align: center;
  font-size: 50px;
} */

.music_button {
  position: absolute;
  bottom: 20px;
  left: 20px;
  padding: 10px 15px;
  background-color: #444;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  z-index: 9999; /* 다른 요소 위에 올라오도록 */
}

.gacha_button {
  position: absolute;
  right: 5vw;
  bottom: 140px;
  width: 15%;
  height: 80px;
  background-color: #8e44ad;
  border-radius: 10px;
  border-color: wheat;
  border-width: 5px;
  font-size: 50px;
  color: white;
  text-shadow: 1.5px 1.5px 1.5px #000;
  cursor: pointer;
  z-index: 100;
}

.gacha_popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
}

.gacha_animation_box {
  position: relative;
  width: 240px;
  height: 240px;
  margin-bottom: 20px;
}

.gacha_light {
  position: absolute;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, #fffbe6 0%, #fffbe600 80%);
  opacity: 0;
  z-index: 2;
  animation: lightShow 0.7s 1s forwards;
}

.gacha_character {
  position: absolute;
  width: 120px;
  height: 120px;
  left: 60px;
  top: 60px;
  opacity: 0;
  z-index: 3;
  background: none;
  animation: charPop 0.5s 1.3s forwards;
}

@keyframes lightShow {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes charPop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.character_list_popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  flex-direction: column;
}

.character_list {
  background: #fff;
  border-radius: 15px;
  padding: 30px 40px;
  min-width: 300px;
  min-height: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
  max-height: 60vh;
  overflow-y: auto;
}

.character_list > div {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.character_list > div:hover {
  background-color: #f5f5f5;
}

.character_list img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-right: 15px;
}

.character_list .char-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.character_list .char-name {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 5px;
}

.character_list .char-level {
  color: #666;
  font-size: 16px;
}

.character_list .level-bar {
  width: 100px;
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  margin-top: 5px;
  overflow: hidden;
}

.character_list .level-progress {
  height: 100%;
  background-color: #8e44ad;
  transition: width 0.3s ease;
}

.character_list button {
  margin-left: 10px;
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  background: #8e44ad;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.character_list button:hover {
  background: #6c3483;
  transform: translateY(-2px);
}

.character_list button:active {
  transform: translateY(0);
}

.gacha_popup button {
  font-family: "cookieRun Bold";
  margin: 10px;
  padding: 15px 30px;
  font-size: 24px;
  color: white;
  background-color: #8e44ad;
  border: 4px solid #f1c40f;
  border-radius: 15px;
  cursor: pointer;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 0 #6c3483;
  transition: all 0.1s;
}

.gacha_popup button:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #6c3483;
}

.gacha_popup button:active {
  transform: translateY(4px);
  box-shadow: none;
}

.character_list_popup button {
  font-family: "cookieRun Bold";
  margin: 10px;
  padding: 10px 20px;
  font-size: 20px;
  color: white;
  background-color: #8e44ad;
  border: 3px solid #f1c40f;
  border-radius: 12px;
  cursor: pointer;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 3px 0 #6c3483;
  transition: all 0.1s;
}

.character_list_popup button:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #6c3483;
}

.character_list_popup button:active {
  transform: translateY(3px);
  box-shadow: none;
}

.gacha_popup .level-up-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  color: #f1c40f;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: levelUp 1s ease-out;
  pointer-events: none;
}

@keyframes levelUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

.story_button {
  position: absolute;
  right: 5vw;
  bottom: 240px; /* gacha_button 위에 위치하도록 */
  width: 15%;
  height: 80px;
  background-color: green;
  border-radius: 10px;
  border-color: wheat;
  border-width: 5px;
  font-size: 50px;
  color: white;
  text-shadow: 1.5px 1.5px 1.5px #000;
  cursor: pointer;
  z-index: 100;
}

.story_popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
}

.story_image {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.story_image img {
  max-width: 300px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.image_caption {
  margin-top: 10px;
  font-size: 20px;
  color: #666;
  font-style: italic;
}

.story_chapter {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.story_chapter h3 {
  color: #8e44ad;
  margin-bottom: 15px;
  font-size: 22px;
  border-bottom: 2px solid #8e44ad;
  padding-bottom: 5px;
}

.story_chapter p {
  margin: 0;
  text-indent: 1em;
  line-height: 1.8;
}

.story_ending {
  margin-top: 40px;
  padding: 20px;
  background: #f0f0f0;
  border-radius: 10px;
  text-align: center;
  font-style: italic;
  color: #666;
}

.story_content {
  background: white;
  padding: 40px;
  border-radius: 15px;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  margin: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.story_content h2 {
  color: #8e44ad;
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.story_text {
  font-size: 18px;
  line-height: 1.6;
  color: #333;
}

.story_popup button {
  font-family: "cookieRun Bold";
  margin: 10px;
  padding: 15px 30px;
  font-size: 24px;
  color: white;
  background-color: #8e44ad;
  border: 4px solid #f1c40f;
  border-radius: 15px;
  cursor: pointer;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 0 #6c3483;
  transition: all 0.1s;
}

.story_popup button:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #6c3483;
}

.story_popup button:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* 간성치킨 아래에 추가되는 거지키우기 버튼 */
.poorgame_button {
  position: absolute;
  right: 5vw;
  bottom: 40px; /* play_button과 같은 위치, 필요시 조정 */
  width: 15%;
  height: 80px;
  background-color: #2ecc71;
  border-radius: 10px;
  border-color: wheat;
  border-width: 5px;
  font-size: 50px;
  color: white;
  text-shadow: 1.5px 1.5px 1.5px #000;
  cursor: pointer;
  z-index: 100;
  margin-top: 20px;
}
.poorgame_button:hover {
  background-color: #27ae60;
}
