* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;

  font-family: Arial, sans-serif;

  background: #111;
}

button {
  font-family: inherit;
}

#game {
  position: relative;

  width: 100vw;
  height: 100vh;

  overflow: hidden;

  background: #111;
}


/* ===============================
   월드
================================ */

#world {
  position: absolute;

  left: 0;
  top: 0;

  width: 3200px;
  height: 1800px;

  transform-origin: top left;
}

#worldMap {
  position: absolute;

  left: 0;
  top: 0;

  width: 3200px;
  height: 1800px;

  user-select: none;
  pointer-events: none;
}


/* ===============================
   플레이어
================================ */

#player {
  position: absolute;

  width: 64px;
  height: 64px;

  z-index: 50;

  user-select: none;
  pointer-events: none;
}

.nickname {
  position: absolute;

  left: 50%;
  top: -22px;

  transform: translateX(-50%);

  z-index: 5;

  padding: 3px 8px;

  border-radius: 10px;

  background: rgba(0,0,0,0.78);

  color: white;

  font-size: 12px;
  font-weight: bold;

  white-space: nowrap;
}

#characterSprite {
  position: absolute;

  left: 50%;
  bottom: 0;

  transform: translateX(-50%);

  width: 64px;
  height: 64px;

  object-fit: contain;

  pointer-events: none;
  user-select: none;

  filter:
    drop-shadow(
      0 3px 2px
      rgba(0,0,0,0.3)
    );
}


/* ===============================
   HUD
================================ */

#hud {
  position: fixed;

  left: 18px;
  top: 18px;

  z-index: 100;

  min-width: 180px;

  padding: 12px 15px;

  border-radius: 12px;

  background:
    rgba(0,0,0,0.76);

  color: white;

  box-shadow:
    0 4px 15px
    rgba(0,0,0,0.25);
}

.hud-name {
  margin-bottom: 7px;
}

.hud-coin {
  margin-bottom: 7px;

  color: #ffd45c;

  font-size: 15px;
  font-weight: 900;
}

#coinAmount {
  color: white;
}

#terrainText {
  font-size: 12px;
}

#inventoryButton {
  width: 100%;

  margin: 3px 0 9px;

  padding: 7px 9px;

  border: 0;

  border-radius: 8px;

  background:
    rgba(255,255,255,0.12);

  color: white;

  font-size: 12px;
  font-weight: bold;

  cursor: pointer;
}

#inventoryButton:hover {
  background:
    rgba(255,255,255,0.22);
}


/* ===============================
   미니맵
================================ */

#minimap {
  position: fixed;

  right: 18px;
  bottom: 18px;

  width: 280px;
  height: 158px;

  z-index: 100;

  overflow: hidden;

  border: 4px solid white;
  border-radius: 13px;

  background: #222;

  box-shadow:
    0 5px 20px
    rgba(0,0,0,0.4);
}

.minimap-title {
  position: absolute;

  left: 8px;
  top: 7px;

  z-index: 5;

  padding: 3px 7px;

  border-radius: 6px;

  background:
    rgba(0,0,0,0.60);

  color: white;

  font-size: 10px;
  font-weight: bold;

  pointer-events: none;
}

#minimapCanvas {
  display: block;

  width: 100%;
  height: 100%;
}


/* ===============================
   상호작용
================================ */

#interactionBox {
  position: fixed;

  left: 50%;
  bottom: 40px;

  transform:
    translateX(-50%)
    translateY(20px);

  z-index: 200;

  min-width: 220px;

  padding: 13px 22px;

  border-radius: 15px;

  background:
    rgba(20,20,20,0.92);

  color: white;

  text-align: center;

  box-shadow:
    0 6px 20px
    rgba(0,0,0,0.3);

  opacity: 0;

  pointer-events: none;

  transition: 0.15s;
}

#interactionBox.show {
  opacity: 1;

  transform:
    translateX(-50%)
    translateY(0);
}

#interactionName {
  margin-bottom: 7px;

  font-size: 16px;
  font-weight: bold;
}

#interactionAction {
  font-size: 13px;
  color: #eee;
}

.key {
  display: inline-flex;

  width: 27px;
  height: 27px;

  margin-right: 5px;

  align-items: center;
  justify-content: center;

  border: 2px solid white;
  border-radius: 6px;

  background: #444;

  font-weight: bold;
}


/* ===============================
   공통 모달
================================ */

#gameCenterScreen,
#shopScreen,
#inventoryScreen,
#jokerScreen {
  position: fixed;

  inset: 0;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 30px;

  background:
    rgba(12,16,22,0.78);

  backdrop-filter: blur(6px);
}

#gameCenterScreen {
  z-index: 500;
}

#shopScreen {
  z-index: 650;
}

#inventoryScreen {
  z-index: 800;
}

#jokerScreen {
  z-index: 900;
}

#gameCenterScreen.show,
#shopScreen.show,
#inventoryScreen.show,
#jokerScreen.show {
  display: flex;
}


/* ===============================
   닫기 버튼
================================ */

#closeGameCenter,
#closeShop,
#closeInventory,
#closeJoker,
#exitJokerGame {
  width: 42px;
  height: 42px;

  border: 0;

  border-radius: 11px;

  background:
    rgba(255,255,255,0.09);

  color: white;

  font-size: 18px;

  cursor: pointer;
}

#closeGameCenter:hover,
#closeShop:hover,
#closeInventory:hover,
#closeJoker:hover,
#exitJokerGame:hover {
  background:
    rgba(255,255,255,0.18);
}


/* ===============================
   게임센터
================================ */

.game-center-window {
  width: min(1000px, 94vw);

  max-height: 90vh;

  overflow-y: auto;

  padding: 30px;

  border:
    3px solid
    rgba(255,255,255,0.12);

  border-radius: 26px;

  background:
    linear-gradient(
      145deg,
      #202734,
      #111720
    );

  color: white;

  box-shadow:
    0 25px 80px
    rgba(0,0,0,0.55);
}

.game-center-header {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  margin-bottom: 28px;
}

.game-center-logo {
  font-size: 30px;
  font-weight: 900;
}

.game-center-subtitle {
  margin-top: 8px;

  color: #9ca8b9;

  font-size: 14px;
}

.game-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 18px;
}

.game-card {
  min-height: 280px;

  padding: 22px;

  border:
    2px solid
    rgba(255,255,255,0.08);

  border-radius: 20px;

  background:
    rgba(255,255,255,0.055);
}

.game-card.playable {
  transition: 0.18s;
}

.game-card.playable:hover {
  transform:
    translateY(-5px);

  border-color:
    rgba(255,184,74,0.75);

  background:
    rgba(255,255,255,0.09);
}

.game-card.locked {
  opacity: 0.45;
}

.game-number {
  color: #8f9aac;

  font-size: 11px;
  font-weight: bold;

  letter-spacing: 1.5px;
}

.game-icon {
  margin: 20px 0 12px;

  font-size: 55px;
}

.game-name {
  margin-bottom: 8px;

  font-size: 19px;
  font-weight: bold;
}

.game-description {
  min-height: 40px;

  color: #9da7b6;

  font-size: 12px;

  line-height: 1.5;
}

.player-count {
  margin-top: 12px;

  color: #ffc35a;

  font-weight: bold;
}

.play-button {
  width: 100%;

  margin-top: 14px;

  padding: 12px;

  border: 0;
  border-radius: 10px;

  background: #ffad32;

  color: #171717;

  font-size: 14px;
  font-weight: 900;

  cursor: pointer;
}

.play-button:hover {
  background: #ffc15c;
}

.locked-button {
  width: 100%;

  margin-top: 20px;

  padding: 12px;

  border-radius: 10px;

  background:
    rgba(255,255,255,0.08);

  color: #c0c5cc;

  text-align: center;

  font-size: 13px;
  font-weight: bold;
}


/* ===============================
   상점
================================ */

.shop-window {
  width: min(850px, 94vw);

  padding: 30px;

  border:
    3px solid
    rgba(255,255,255,0.1);

  border-radius: 25px;

  background:
    linear-gradient(
      145deg,
      #29313d,
      #151b23
    );

  color: white;

  box-shadow:
    0 25px 80px
    rgba(0,0,0,0.55);
}

.shop-header,
.inventory-header {
  display: flex;

  justify-content: space-between;
  align-items: flex-start;
}

.shop-title,
.inventory-title {
  font-size: 28px;
  font-weight: 900;
}

.shop-subtitle,
.inventory-subtitle {
  margin-top: 7px;

  color: #9ca7b6;

  font-size: 13px;
}

.shop-money {
  display: flex;

  justify-content: space-between;
  align-items: center;

  margin: 25px 0 20px;

  padding: 14px 18px;

  border-radius: 12px;

  background:
    rgba(0,0,0,0.22);

  color: #aeb6c2;
}

.shop-money strong {
  color: #ffd35c;

  font-size: 18px;
}

.shop-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 15px;
}

.shop-item {
  padding: 22px;

  border:
    2px solid
    rgba(255,255,255,0.08);

  border-radius: 17px;

  background:
    rgba(255,255,255,0.05);

  text-align: center;

  transition: 0.15s;
}

.shop-item:hover {
  transform: translateY(-3px);

  border-color:
    rgba(255,190,70,0.5);
}

.shop-item-icon {
  margin-bottom: 12px;

  font-size: 55px;
}

.shop-item-name {
  font-size: 17px;
  font-weight: 900;
}

.shop-item-type {
  margin-top: 5px;

  color: #8792a2;

  font-size: 11px;
}

.shop-item-price {
  margin-top: 16px;

  color: #ffd45b;

  font-size: 15px;
  font-weight: bold;
}

.shop-buy-button {
  width: 100%;

  margin-top: 14px;

  padding: 11px;

  border: 0;
  border-radius: 9px;

  background: #ffad32;

  color: #191919;

  font-weight: 900;

  cursor: pointer;
}

.shop-buy-button.owned {
  background: #3e4855;

  color: #9da6b2;

  cursor: default;
}

.shop-message {
  min-height: 25px;

  margin-top: 20px;

  text-align: center;

  color: #ffd45b;

  font-size: 13px;
  font-weight: bold;
}


/* ===============================
   인벤토리
================================ */

.inventory-window {
  width: min(750px, 94vw);

  min-height: 350px;

  padding: 30px;

  border:
    3px solid
    rgba(255,255,255,0.1);

  border-radius: 25px;

  background:
    linear-gradient(
      145deg,
      #29313d,
      #151b23
    );

  color: white;

  box-shadow:
    0 25px 80px
    rgba(0,0,0,0.55);
}

.inventory-header {
  margin-bottom: 25px;
}

#inventoryItems {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 14px;
}

.inventory-item {
  padding: 20px;

  border:
    2px solid
    rgba(255,255,255,0.08);

  border-radius: 15px;

  background:
    rgba(255,255,255,0.05);

  text-align: center;
}

.inventory-item.equipped {
  border-color: #ffd258;

  background:
    rgba(255,210,88,0.09);
}

.inventory-icon {
  margin-bottom: 10px;

  font-size: 50px;
}

.inventory-name {
  font-size: 16px;
  font-weight: 900;
}

.inventory-type {
  margin-top: 5px;

  color: #8792a2;

  font-size: 11px;
}

.inventory-equip-button {
  width: 100%;

  margin-top: 14px;

  padding: 10px;

  border: 0;
  border-radius: 9px;

  background: #ffad32;

  color: #171717;

  font-weight: 900;

  cursor: pointer;
}

.inventory-equip-button.remove {
  background: #566170;

  color: white;
}

.inventory-empty {
  grid-column: 1 / -1;

  padding: 60px 20px;

  color: #7f8997;

  text-align: center;
}


/* ===============================
   조커 대기실
================================ */

.joker-window {
  position: relative;

  width: min(600px, 92vw);

  padding: 40px 45px;

  border-radius: 25px;

  background:
    linear-gradient(
      145deg,
      #242b39,
      #131820
    );

  color: white;

  text-align: center;

  box-shadow:
    0 25px 80px
    rgba(0,0,0,0.6);
}

#closeJoker {
  position: absolute;

  right: 20px;
  top: 20px;
}

.joker-icon {
  font-size: 75px;
}

.joker-window h1 {
  margin: 5px 0 8px;
}

.joker-description {
  margin-bottom: 25px;

  color: #aeb7c5;
}

.joker-players {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 10px;
}

.joker-player {
  padding: 16px 10px;

  border-radius: 12px;

  font-weight: bold;
}

.joker-player.active {
  display: flex;

  justify-content: center;

  gap: 6px;

  border: 2px solid #ffc04d;

  background:
    rgba(255,192,77,0.12);
}

.joker-player.empty {
  border:
    2px dashed
    rgba(255,255,255,0.14);

  color: #667080;
}

.joker-count {
  margin-top: 25px;

  font-size: 27px;
  font-weight: 900;
}

#startJokerGame {
  width: 100%;

  margin-top: 18px;

  padding: 15px;

  border: 0;
  border-radius: 12px;

  background: #ffae32;

  color: #181818;

  font-size: 16px;
  font-weight: 900;

  cursor: pointer;
}

.joker-notice {
  margin-top: 12px;

  color: #87909d;

  font-size: 12px;
}


/* ===============================
   조커 실제 게임
================================ */

.joker-game-window {
  display: none;

  width: min(1100px, 96vw);
  height: min(720px, 94vh);

  padding: 25px;

  border-radius: 25px;

  background:
    radial-gradient(
      circle at center,
      #24553d,
      #153525 70%
    );

  color: white;

  box-shadow:
    0 25px 80px
    rgba(0,0,0,0.7);

  position: relative;
}

.joker-game-window.show {
  display: flex;

  flex-direction: column;
}

.joker-game-top {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;
}

.joker-game-title {
  font-size: 26px;
  font-weight: 900;
}

#jokerTurnText {
  margin-top: 6px;

  color: #ffe084;

  font-size: 14px;
  font-weight: bold;
}


/* 상대 */

.opponent-area {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 20px;

  margin-top: 35px;
}

.opponent {
  min-height: 175px;

  padding: 15px;

  border:
    2px solid
    rgba(255,255,255,0.12);

  border-radius: 15px;

  background:
    rgba(0,0,0,0.17);

  text-align: center;

  transition: 0.2s;
}

.opponent.my-target {
  border-color: #ffd34f;

  box-shadow:
    0 0 20px
    rgba(255,211,79,0.35);

  background:
    rgba(255,211,79,0.08);
}

.opponent.finished {
  opacity: 0.35;
}

.opponent-name {
  font-size: 17px;
  font-weight: 900;
}

.opponent-status {
  margin-top: 5px;

  color: #c7d4ca;

  font-size: 12px;
}

.opponent-cards {
  display: flex;

  justify-content: center;
  align-items: center;

  min-height: 90px;

  margin-top: 12px;
}


/* 카드 뒷면 */

.back-card {
  width: 42px;
  height: 64px;

  margin-left: -18px;

  border: 2px solid white;
  border-radius: 7px;

  background:
    repeating-linear-gradient(
      45deg,
      #273c75,
      #273c75 5px,
      #192a56 5px,
      #192a56 10px
    );

  box-shadow:
    0 3px 6px
    rgba(0,0,0,0.25);

  transition: 0.15s;

  cursor: default;
}

.back-card:first-child {
  margin-left: 0;
}

.opponent.my-target .back-card {
  cursor: pointer;
}

.opponent.my-target .back-card:hover {
  transform:
    translateY(-13px);
}


/* 중앙 */

#jokerCenterMessage {
  display: flex;

  flex: 1;

  align-items: center;
  justify-content: center;

  padding: 15px;

  color: #fff3c0;

  text-align: center;

  font-size: 17px;
  font-weight: 900;
}


/* 내 카드 */

.my-joker-area {
  padding: 18px;

  border-radius: 18px;

  background:
    rgba(0,0,0,0.22);
}

.my-player-info {
  display: flex;

  justify-content: center;

  gap: 20px;

  margin-bottom: 15px;
}

#myCardCount {
  color: #ffe075;
}

#myCards {
  display: flex;

  justify-content: center;
  align-items: flex-end;

  min-height: 125px;
}

.my-card {
  position: relative;

  width: 72px;
  height: 105px;

  margin-left: -10px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 3px solid #e1e1e1;
  border-radius: 10px;

  background: #fff;

  color: #1b1b1b;

  box-shadow:
    0 5px 10px
    rgba(0,0,0,0.3);

  font-size: 27px;
  font-weight: 900;
}

.my-card:first-child {
  margin-left: 0;
}

.my-card.joker {
  border-color: #e64747;

  background:
    linear-gradient(
      145deg,
      #fff,
      #ffe6e6
    );

  color: #c82929;

  font-size: 18px;

  text-align: center;
}


/* ===============================
   조커 결과
================================ */

.joker-result-window {
  display: none;

  width: min(500px, 92vw);

  padding: 45px;

  border-radius: 25px;

  background:
    linear-gradient(
      145deg,
      #282f3b,
      #131820
    );

  color: white;

  text-align: center;

  box-shadow:
    0 25px 80px
    rgba(0,0,0,0.7);
}

.joker-result-window.show {
  display: block;
}

.result-joker {
  font-size: 80px;
}

#jokerResultText {
  margin-top: 20px;

  font-size: 18px;
  font-weight: bold;

  line-height: 1.8;
}

#jokerRewardText {
  margin-top: 18px;

  padding: 15px;

  border-radius: 12px;

  background:
    rgba(255,210,70,0.1);

  color: #ffd657;

  font-size: 20px;
  font-weight: 900;
}

#jokerResultButton {
  width: 100%;

  margin-top: 25px;

  padding: 14px;

  border: 0;
  border-radius: 10px;

  background: #ffad32;

  color: #171717;

  font-weight: 900;

  cursor: pointer;
}


/* ===============================
   모바일
================================ */

@media (max-width: 750px) {

  .game-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }

}

@media (max-width: 700px) {

  .opponent-area {
    gap: 7px;
  }

  .opponent {
    padding: 8px;
  }

  .back-card {
    width: 30px;
    height: 48px;

    margin-left: -18px;
  }

  .my-card {
    width: 52px;
    height: 80px;

    font-size: 21px;
  }

}

@media (max-width: 650px) {

  .shop-grid,
  #inventoryItems {
    grid-template-columns: 1fr;
  }

  .shop-window,
  .inventory-window {
    max-height: 90vh;

    overflow-y: auto;
  }

}

@media (max-width: 500px) {

  .game-grid {
    grid-template-columns: 1fr;
  }

  #minimap {
    width: 190px;
    height: 108px;
  }

  .joker-players {
    grid-template-columns:
      repeat(2, 1fr);
  }

}
/* ===============================
   보물찾기
================================ */
#treasureScreen{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:30px;background:rgba(12,16,22,.82);backdrop-filter:blur(6px);z-index:900;color:#fff}
#treasureScreen.show{display:flex}.treasure-window,.treasure-result-window{position:relative;width:min(650px,94vw);padding:36px;border-radius:25px;background:linear-gradient(145deg,#27382f,#121b16);text-align:center;box-shadow:0 25px 80px rgba(0,0,0,.65)}
#closeTreasure,#exitTreasureGame{width:42px;height:42px;border:0;border-radius:11px;background:rgba(255,255,255,.1);color:#fff;font-size:18px;cursor:pointer}.treasure-window #closeTreasure{position:absolute;right:20px;top:20px}.treasure-icon,.treasure-result-icon{font-size:70px}.treasure-description{color:#aebbb2}.treasure-mode-title{margin:24px 0 10px;font-weight:900;color:#ffe083}.treasure-mode-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px}.treasure-mode{padding:17px 10px;border:2px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.06);color:#fff;font-weight:900;cursor:pointer}.treasure-mode span{display:block;margin-top:6px;color:#9faea4;font-size:11px}.treasure-mode.active{border-color:#ffd05c;background:rgba(255,208,92,.14)}.treasure-players{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:20px 0}.treasure-players div{padding:12px 5px;border-radius:10px;background:rgba(255,255,255,.07);font-size:13px;font-weight:bold}.treasure-mode-info{color:#aebbb2;font-size:13px}#startTreasureGame{width:100%;margin-top:16px;padding:15px;border:0;border-radius:12px;background:#ffb43e;font-weight:900;font-size:16px;cursor:pointer}
.treasure-game-window{display:none;width:min(1120px,97vw);height:min(850px,95vh);overflow:auto;padding:24px;border-radius:25px;background:radial-gradient(circle at center,#264c39,#10271c 75%);box-shadow:0 25px 80px rgba(0,0,0,.7)}.treasure-game-window.show{display:block}.treasure-game-top{display:flex;justify-content:space-between;align-items:flex-start}.treasure-game-title{font-size:27px;font-weight:900}#treasureStatus{margin-top:5px;color:#ffe083;font-weight:bold}.treasure-range-box{display:flex;flex-direction:column;align-items:center;margin:18px auto;padding:12px;width:min(430px,90%);border-radius:14px;background:rgba(0,0,0,.22)}.treasure-range-box strong{font-size:30px;color:#ffd45c}.treasure-range-box small{color:#b8c9be}.treasure-board{display:grid;grid-template-columns:repeat(10,1fr);gap:7px;max-width:850px;margin:0 auto}.treasure-number{aspect-ratio:1;border:2px solid rgba(255,255,255,.15);border-radius:9px;background:rgba(255,255,255,.09);color:#fff;font-weight:900;font-size:15px;cursor:pointer;transition:.15s}.treasure-number:hover:not(:disabled){transform:translateY(-3px);background:#ffb43e;color:#171717}.treasure-number.removed{opacity:.18;text-decoration:line-through;cursor:not-allowed}.treasure-number.treasure-found{opacity:1;background:#ffd34f;color:#222;font-size:23px;transform:scale(1.15);box-shadow:0 0 30px #ffd34f;animation:treasureFound .7s ease infinite alternate}@keyframes treasureFound{to{transform:scale(1.25);box-shadow:0 0 50px #fff0a0}}.treasure-bottom{display:grid;grid-template-columns:1fr 1.4fr;gap:14px;margin-top:18px}.treasure-log-panel,.treasure-player-panel{padding:13px;border-radius:12px;background:rgba(0,0,0,.2)}#treasureLog{margin-top:8px;min-height:54px;font-size:12px;line-height:1.6;color:#dce6df}.treasure-player-panel{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.treasure-stat{padding:8px;border-radius:8px;background:rgba(255,255,255,.07);font-size:12px}.treasure-stat.active{outline:2px solid #ffd45c}.treasure-result-window{display:none}.treasure-result-window.show{display:block}#treasureResultText{margin:15px 0;line-height:1.7}#treasureRewardText{margin:15px 0;color:#ffd45c;font-size:22px;font-weight:900}#treasureResultButton{width:100%;padding:14px;border:0;border-radius:11px;background:#ffb43e;font-weight:900;cursor:pointer}
@media(max-width:700px){.treasure-board{gap:3px}.treasure-number{font-size:11px;border-radius:5px}.treasure-bottom{grid-template-columns:1fr}.treasure-player-panel{grid-template-columns:repeat(2,1fr)}.treasure-players{grid-template-columns:repeat(2,1fr)}}

/* =========================================================
   GAME 03 알까기
========================================================= */

#alkkagiScreen {
  position: fixed;
  inset: 0;
  z-index: 1200;

  display: none;

  align-items: center;
  justify-content: center;

  background:
    rgba(12, 18, 28, 0.88);

  backdrop-filter: blur(7px);
}

#alkkagiScreen.show {
  display: flex;
}


/* =========================================================
   로비
========================================================= */

.alkkagi-lobby {
  position: relative;

  width: min(560px, 92vw);

  padding: 38px;

  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      #fffdf6,
      #eee7d5
    );

  color: #252525;

  text-align: center;

  box-shadow:
    0 25px 80px
    rgba(0, 0, 0, 0.45);
}

.alkkagi-lobby-icon {
  font-size: 58px;
  margin-bottom: 4px;
}

.alkkagi-lobby h1 {
  margin: 0;

  font-size: 38px;
}

.alkkagi-subtitle {
  margin-top: 8px;

  color: #665f52;

  font-size: 16px;
}


/* 규칙 */

.alkkagi-rule-box {
  margin-top: 25px;

  padding: 20px 24px;

  border-radius: 18px;

  background:
    rgba(255,255,255,0.7);

  text-align: left;

  line-height: 2;

  font-size: 15px;
}


/* VS */

.alkkagi-match {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 28px;

  margin-top: 25px;

  font-size: 18px;
}

.alkkagi-match > div:not(.alkkagi-vs) {
  display: flex;
  flex-direction: column;

  gap: 5px;

  padding: 15px 22px;

  border-radius: 15px;

  background: white;
}

.alkkagi-vs {
  font-weight: 900;

  color: #877a64;
}

.alkkagi-reward {
  margin-top: 22px;

  font-size: 17px;
}

.alkkagi-reward strong {
  color: #b17700;
}


/* 버튼 */

.alkkagi-start-button {
  margin-top: 25px;

  min-width: 200px;

  padding: 15px 30px;

  border: 0;

  border-radius: 14px;

  background:
    linear-gradient(
      135deg,
      #d49a31,
      #ffca61
    );

  color: #2b210d;

  font-size: 18px;
  font-weight: 900;

  cursor: pointer;

  box-shadow:
    0 7px 0 #9d6b18;

  transition:
    transform 0.1s,
    box-shadow 0.1s;
}

.alkkagi-start-button:hover {
  transform:
    translateY(-2px);
}

.alkkagi-start-button:active {
  transform:
    translateY(5px);

  box-shadow:
    0 2px 0 #9d6b18;
}


/* =========================================================
   실제 게임
========================================================= */

.alkkagi-game {
  display: none;

  width: min(1050px, 96vw);
}

.alkkagi-game.show {
  display: block;
}


/* 상단 */

.alkkagi-topbar {
  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-bottom: 12px;

  color: white;
}

.alkkagi-small-label {
  font-size: 12px;

  opacity: 0.6;
}

.alkkagi-game-title {
  font-size: 25px;

  font-weight: 900;
}

.alkkagi-exit-button {
  border: 1px solid
    rgba(255,255,255,0.25);

  border-radius: 10px;

  padding: 9px 15px;

  background:
    rgba(255,255,255,0.1);

  color: white;

  cursor: pointer;
}


/* 점수판 */

.alkkagi-scoreboard {
  display: grid;

  grid-template-columns:
    1fr auto 1fr;

  align-items: center;

  gap: 20px;

  margin-bottom: 14px;
}

.alkkagi-player-box {
  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 10px 18px;

  border-radius: 12px;

  color: white;

  font-weight: 800;
}

.alkkagi-player-box.blue {
  background:
    rgba(52, 129, 235, 0.55);
}

.alkkagi-player-box.red {
  background:
    rgba(225, 75, 75, 0.55);
}

.alkkagi-player-box strong {
  font-size: 23px;
}

.alkkagi-turn {
  min-width: 150px;

  padding: 10px 20px;

  border-radius: 100px;

  background:
    #ffce63;

  color: #312509;

  text-align: center;

  font-weight: 900;
}


/* =========================================================
   바둑판
========================================================= */

.alkkagi-board-wrap {
  position: relative;

  width: 100%;

  overflow: hidden;

  border-radius: 20px;

  box-shadow:
    0 20px 55px
    rgba(0,0,0,0.5);
}

#alkkagiCanvas {
  display: block;

  width: 100%;
  height: auto;

  background: #d7a557;

  touch-action: none;

  cursor: default;
}


/* 중앙 메시지 */

.alkkagi-message {
  position: absolute;

  top: 50%;
  left: 50%;

  transform:
    translate(-50%, -50%)
    scale(0.8);

  padding: 14px 28px;

  border-radius: 100px;

  background:
    rgba(15, 15, 15, 0.85);

  color: white;

  font-size: 25px;
  font-weight: 900;

  opacity: 0;

  pointer-events: none;

  transition:
    opacity 0.2s,
    transform 0.2s;
}

.alkkagi-message.show {
  opacity: 1;

  transform:
    translate(-50%, -50%)
    scale(1);
}


.alkkagi-help {
  margin-top: 13px;

  color:
    rgba(255,255,255,0.75);

  text-align: center;

  font-size: 14px;
}


/* =========================================================
   결과
========================================================= */

.alkkagi-result {
  display: none;

  width: min(500px, 90vw);

  padding: 45px;

  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      #fffdf5,
      #eee5ce
    );

  color: #29251e;

  text-align: center;

  box-shadow:
    0 25px 80px
    rgba(0,0,0,0.5);
}

.alkkagi-result.show {
  display: block;
}

.alkkagi-result-icon {
  font-size: 70px;
}

.alkkagi-result h1 {
  margin:
    5px 0 12px;

  font-size: 38px;
}

.alkkagi-result p {
  color: #625a4d;

  line-height: 1.7;
}

.alkkagi-result-reward {
  margin-top: 20px;

  font-size: 21px;
  font-weight: 900;

  color: #b17700;
}

/* =========================================================
   월드 채팅
========================================================= */

#worldChat {
  position: fixed;
  left: 24px;
  bottom: 24px;

  width: 390px;

  z-index: 900;

  font-family: inherit;

  pointer-events: none;
}


/* =========================================================
   채팅 로그
========================================================= */

#chatMessages {
  height: 150px;

  padding: 14px 16px;

  overflow-y: auto;

  background: rgba(15, 18, 25, 0.72);

  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px 14px 0 0;

  backdrop-filter: blur(5px);

  box-sizing: border-box;

  color: white;

  font-size: 14px;
  line-height: 1.55;

  scrollbar-width: thin;
}


/* 채팅 한 줄 */

.chat-message {
  margin-bottom: 5px;

  word-break: break-word;

  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8);
}


/* 닉네임 */

.chat-name {
  font-weight: 800;

  margin-right: 6px;

  color: #ffd95a;
}


/* 시스템 메시지 */

.chat-system-message {
  color: rgba(255, 255, 255, 0.6);

  font-size: 13px;

  margin-bottom: 5px;
}


/* =========================================================
   채팅 입력창
========================================================= */

#chatInputArea {
  display: flex;

  width: 100%;

  background: rgba(10, 12, 18, 0.9);

  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top: none;

  border-radius: 0 0 14px 14px;

  overflow: hidden;

  box-sizing: border-box;

  opacity: 0;

  transform: translateY(5px);

  transition:
    opacity 0.15s ease,
    transform 0.15s ease;

  pointer-events: none;
}


/* 채팅 입력 중 */

#worldChat.chatting #chatInputArea {
  opacity: 1;

  transform: translateY(0);

  pointer-events: auto;
}


#worldChat.chatting {
  pointer-events: auto;
}


/* 입력칸 */

#chatInput {
  flex: 1;

  height: 44px;

  padding: 0 14px;

  border: none;
  outline: none;

  background: transparent;

  color: white;

  font-size: 14px;

  font-family: inherit;
}


#chatInput::placeholder {
  color: rgba(255, 255, 255, 0.4);
}


/* 전송 버튼 */

#chatSendButton {
  width: 68px;

  border: none;

  background: rgba(255, 255, 255, 0.12);

  color: white;

  font-weight: 800;

  cursor: pointer;

  transition: background 0.15s ease;
}


#chatSendButton:hover {
  background: rgba(255, 255, 255, 0.22);
}


/* =========================================================
   캐릭터 말풍선
========================================================= */

.player-chat-bubble {
  position: fixed;

  display: none;

  max-width: 230px;

  padding: 8px 12px;

  background: white;

  color: #222;

  border: 2px solid #222;

  border-radius: 12px;

  font-size: 13px;
  font-weight: 700;

  line-height: 1.35;

  text-align: center;

  word-break: break-word;

  z-index: 850;

  pointer-events: none;

  transform: translate(-50%, -100%);

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.25);
}


/* 말풍선 꼬리 */

.player-chat-bubble::after {
  content: "";

  position: absolute;

  left: 50%;
  bottom: -8px;

  transform: translateX(-50%);

  width: 0;
  height: 0;

  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #222;
}


.player-chat-bubble::before {
  content: "";

  position: absolute;

  left: 50%;
  bottom: -5px;

  transform: translateX(-50%);

  width: 0;
  height: 0;

  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid white;

  z-index: 1;
}


/* 말풍선 등장 */

.player-chat-bubble.show {
  display: block;

  animation: chatBubbleAppear 0.18s ease;
}


@keyframes chatBubbleAppear {

  from {
    opacity: 0;
    transform: translate(-50%, -90%) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
  }

}


/* =========================================================
   작은 화면
========================================================= */

@media (max-width: 600px) {

  #worldChat {
    left: 12px;
    bottom: 12px;

    width: calc(100% - 24px);
  }


  #chatMessages {
    height: 120px;
  }

}
/* =========================================================
   디코드 낚시터
========================================================= */

.fishing-screen {
  position: fixed;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(8, 12, 20, 0.92);

  z-index: 1200;

  overflow: hidden;
}


/* 화면 열림 */

.fishing-screen.show {
  display: flex;
}


/* =========================================================
   낚시터 메인 장면
========================================================= */

.fishing-scene {
  position: relative;

  width: min(1200px, 96vw);
  height: min(700px, 92vh);

  overflow: hidden;

  border-radius: 24px;

  background: #9edcf5;

  border: 4px solid rgba(255,255,255,0.22);

  box-shadow:
    0 30px 80px rgba(0,0,0,0.55);

  user-select: none;
}


/* =========================================================
   상단 UI
========================================================= */

.fishing-top-ui {
  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  height: 92px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 28px;

  box-sizing: border-box;

  z-index: 30;

  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.42),
      rgba(0,0,0,0)
    );

  color: white;
}


.fishing-title {
  font-size: 25px;
  font-weight: 900;

  text-shadow:
    0 2px 5px rgba(0,0,0,0.5);
}


.fishing-status {
  margin-top: 5px;

  font-size: 14px;
  font-weight: 700;

  color: rgba(255,255,255,0.88);

  text-shadow:
    0 1px 3px rgba(0,0,0,0.6);
}


.fishing-exit-button {
  padding: 11px 18px;

  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 12px;

  background: rgba(0,0,0,0.28);

  color: white;

  font-size: 14px;
  font-weight: 900;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    background 0.15s ease;
}


.fishing-exit-button:hover {
  background: rgba(0,0,0,0.45);

  transform: translateY(-2px);
}


/* =========================================================
   하늘
========================================================= */

.fishing-sky {
  position: absolute;

  inset: 0 0 auto 0;

  height: 280px;

  background:
    linear-gradient(
      to bottom,
      #74c7ef 0%,
      #bcecff 100%
    );

  z-index: 1;
}


/* =========================================================
   구름
========================================================= */

.fishing-cloud {
  position: absolute;

  width: 110px;
  height: 34px;

  background: rgba(255,255,255,0.82);

  border-radius: 50px;

  filter:
    drop-shadow(
      0 4px 4px rgba(0,0,0,0.06)
    );
}


.fishing-cloud::before,
.fishing-cloud::after {
  content: "";

  position: absolute;

  background: inherit;

  border-radius: 50%;
}


.fishing-cloud::before {
  width: 48px;
  height: 48px;

  left: 18px;
  top: -22px;
}


.fishing-cloud::after {
  width: 62px;
  height: 62px;

  right: 12px;
  top: -30px;
}


.cloud-one {
  left: 12%;
  top: 100px;

  animation:
    fishingCloudMoveOne
    22s linear infinite;
}


.cloud-two {
  right: 15%;
  top: 150px;

  transform: scale(0.72);

  opacity: 0.8;

  animation:
    fishingCloudMoveTwo
    28s linear infinite;
}


@keyframes fishingCloudMoveOne {

  0% {
    transform: translateX(-40px);
  }

  50% {
    transform: translateX(55px);
  }

  100% {
    transform: translateX(-40px);
  }

}


@keyframes fishingCloudMoveTwo {

  0% {
    transform:
      scale(0.72)
      translateX(40px);
  }

  50% {
    transform:
      scale(0.72)
      translateX(-70px);
  }

  100% {
    transform:
      scale(0.72)
      translateX(40px);
  }

}


/* =========================================================
   반대편 땅
========================================================= */

.fishing-far-land {
  position: absolute;

  left: 0;
  right: 0;

  top: 225px;

  height: 115px;

  background:
    linear-gradient(
      to bottom,
      #78b95d,
      #5e964b
    );

  z-index: 3;

  border-bottom:
    8px solid #b69a62;
}


.fishing-far-land::before {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 24px;

  background:
    #d3b77a;
}


/* =========================================================
   나무
========================================================= */

.fishing-tree {
  position: absolute;

  bottom: 42px;

  font-size: 76px;

  filter:
    drop-shadow(
      0 6px 3px rgba(0,0,0,0.15)
    );
}


.tree-one {
  left: 7%;
}


.tree-two {
  left: 21%;

  font-size: 66px;
}


.tree-three {
  right: 9%;
}


/* =========================================================
   물
========================================================= */

.fishing-water {
  position: absolute;

  left: 0;
  right: 0;

  top: 320px;

  height: 290px;

  overflow: hidden;

  background:
    linear-gradient(
      to bottom,
      #4ca9d4 0%,
      #368bbd 55%,
      #2775a4 100%
    );

  z-index: 5;
}


/* 물 표면 빛 */

.fishing-water::before {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  top: 0;

  height: 45px;

  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.28),
      rgba(255,255,255,0)
    );
}


/* =========================================================
   물결 선
========================================================= */

.water-line {
  position: absolute;

  height: 3px;

  border-radius: 50%;

  background:
    rgba(255,255,255,0.24);

  animation:
    fishingWaterMove
    4s ease-in-out infinite alternate;
}


.water-line-1 {
  width: 180px;

  left: 13%;
  top: 55px;
}


.water-line-2 {
  width: 130px;

  left: 47%;
  top: 115px;

  animation-delay: -1.4s;
}


.water-line-3 {
  width: 220px;

  right: 8%;
  top: 180px;

  animation-delay: -2.2s;
}


.water-line-4 {
  width: 95px;

  left: 31%;
  top: 225px;

  animation-delay: -0.7s;
}


@keyframes fishingWaterMove {

  from {
    transform:
      translateX(-16px)
      scaleX(0.9);

    opacity: 0.18;
  }

  to {
    transform:
      translateX(20px)
      scaleX(1.1);

    opacity: 0.42;
  }

}


/* =========================================================
   가까운 땅
========================================================= */

.fishing-near-land {
  position: absolute;

  left: 0;
  right: 0;

  bottom: 0;

  height: 130px;

  z-index: 8;

  background:
    linear-gradient(
      to bottom,
      #d8bb78 0%,
      #b99253 100%
    );

  border-top:
    10px solid #8c713f;
}


.fishing-near-land::after {
  content: "";

  position: absolute;

  inset: 22px 0 0 0;

  opacity: 0.16;

  background-image:
    radial-gradient(
      circle,
      #5d462c 1px,
      transparent 2px
    );

  background-size:
    28px 28px;
}


/* =========================================================
   플레이어
========================================================= */

.fishing-player {
  position: absolute;

  left: 49%;
  bottom: 75px;

  width: 84px;
  height: 84px;

  transform:
    translateX(-50%);

  z-index: 15;

  transition:
    transform 0.15s ease;
}


.fishing-player img {
  width: 100%;
  height: 100%;

  object-fit: contain;

  image-rendering: pixelated;

  filter:
    drop-shadow(
      0 7px 4px rgba(0,0,0,0.22)
    );
}


/* 던지는 순간 캐릭터 살짝 움직임 */

.fishing-player.casting {
  animation:
    fishingPlayerCast
    0.55s ease;
}


@keyframes fishingPlayerCast {

  0% {
    transform:
      translateX(-50%)
      rotate(0deg);
  }

  25% {
    transform:
      translateX(-50%)
      rotate(-7deg);
  }

  55% {
    transform:
      translateX(-50%)
      rotate(5deg);
  }

  100% {
    transform:
      translateX(-50%)
      rotate(0deg);
  }

}


/* =========================================================
   낚싯대
========================================================= */

.fishing-rod {
  position: absolute;

  left: calc(49% + 27px);
  bottom: 125px;

  width: 180px;
  height: 180px;

  z-index: 17;

  pointer-events: none;

  transform-origin:
    0% 100%;

  transform:
    rotate(-52deg);

  transition:
    transform 0.2s ease;
}


.fishing-rod-stick {
  position: absolute;

  left: 0;
  bottom: 0;

  width: 165px;
  height: 7px;

  border-radius: 10px;

  transform-origin:
    left center;

  transform:
    rotate(-36deg);

  background:
    linear-gradient(
      to right,
      #5d341d 0%,
      #8c5730 40%,
      #d0a66c 75%,
      #eee0bd 100%
    );

  box-shadow:
    0 2px 2px rgba(0,0,0,0.25);
}


/* 낚싯대 던지기 */

.fishing-rod.casting {
  animation:
    fishingRodCast
    0.7s
    cubic-bezier(
      0.3,
      0,
      0.2,
      1
    );
}


@keyframes fishingRodCast {

  0% {
    transform:
      rotate(-52deg);
  }

  25% {
    transform:
      rotate(-88deg);
  }

  50% {
    transform:
      rotate(-15deg);
  }

  75% {
    transform:
      rotate(-28deg);
  }

  100% {
    transform:
      rotate(-52deg);
  }

}


/* =========================================================
   낚싯줄 Canvas
========================================================= */

#fishingLineCanvas {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 14;

  pointer-events: none;
}


/* =========================================================
   찌
========================================================= */

.fishing-bobber {
  position: absolute;

  left: 50%;
  top: -50px;

  width: 18px;
  height: 40px;

  transform:
    translate(-50%, -50%);

  z-index: 18;

  display: none;

  filter:
    drop-shadow(
      0 3px 2px rgba(0,0,0,0.28)
    );
}


.bobber-top {
  position: absolute;

  left: 7px;
  top: 0;

  width: 4px;
  height: 17px;

  border-radius: 4px 4px 0 0;

  background: #f6f6f6;
}


.bobber-bottom {
  position: absolute;

  left: 2px;
  top: 14px;

  width: 14px;
  height: 20px;

  border-radius:
    8px 8px 10px 10px;

  background:
    linear-gradient(
      to bottom,
      #ff4b45 0%,
      #ff4b45 48%,
      #f5f5f5 49%,
      #f5f5f5 100%
    );

  border:
    2px solid rgba(0,0,0,0.35);

  box-sizing: border-box;
}


/* 물 위에서 둥둥 */

.fishing-bobber.floating {
  display: block;

  animation:
    fishingBobberFloat
    1.4s ease-in-out infinite;
}


@keyframes fishingBobberFloat {

  0%,
  100% {
    transform:
      translate(-50%, -50%)
      translateY(0);
  }

  50% {
    transform:
      translate(-50%, -50%)
      translateY(6px);
  }

}


/* 물고기가 물었을 때 */

.fishing-bobber.biting {
  display: block;

  animation:
    fishingBobberBite
    0.28s ease-in-out infinite alternate;
}


@keyframes fishingBobberBite {

  from {
    transform:
      translate(-50%, -50%)
      translateY(5px);
  }

  to {
    transform:
      translate(-50%, -50%)
      translateY(25px);
  }

}


/* =========================================================
   착수 물결
========================================================= */

.fishing-splash {
  position: absolute;

  display: none;

  width: 20px;
  height: 10px;

  border:
    3px solid rgba(255,255,255,0.8);

  border-radius: 50%;

  transform:
    translate(-50%, -50%);

  z-index: 16;
}


.fishing-splash.show {
  display: block;

  animation:
    fishingSplashAnimation
    0.8s ease-out forwards;
}


@keyframes fishingSplashAnimation {

  0% {
    width: 10px;
    height: 5px;

    opacity: 1;
  }

  100% {
    width: 110px;
    height: 30px;

    opacity: 0;
  }

}


/* =========================================================
   낚싯대 던지기 버튼
========================================================= */

.cast-fishing-button {
  position: absolute;

  left: 50%;
  bottom: 24px;

  transform:
    translateX(-50%);

  z-index: 40;

  padding:
    14px 26px;

  border: none;

  border-radius: 14px;

  background:
    linear-gradient(
      to bottom,
      #fff5a8,
      #f0c84f
    );

  color: #45330c;

  font-size: 16px;
  font-weight: 900;

  cursor: pointer;

  box-shadow:
    0 6px 0 #a98022,
    0 9px 15px rgba(0,0,0,0.25);

  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}


.cast-fishing-button:hover {
  transform:
    translateX(-50%)
    translateY(-2px);
}


.cast-fishing-button:active {
  transform:
    translateX(-50%)
    translateY(4px);

  box-shadow:
    0 2px 0 #a98022,
    0 4px 8px rgba(0,0,0,0.25);
}


.cast-fishing-button:disabled {
  opacity: 0.55;

  cursor: default;
}


/* =========================================================
   입질 버튼
========================================================= */

.fishing-bite-button {
  position: absolute;

  left: 50%;
  top: 46%;

  transform:
    translate(-50%, -50%)
    scale(0.7);

  z-index: 60;

  display: none;

  padding:
    18px 32px;

  border: 4px solid white;

  border-radius: 18px;

  background:
    linear-gradient(
      to bottom,
      #ff5d55,
      #d72f2f
    );

  color: white;

  font-size: 26px;
  font-weight: 1000;

  cursor: pointer;

  box-shadow:
    0 8px 0 #841d1d,
    0 14px 30px rgba(0,0,0,0.4);

  text-shadow:
    0 2px 3px rgba(0,0,0,0.3);
}


.fishing-bite-button.show {
  display: block;

  animation:
    fishingBiteButtonAppear
    0.45s ease forwards,
    fishingBitePulse
    0.65s ease-in-out
    0.45s infinite alternate;
}


@keyframes fishingBiteButtonAppear {

  from {
    opacity: 0;

    transform:
      translate(-50%, -50%)
      scale(0.5);
  }

  to {
    opacity: 1;

    transform:
      translate(-50%, -50%)
      scale(1);
  }

}


@keyframes fishingBitePulse {

  from {
    transform:
      translate(-50%, -50%)
      scale(1);
  }

  to {
    transform:
      translate(-50%, -50%)
      scale(1.08);
  }

}


/* =========================================================
   기다리는 점
========================================================= */

.fishing-waiting {
  position: absolute;

  left: 50%;
  top: 170px;

  transform:
    translateX(-50%);

  display: none;

  z-index: 35;

  padding:
    9px 17px;

  border-radius: 20px;

  background:
    rgba(0,0,0,0.35);

  color: white;

  font-size: 22px;
  font-weight: 900;
}


.fishing-waiting.show {
  display: block;
}


.fishing-waiting span {
  display: inline-block;

  animation:
    fishingWaitingDot
    1s ease-in-out infinite;
}


.fishing-waiting span:nth-child(2) {
  animation-delay: 0.15s;
}


.fishing-waiting span:nth-child(3) {
  animation-delay: 0.3s;
}


@keyframes fishingWaitingDot {

  0%,
  100% {
    transform:
      translateY(0);

    opacity: 0.4;
  }

  50% {
    transform:
      translateY(-7px);

    opacity: 1;
  }

}


/* =========================================================
   낚시 미니게임
========================================================= */

.fishing-mini-game {
  position: absolute;

  left: 50%;
  top: 50%;

  transform:
    translate(-50%, -50%)
    scale(0.9);

  z-index: 100;

  display: none;

  width: 330px;

  padding:
    22px 24px;

  box-sizing: border-box;

  border-radius: 20px;

  background:
    rgba(20,24,31,0.96);

  border:
    3px solid rgba(255,255,255,0.22);

  box-shadow:
    0 20px 60px rgba(0,0,0,0.55);

  color: white;

  text-align: center;
}


.fishing-mini-game.show {
  display: block;

  animation:
    fishingMiniGameAppear
    0.3s ease forwards;
}


@keyframes fishingMiniGameAppear {

  from {
    opacity: 0;

    transform:
      translate(-50%, -50%)
      scale(0.75);
  }

  to {
    opacity: 1;

    transform:
      translate(-50%, -50%)
      scale(1);
  }

}


.fishing-mini-title {
  margin-bottom: 16px;

  font-size: 18px;
  font-weight: 900;
}


/* =========================================================
   미니게임 영역
========================================================= */

.fishing-game-area {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 25px;
}


/* =========================================================
   세로 낚시바
========================================================= */

.fishing-bar {
  position: relative;

  width: 82px;
  height: 330px;

  overflow: hidden;

  border:
    5px solid #d9c38d;

  border-radius: 15px;

  background:
    linear-gradient(
      to right,
      #194f67,
      #287995,
      #194f67
    );

  box-shadow:
    inset 0 0 18px rgba(0,0,0,0.45);
}


/* 낚시바 가로 눈금 */

.fishing-bar::before {
  content: "";

  position: absolute;

  inset: 0;

  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 32px,
      rgba(255,255,255,0.1) 33px,
      rgba(255,255,255,0.1) 34px
    );

  pointer-events: none;
}


/* =========================================================
   물고기
========================================================= */

.fishing-fish {
  position: absolute;

  left: 50%;
  bottom: 145px;

  transform:
    translateX(-50%);

  z-index: 5;

  font-size: 31px;

  filter:
    drop-shadow(
      0 3px 2px rgba(0,0,0,0.4)
    );

  pointer-events: none;
}


/* =========================================================
   플레이어 포획 영역
========================================================= */

.fishing-catch-zone {
  position: absolute;

  left: 7px;
  bottom: 15px;

  width: 68px;
  height: 90px;

  box-sizing: border-box;

  border:
    3px solid rgba(205,255,151,0.95);

  border-radius: 10px;

  background:
    rgba(114,220,78,0.38);

  box-shadow:
    inset 0 0 14px rgba(210,255,164,0.35),
    0 0 12px rgba(129,255,90,0.18);

  pointer-events: none;
}


/* =========================================================
   포획 진행 게이지
========================================================= */

.fishing-progress-wrapper {
  width: 48px;
}


.fishing-progress-label {
  margin-bottom: 8px;

  font-size: 12px;
  font-weight: 900;

  color: rgba(255,255,255,0.8);
}


.fishing-progress {
  position: relative;

  width: 28px;
  height: 330px;

  margin: 0 auto;

  overflow: hidden;

  border:
    3px solid rgba(255,255,255,0.65);

  border-radius: 20px;

  background:
    rgba(0,0,0,0.42);
}


.fishing-progress-fill {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 25%;

  background:
    linear-gradient(
      to top,
      #4dbb53,
      #b6ef67,
      #fff084
    );

  transition:
    height 0.06s linear;
}


/* =========================================================
   미니게임 설명
========================================================= */

.fishing-control-help {
  margin-top: 15px;

  padding-top: 13px;

  border-top:
    1px solid rgba(255,255,255,0.12);

  font-size: 12px;
  line-height: 1.55;

  color: rgba(255,255,255,0.68);
}


/* =========================================================
   낚시 결과창
========================================================= */

.fishing-result {
  position: absolute;

  left: 50%;
  top: 50%;

  transform:
    translate(-50%, -50%)
    scale(0.75);

  z-index: 120;

  display: none;

  width: 340px;

  padding:
    28px 25px;

  box-sizing: border-box;

  border-radius: 22px;

  background:
    linear-gradient(
      to bottom,
      #fff9dd,
      #f2dfad
    );

  border:
    5px solid #9c7133;

  box-shadow:
    0 25px 70px rgba(0,0,0,0.55);

  text-align: center;

  color: #4b351b;
}


.fishing-result.show {
  display: block;

  animation:
    fishingResultAppear
    0.45s
    cubic-bezier(
      0.2,
      1.5,
      0.4,
      1
    )
    forwards;
}


@keyframes fishingResultAppear {

  from {
    opacity: 0;

    transform:
      translate(-50%, -50%)
      scale(0.55)
      rotate(-5deg);
  }

  to {
    opacity: 1;

    transform:
      translate(-50%, -50%)
      scale(1)
      rotate(0deg);
  }

}


.fishing-result-icon {
  font-size: 74px;

  line-height: 1;

  margin-bottom: 12px;

  animation:
    fishingResultFish
    1.2s ease-in-out infinite alternate;
}


@keyframes fishingResultFish {

  from {
    transform:
      rotate(-5deg)
      translateY(0);
  }

  to {
    transform:
      rotate(5deg)
      translateY(-5px);
  }

}


.fishing-result-small {
  font-size: 14px;
  font-weight: 900;

  color: #8a6938;

  margin-bottom: 5px;
}


.fishing-result-name {
  font-size: 30px;
  font-weight: 1000;

  margin-bottom: 8px;
}


.fishing-result-size {
  font-size: 20px;
  font-weight: 900;

  margin-bottom: 8px;
}


.fishing-result-grade {
  display: inline-block;

  margin-bottom: 14px;

  padding:
    6px 13px;

  border-radius: 20px;

  background:
    rgba(255,255,255,0.6);

  font-size: 14px;
  font-weight: 900;
}


.fishing-result-reward {
  margin-bottom: 20px;

  font-size: 17px;
  font-weight: 1000;

  color: #a46c00;
}


.fishing-result-button {
  width: 100%;

  padding:
    12px 20px;

  border: none;
  border-radius: 12px;

  background:
    #5c8d45;

  color: white;

  font-size: 15px;
  font-weight: 900;

  cursor: pointer;

  box-shadow:
    0 4px 0 #365c28;
}


.fishing-result-button:active {
  transform:
    translateY(3px);

  box-shadow:
    0 1px 0 #365c28;
}


/* =========================================================
   물고기가 물었을 때 화면 효과
========================================================= */

.fishing-scene.fish-bite {
  animation:
    fishingSceneBite
    0.22s ease-in-out 2;
}


@keyframes fishingSceneBite {

  0%,
  100% {
    transform:
      translate(0,0);
  }

  25% {
    transform:
      translate(-3px,1px);
  }

  75% {
    transform:
      translate(3px,-1px);
  }

}


/* =========================================================
   반응형
========================================================= */

@media (
  max-width: 700px
) {

  .fishing-scene {
    width: 100vw;
    height: 100vh;

    border-radius: 0;

    border: none;
  }


  .fishing-top-ui {
    padding:
      0 15px;
  }


  .fishing-title {
    font-size: 20px;
  }


  .fishing-player {
    width: 70px;
    height: 70px;
  }


  .fishing-mini-game {
    width: 300px;

    padding:
      18px 18px;
  }


  .fishing-bar {
    height: 300px;
  }


  .fishing-progress {
    height: 300px;
  }


  .fishing-result {
    width:
      calc(100% - 40px);

    max-width: 340px;
  }

}