/* ===== 🏆 올스타 배틀로얄 꾸미기 ===== */

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

body {
  font-family: "Jua", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,150,40,.18), transparent 50%),
    radial-gradient(circle at 85% 90%, rgba(120,60,255,.20), transparent 50%),
    #0b1018;
  color: #fff;
  min-height: 100vh;
  padding: 62px 14px 30px;
}

.숨김 { display: none !important; }

.돌아가기 {
  position: fixed; top: 12px; left: 14px; z-index: 60;
  font-size: 17px; padding: 8px 16px; border-radius: 14px;
  background: rgba(0,0,0,.6);
  border: 2px solid rgba(255,255,255,.3);
  color: #fff; text-decoration: none;
}
.돌아가기:hover { background: rgba(0,0,0,.9); }

.화면 { max-width: 1000px; margin: 0 auto; }

.큰제목 {
  text-align: center; font-size: 50px; color: #ffd34d;
  text-shadow: 0 0 34px rgba(255,190,60,.7), 0 5px 0 #6b3a00;
  animation: 둥실 2.6s ease-in-out infinite;
}
@keyframes 둥실 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.설명 { text-align: center; font-size: 20px; color: #cfe3ff; margin: 10px 0 18px; line-height: 1.6; }
.설명 b { color: #ffd34d; }
.줄제목 { text-align: center; font-size: 25px; color: #ffd34d; margin: 22px 0 10px; }
.빈말 { text-align: center; font-size: 20px; color: #8fa4c0; padding: 30px; line-height: 1.7; }
.빈말 a { color: #7ad8ff; }

/* ===== 조작 안내 ===== */
.조작안내 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; max-width: 800px; margin: 0 auto;
}
.안내칸 {
  background: rgba(0,0,0,.42);
  border: 3px solid rgba(122,216,255,.35);
  border-radius: 16px; padding: 12px;
  text-align: center; font-size: 16px; color: #cfe3ff; line-height: 1.7;
}
.안내칸 b { color: #ffd34d; font-size: 18px; }

/* ===== 고르기 줄 ===== */
.고름줄 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.고름칸 {
  font-family: inherit; font-size: 19px;
  padding: 11px 22px; border-radius: 16px;
  border: 3px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.07);
  color: #fff; cursor: pointer; transition: .14s;
}
.고름칸:hover { transform: translateY(-3px); }
.고름칸.고름 {
  background: linear-gradient(160deg, #ffb020, #ff7a00);
  border-color: #fff3c4; color: #2a1400; font-weight: bold;
  box-shadow: 0 0 22px rgba(255,170,30,.6);
}

/* ===== 🤝 팀 고르기 ===== */
.팀칸 {
  background: rgba(0,0,0,.35);
  border: 4px solid rgba(61,220,132,.45);
  border-radius: 24px; padding: 16px; margin: 16px 0;
  text-align: center;
}
.팀칸 h3 { font-size: 23px; color: #3ddc84; margin-bottom: 4px; }
.팀안내 { font-size: 15px; color: #8fa4c0; margin-bottom: 12px; }
.팀슬롯줄 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.팀슬롯 {
  width: 92px; height: 116px;
  border: 3px dashed rgba(255,255,255,.25); border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 30px; color: rgba(255,255,255,.28);
  cursor: pointer; transition: .14s;
}
.팀슬롯.채움 {
  border-style: solid; border-color: #3ddc84;
  background: linear-gradient(165deg, rgba(61,220,132,.2), rgba(0,0,0,.3));
  box-shadow: 0 0 18px rgba(61,220,132,.5);
}
.팀슬롯.채움:hover { transform: translateY(-4px); }
.팀슬롯 .얼굴 {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--옷색); font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.35);
}
.팀슬롯 .이름 { font-size: 13px; margin-top: 5px; color: #fff; }
.팀슬롯 .레벨 { font-size: 11px; color: #ffd34d; }
.팀슬롯.대장 { border-color: #ffd34d; box-shadow: 0 0 18px rgba(255,211,77,.6); }

/* 고를 카드가 팀원으로 뽑혔을 때 */
.고를카드.팀원 {
  outline: 4px solid #3ddc84; outline-offset: 2px;
  box-shadow: 0 0 22px #3ddc84;
}
.고를카드 .팀딱 {
  position: absolute; bottom: 5px; right: 6px;
  font-size: 11px; background: #3ddc84; color: #042a14;
  border-radius: 8px; padding: 1px 6px; font-weight: bold;
}

/* ===== 전장 · 팀원 상태 ===== */
.정보딱.팀 { color: #3ddc84; border-color: rgba(61,220,132,.55); }
.정보딱.팀 b { color: #3ddc84; }

.팀원막 {
  position: absolute; top: 46px; left: 10px;
  display: flex; flex-direction: column; gap: 4px;
  pointer-events: none;
}
.팀원칸 {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.6); border-left: 4px solid #3ddc84;
  border-radius: 10px; padding: 3px 9px 3px 6px;
  font-size: 13px; color: #dfffe8; min-width: 130px;
}
.팀원칸.쓰러짐 { border-left-color: #6a6a7a; color: #8a8a9a; filter: grayscale(1); }
.팀원칸 .작은얼굴 {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; background: rgba(255,255,255,.12);
}
.팀원칸 .체력조각 {
  flex: 1; height: 7px; background: rgba(0,0,0,.6);
  border-radius: 4px; overflow: hidden;
}
.팀원칸 .체력조각 i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #3ddc84, #a8ffc8);
  transition: width .2s;
}

/* ===== 🤝 팀전 팀 고르기 ===== */
.팀칸 {
  background: rgba(0,0,0,.35);
  border: 4px solid rgba(90,150,255,.5);
  border-radius: 24px; padding: 16px; margin: 16px 0;
  text-align: center;
}
.팀칸 h3 { font-size: 22px; color: #7ad8ff; margin-bottom: 6px; }
.팀안내 { font-size: 15px; color: #9ab4d0; margin-bottom: 12px; }
.팀슬롯줄 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.팀슬롯 {
  width: 92px; height: 112px;
  border: 3px dashed rgba(255,255,255,.28); border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 30px; color: rgba(255,255,255,.3); cursor: pointer; transition: .14s;
}
.팀슬롯.채움 {
  border-style: solid; border-color: var(--등급색);
  background: linear-gradient(165deg, rgba(90,150,255,.18), rgba(0,0,0,.3));
  box-shadow: 0 0 16px var(--등급색);
}
.팀슬롯.채움:hover { transform: translateY(-3px); }
.팀슬롯 .얼굴 {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--옷색); font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.35);
}
.팀슬롯 .이름 { font-size: 13px; margin-top: 4px; color: #fff; }
.팀슬롯 .레벨 { font-size: 11px; color: #ffd34d; }

.고를카드.팀원 {
  outline: 4px solid #4a8aff; outline-offset: 2px;
  box-shadow: 0 0 24px #4a8aff;
}
.고를카드 .팀딱 {
  position: absolute; bottom: 4px; right: 6px;
  font-size: 11px; background: #4a8aff; color: #fff;
  border-radius: 8px; padding: 1px 6px;
}

/* ===== 전장 팀 정보 ===== */
.정보딱.팀 { color: #7ad8ff; border-color: rgba(122,216,255,.5); }
.정보딱.팀 b { color: #7ad8ff; }

/* 우리 팀원 작은 상태창 */
.팀원막 {
  position: absolute; left: 10px; top: 46px;
  display: flex; flex-direction: column; gap: 5px;
  pointer-events: none;
}
.팀원칸 {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.6); border-left: 4px solid #4a8aff;
  border-radius: 10px; padding: 4px 9px; width: 168px;
}
.팀원칸.죽음 { opacity: .4; border-left-color: #888; }
.팀원칸 .작은얼굴 { font-size: 17px; }
.팀원칸 .팀원글 { flex: 1; font-size: 12px; color: #dbe9ff; }
.팀원칸 .작은틀 {
  height: 6px; background: rgba(0,0,0,.6);
  border-radius: 4px; overflow: hidden; margin-top: 2px;
}
.팀원칸 .작은바 { height: 100%; background: linear-gradient(90deg, #3ddc84, #7ad8ff); transition: width .2s; }

/* ===== 내 캐릭터 ===== */
.내캐릭칸 {
  background: rgba(0,0,0,.35);
  border: 4px solid rgba(255,211,77,.45);
  border-radius: 24px; padding: 16px; margin: 18px 0;
  text-align: center;
}
.내캐릭칸 h3 { font-size: 23px; color: #ffd34d; margin-bottom: 12px; }
.고른슬롯 {
  width: 150px; height: 180px; margin: 0 auto;
  border: 4px dashed rgba(255,255,255,.28); border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 46px; color: rgba(255,255,255,.3);
}
.고른슬롯.채움 {
  border-style: solid; border-color: var(--등급색);
  background: linear-gradient(165deg, rgba(255,255,255,.12), rgba(0,0,0,.3));
  box-shadow: 0 0 26px var(--등급색);
}
.고른슬롯 .얼굴 {
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--옷색); font-size: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid rgba(255,255,255,.35);
}
.고른슬롯 .이름 { font-size: 19px; margin-top: 8px; color: #fff; }
.고른슬롯 .레벨 { font-size: 14px; color: #ffd34d; }
.고른슬롯 .스킬글 { font-size: 13px; color: #b8a8e8; margin-top: 3px; }

/* ===== 🔓 비밀 코드 ===== */
.비밀칸 {
  max-width: 520px; margin: 20px auto;
  background: rgba(0,0,0,.4);
  border: 4px solid rgba(200,138,255,.45);
  border-radius: 24px; padding: 14px 18px 18px;
  text-align: center;
}
.비밀칸 .줄제목 { color: #c88aff; margin-top: 4px; }
.비밀줄 { display: flex; gap: 8px; justify-content: center; }
.비밀입력 {
  flex: 1; max-width: 300px;
  font-family: inherit; font-size: 19px;
  padding: 10px 16px; border-radius: 14px;
  border: 3px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.5); color: #fff; text-align: center;
}
.비밀입력:focus { outline: none; border-color: #c88aff; box-shadow: 0 0 16px rgba(200,138,255,.6); }
.비밀버튼 {
  font-family: inherit; font-size: 19px;
  padding: 10px 22px; border: none; border-radius: 14px;
  background: linear-gradient(160deg, #c88aff, #8a4ae8);
  color: #fff; font-weight: bold; cursor: pointer;
  box-shadow: 0 4px 0 #5a2a9a;
}
.비밀버튼:active { transform: translateY(3px); box-shadow: 0 1px 0 #5a2a9a; }
.비밀말 { font-size: 18px; margin-top: 10px; min-height: 24px; }
.비밀말.맞음 { color: #3ddc84; }
.비밀말.틀림 { color: #ff8a8a; }

/* ===== 큰 버튼 ===== */
.큰버튼 {
  display: block; margin: 0 auto;
  font-family: inherit; font-size: 26px;
  padding: 14px 40px; border: none; border-radius: 22px;
  background: linear-gradient(160deg, #ffb020, #e8722a);
  color: #2a1400; font-weight: bold; cursor: pointer;
  text-decoration: none; text-align: center;
  box-shadow: 0 6px 0 #8e4210, 0 0 26px rgba(255,150,40,.5);
  transition: .12s;
}
.큰버튼:hover { transform: translateY(-3px); }
.큰버튼:active { transform: translateY(4px); box-shadow: 0 2px 0 #8e4210; }
.큰버튼:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.큰버튼.회색 {
  margin-top: 12px; font-size: 20px; padding: 11px 28px; color: #fff;
  background: linear-gradient(160deg, #6a7a90, #46536a);
  box-shadow: 0 6px 0 #29323f;
}

/* ===== 고를 판 ===== */
.고를판 { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.고를카드 {
  position: relative;
  background: linear-gradient(165deg, rgba(255,255,255,.1), rgba(0,0,0,.35));
  border: 4px solid var(--등급색); border-radius: 20px;
  padding: 12px 8px; text-align: center; cursor: pointer; transition: .14s;
}
.고를카드:hover { transform: translateY(-5px); box-shadow: 0 8px 24px var(--등급색); }
.고를카드.뽑힘 { outline: 4px solid #3ddc84; outline-offset: 2px; box-shadow: 0 0 26px #3ddc84; }
.고를카드 .얼굴 {
  width: 60px; height: 60px; margin: 0 auto 6px;
  border-radius: 50%; font-size: 31px;
  display: flex; align-items: center; justify-content: center;
  background: var(--옷색); border: 3px solid rgba(255,255,255,.35);
}
.고를카드 h4 { font-size: 17px; }
.고를카드 .작은글 { font-size: 13px; color: #b8c8e0; }
.고를카드 .유형딱 { position: absolute; top: 6px; right: 8px; font-size: 16px; }
.고를카드 .레벨딱 {
  position: absolute; top: 6px; left: 8px; font-size: 12px; color: #ffd34d;
  background: rgba(0,0,0,.5); border-radius: 8px; padding: 1px 6px;
}

/* =========================================================
   전장
   ========================================================= */
.전장틀 {
  position: relative; max-width: 900px; margin: 0 auto;
  border: 5px solid rgba(255,211,77,.45); border-radius: 22px;
  overflow: hidden; box-shadow: 0 0 44px rgba(0,0,0,.7);
  touch-action: none;
}
#판 { display: block; width: 100%; height: auto; background: #1a3a22; cursor: crosshair; }

/* 위쪽 정보막 */
.머리막 {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  padding: 8px; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.65), transparent);
}
.정보딱 {
  font-size: 17px; padding: 5px 14px; border-radius: 12px;
  background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.28); color: #fff;
}
.정보딱 b { font-size: 22px; }
.정보딱.생존 b { color: #3ddc84; }
.정보딱.킬 b { color: #ff8a6a; }
.정보딱.자기장 { color: #7ad8ff; border-color: rgba(122,216,255,.5); }
.정보딱.자기장.위험 {
  color: #ff6a6a; border-color: #ff4a4a;
  animation: 경고깜빡 .6s ease-in-out infinite;
}
@keyframes 경고깜빡 { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* 아래쪽 내 상태 */
.발막 {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 12px 10px; pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.상태칸 { display: flex; gap: 10px; align-items: center; max-width: 420px; }
.얼굴칸 {
  width: 50px; height: 50px; border-radius: 50%; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); border: 3px solid #3ddc84; flex-shrink: 0;
}
.바들 { flex: 1; }
.긴틀 {
  position: relative; height: 20px; margin-bottom: 5px;
  background: rgba(0,0,0,.7); border: 2px solid rgba(255,255,255,.25);
  border-radius: 11px; overflow: hidden;
}
.긴바 { height: 100%; width: 100%; transition: width .18s; }
.체력바 { background: linear-gradient(90deg, #ff4a5a, #ff9a3d); }
.기력바 { background: linear-gradient(90deg, #a05ae8, #d8a0ff); }
/* 🍖 배고픔 게이지 — 색은 자바스크립트가 바꿔줘요 */
.배고픔바 { background: linear-gradient(90deg, #ffb04a, #ff8a2a); }
/* 배가 많이 고프면 깜빡깜빡! */
.배고픔바.깜빡 { animation: 배고파 .7s ease-in-out infinite; }
@keyframes 배고파 { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* 🌅 며칠째인지 */
.정보딱.날짜 { color: #ffd34d; border-color: rgba(255,211,77,.5); }
.정보딱.날짜 b { color: #ffd34d; }
.긴글 {
  position: absolute; inset: 0; font-size: 13px; line-height: 16px;
  text-align: center; color: #fff; text-shadow: 0 1px 3px #000;
}
.아이템줄 { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.아이템딱 {
  font-size: 14px; padding: 3px 10px; border-radius: 10px;
  background: rgba(0,0,0,.6); border: 2px solid #ffd34d; color: #ffd34d;
}

/* ⚖️ 힘을 나눠줘서 약해졌을 때 */
.아이템딱.약함 {
  border-color: #b06aff; color: #d8a8ff;
  animation: 힘빠짐 1.2s ease-in-out infinite;
}
@keyframes 힘빠짐 { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* 킬 로그 */
.킬로그 {
  position: absolute; top: 46px; right: 10px;
  width: 245px; pointer-events: none;
  display: flex; flex-direction: column; gap: 4px;
}
.킬줄 {
  font-size: 14px; padding: 4px 10px; border-radius: 10px;
  background: rgba(0,0,0,.66); border-left: 4px solid #ff6a4a;
  color: #ffd8c8; animation: 스윽 .3s ease-out;
}
.킬줄.내킬 { border-left-color: #3ddc84; color: #c8ffd8; }
@keyframes 스윽 { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; } }

/* 큰 알림 */
.큰알림 {
  position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%);
  font-size: 44px; font-weight: bold; color: #ffd34d;
  text-shadow: 0 0 26px #000, 0 4px 0 #6b3a00;
  pointer-events: none; text-align: center; line-height: 1.3;
  animation: 알림뿅 .4s cubic-bezier(.3,1.7,.5,1);
}
@keyframes 알림뿅 { from { transform: translate(-50%,-50%) scale(.4); opacity: 0; } }

/* ===== 모바일 조작 ===== */
.모바일조작 {
  display: none; max-width: 900px; margin: 12px auto 0;
  justify-content: space-between; align-items: center; padding: 0 10px;
}
.조이스틱 {
  position: relative; width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 4px solid rgba(255,255,255,.25);
  touch-action: none;
}
.막대 {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,211,77,.75); border: 3px solid #fff;
}
.버튼묶음 { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; max-width: 190px; }
.둥근버튼 {
  width: 76px; height: 76px; border-radius: 50%;
  font-size: 32px; border: 4px solid rgba(255,255,255,.35);
  cursor: pointer; touch-action: none;
}
.둥근버튼.쏘기 { background: rgba(255,90,60,.7); }
.둥근버튼.스킬 { background: rgba(160,90,232,.7); }
.둥근버튼.대시 { background: rgba(60,220,140,.7); }

@media (max-width: 880px), (pointer: coarse) {
  .모바일조작 { display: flex; }
}

/* ===== 결과 ===== */
.치킨판 { text-align: center; font-size: 105px; animation: 치킨춤 1.2s ease-in-out infinite; }
@keyframes 치킨춤 {
  0%,100% { transform: scale(1) rotate(-6deg); }
  50% { transform: scale(1.18) rotate(6deg); }
}
.결과판 {
  max-width: 440px; margin: 18px auto;
  background: rgba(0,0,0,.45);
  border: 4px solid rgba(255,211,77,.5); border-radius: 24px;
  padding: 20px 28px;
}
.결과줄 { display: flex; justify-content: space-between; font-size: 20px; color: #cfe3ff; margin: 7px 0; }
.결과줄 b { color: #ffd34d; font-size: 24px; }
.레벨업알림 {
  max-width: 460px; margin: 0 auto 16px;
  text-align: center; font-size: 19px; color: #3ddc84; line-height: 1.6;
}

@media (max-width: 600px) {
  .큰제목 { font-size: 32px; }
  .고를판 { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .킬로그 { width: 165px; }
  .킬줄 { font-size: 12px; }
  .큰알림 { font-size: 30px; }
}
