/* ===== ⚔️ 올스타 배틀 꾸미기 ===== */

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

body {
  font-family: "Jua", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,90,60,.22), transparent 50%),
    radial-gradient(circle at 80% 85%, rgba(90,120,255,.22), transparent 50%),
    #0d1220;
  color: #fff;
  min-height: 100vh;
  padding: 66px 16px 40px;
}

.숨김 { 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,.55);
  border: 2px solid rgba(255,255,255,.3);
  color: #fff; text-decoration: none;
}
.돌아가기:hover { background: rgba(0,0,0,.8); }

/* ===== 공통 ===== */
.화면 { max-width: 1100px; margin: 0 auto; }

.큰제목 {
  text-align: center;
  font-size: 54px;
  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: 21px; color: #cfe3ff; margin: 8px 0 18px; }
.설명 b { color: #7ad8ff; }
.줄제목 { text-align: center; font-size: 26px; color: #ffd34d; margin: 26px 0 12px; }
.빈말 { text-align: center; font-size: 20px; color: #8fa4c0; padding: 30px; line-height: 1.7; }
.빈말 a { color: #7ad8ff; }

.큰버튼 {
  display: block; margin: 0 auto;
  font-family: inherit; font-size: 26px;
  padding: 14px 40px; border: none; border-radius: 22px;
  background: linear-gradient(160deg, #ff8a3d, #e8452a);
  color: #fff; cursor: pointer; text-decoration: none; text-align: center;
  box-shadow: 0 6px 0 #8e1c10, 0 0 26px rgba(255,90,40,.45);
  transition: .12s;
}
.큰버튼:hover { transform: translateY(-3px); }
.큰버튼:active { transform: translateY(4px); box-shadow: 0 2px 0 #8e1c10; }
.큰버튼:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.큰버튼.회색 {
  margin-top: 12px; font-size: 20px; padding: 11px 28px;
  background: linear-gradient(160deg, #6a7a90, #46536a);
  box-shadow: 0 6px 0 #29323f;
}
.작은버튼 {
  font-family: inherit; font-size: 16px;
  padding: 8px 18px; border-radius: 14px;
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  color: #fff; cursor: pointer;
}

/* ===== 난이도 ===== */
/* ===== 🎮 대결 방식 고르기 ===== */
.방식줄 {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin: 10px 0 18px;
}
.방식 {
  font-family: inherit; font-size: 20px; font-weight: bold;
  padding: 14px 26px; border-radius: 18px; cursor: pointer;
  border: 4px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #cfe0f5;
  line-height: 1.4; transition: .15s;
}
.방식:hover { transform: translateY(-3px); }
.방식 .잔설명 { font-size: 14px; font-weight: normal; opacity: .8; }
.방식.고름 {
  background: linear-gradient(#ffd34d, #ff9a3d);
  border-color: #fff; color: #3a2a00;
  box-shadow: 0 0 22px rgba(255,211,77,.6);
}

/* ===== ⚡ 실시간 게이지 ===== */
.게이지바 { background: linear-gradient(90deg, #7ad8ff, #4a8aff); }
.투사.준비됨 {
  animation: 준비반짝 .7s ease-in-out infinite;
}
@keyframes 준비반짝 {
  0%,100% { box-shadow: 0 0 10px var(--등급색); }
  50% { box-shadow: 0 0 28px #ffd34d, 0 0 44px #ffd34d; }
}
.멈춤버튼 {
  cursor: pointer; border: 3px solid #ffd34d;
  background: rgba(255,211,77,.15); color: #ffd34d;
  font-family: inherit; font-weight: bold;
}

.난이도줄 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.난이도 {
  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(255,211,77,.45);
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 18px;
}
.내팀칸 h3 { text-align: center; font-size: 24px; color: #ffd34d; margin-bottom: 12px; }
.내팀슬롯 { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.슬롯 {
  width: 120px; height: 150px;
  border: 4px dashed rgba(255,255,255,.28);
  border-radius: 20px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 40px; color: rgba(255,255,255,.3);
  cursor: pointer; transition: .14s;
}
.슬롯.채움 {
  border-style: solid;
  border-color: var(--등급색);
  background: linear-gradient(165deg, rgba(255,255,255,.12), rgba(0,0,0,.3));
  box-shadow: 0 0 22px var(--등급색);
}
.슬롯.채움:hover { transform: translateY(-4px); }
.슬롯 .얼굴 {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--옷색); font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid rgba(255,255,255,.35);
}
.슬롯 .이름 { font-size: 16px; margin-top: 6px; color: #fff; }
.슬롯 .레벨 { font-size: 13px; color: #ffd34d; }

/* ===== 고를 판 ===== */
.고를판 {
  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: 62px; height: 62px; margin: 0 auto 6px;
  border-radius: 50%; font-size: 32px;
  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;
}

/* ===== 전투 ===== */
.턴표시 { text-align: center; margin-bottom: 12px; }
#턴글 { font-size: 34px; color: #ffd34d; }
.작은딱지 {
  font-size: 15px; margin-left: 10px;
  padding: 4px 12px; border-radius: 12px;
  background: rgba(0,0,0,.45);
  border: 2px solid rgba(255,255,255,.25);
  color: #cfe3ff;
}

.편 { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }

.투사 {
  position: relative;
  width: 150px;
  background: linear-gradient(170deg, rgba(255,255,255,.1), rgba(0,0,0,.4));
  border: 4px solid var(--등급색);
  border-radius: 20px;
  padding: 10px 8px;
  text-align: center;
  transition: .2s;
}
.적편 .투사 { border-top-width: 8px; }
.내편 .투사 { border-bottom-width: 8px; }

.투사.차례 {
  outline: 4px solid #3ddc84; outline-offset: 3px;
  box-shadow: 0 0 30px #3ddc84;
  transform: translateY(-8px);
}
.투사.죽음 { filter: grayscale(1) brightness(.4); opacity: .55; }
.투사.맞음 { animation: 흔들림 .35s; }
@keyframes 흔들림 {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-12px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-7px); }
  80% { transform: translateX(5px); }
}
.투사 .얼굴 {
  width: 66px; height: 66px; margin: 0 auto 6px;
  border-radius: 50%; font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--옷색);
  border: 3px solid rgba(255,255,255,.35);
}
.투사 h4 { font-size: 17px; }
.투사 .잔글 { font-size: 12px; color: #b8c8e0; }

.작은틀 {
  height: 14px; margin-top: 5px;
  background: rgba(0,0,0,.65);
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 9px; overflow: hidden;
  position: relative;
}
.작은바 { height: 100%; transition: width .35s; }
.체력바 { background: linear-gradient(90deg, #ff4a5a, #ff9a3d); }
.기력바 { background: linear-gradient(90deg, #3da5ff, #7ad8ff); }
.작은글씨 {
  position: absolute; inset: 0;
  font-size: 11px; line-height: 10px;
  color: #fff; text-shadow: 0 1px 2px #000;
}

/* 튀는 숫자 */
.튀는글 {
  position: absolute; left: 50%; top: 20px;
  transform: translateX(-50%);
  font-size: 30px; font-weight: bold;
  pointer-events: none;
  animation: 튀기 1s ease-out forwards;
  text-shadow: 0 2px 6px #000;
}
@keyframes 튀기 {
  0% { transform: translate(-50%, 0) scale(.5); opacity: 0; }
  25% { transform: translate(-50%, -26px) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -66px) scale(1); opacity: 0; }
}
.튀는글.피해 { color: #ff6a6a; }
.튀는글.회복 { color: #3ddc84; }
.튀는글.약점 { color: #ffd34d; }

/* ===== 싸움 글판 ===== */
.싸움글판 {
  max-width: 700px; margin: 10px auto;
  min-height: 74px;
  background: rgba(0,0,0,.5);
  border: 3px solid rgba(122,216,255,.4);
  border-radius: 18px;
  padding: 12px 18px;
  font-size: 19px; color: #dbe9ff;
  line-height: 1.55;
  overflow-y: auto; max-height: 130px;
}
.싸움글판 .줄 { animation: 스윽 .25s ease-out; }
@keyframes 스윽 { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
.싸움글판 .중요 { color: #ffd34d; }
.싸움글판 .위험 { color: #ff8a8a; }

/* ===== 행동칸 ===== */
.행동칸 {
  max-width: 700px; margin: 16px auto 0;
  background: rgba(0,0,0,.42);
  border: 4px solid rgba(255,211,77,.4);
  border-radius: 24px;
  padding: 14px;
  text-align: center;
}
.누구차례 { font-size: 21px; color: #3ddc84; margin-bottom: 10px; }
.행동버튼줄 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.행동버튼 {
  font-family: inherit; font-size: 20px;
  padding: 13px 24px; border: none; border-radius: 18px;
  color: #fff; cursor: pointer; transition: .12s;
  box-shadow: 0 5px 0 rgba(0,0,0,.5);
}
.행동버튼:hover { transform: translateY(-3px); }
.행동버튼:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.5); }
.행동버튼:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.행동버튼.공격 { background: linear-gradient(160deg, #ff7a5a, #d8302a); }
.행동버튼.스킬 { background: linear-gradient(160deg, #b86aff, #7a2ad8); }
.행동버튼.방어 { background: linear-gradient(160deg, #5aa8ff, #2a6ac8); }

.고를적줄 { margin-top: 14px; }
.고를적줄 .안내 { font-size: 18px; color: #ffd34d; }
.적버튼판 { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.적버튼 {
  font-family: inherit; font-size: 17px;
  padding: 9px 16px; border-radius: 14px;
  border: 3px solid var(--등급색);
  background: rgba(0,0,0,.4);
  color: #fff; cursor: pointer;
}
.적버튼:hover { background: var(--등급색); color: #111; }

/* ===== 결과 ===== */
.결과판 {
  max-width: 420px; margin: 20px auto;
  background: rgba(0,0,0,.45);
  border: 4px solid rgba(255,211,77,.5);
  border-radius: 24px;
  padding: 20px 30px;
}
.결과줄 { display: flex; justify-content: space-between; font-size: 22px; color: #cfe3ff; margin: 8px 0; }
.결과줄 b { color: #ffd34d; font-size: 26px; }
.레벨업알림 {
  max-width: 460px; margin: 0 auto 18px;
  text-align: center; font-size: 19px; color: #3ddc84;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .큰제목 { font-size: 34px; }
  .투사 { width: 108px; }
  .투사 .얼굴 { width: 50px; height: 50px; font-size: 26px; }
  .고를판 { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}
