/* ===== 🌟 올스타 도감 꾸미기 ===== */

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

body {
  font-family: "Jua", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(160,90,232,.28), transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(255,180,60,.22), transparent 50%),
    radial-gradient(circle at 50% 95%, rgba(60,180,255,.22), transparent 55%),
    #0e1424;
  color: #fff;
  min-height: 100vh;
  padding: 70px 18px 60px;
}

.숨김 { display: none !important; }

/* ===== 돌아가기 ===== */
.돌아가기 {
  position: fixed; top: 12px; left: 14px; z-index: 50;
  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); }

/* ===== 싸우러 가기 ===== */
.싸우러 {
  position: fixed; top: 12px; right: 14px; z-index: 50;
  font-size: 19px; padding: 9px 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, #ff8a3d, #e8452a);
  border: 3px solid #ffd8a8;
  color: #fff; text-decoration: none; font-weight: bold;
  box-shadow: 0 5px 0 #8e1c10, 0 0 22px rgba(255,90,40,.5);
}
.싸우러:hover { transform: translateY(-3px); }
.싸우러.로얄 {
  top: 60px;
  background: linear-gradient(160deg, #ffb020, #e8722a);
  border-color: #fff3c4; color: #2a1400;
  box-shadow: 0 5px 0 #8e4210, 0 0 22px rgba(255,150,40,.5);
}
/* 🏰 올스타 롤 — 파란 버튼 */
.싸우러.롤 {
  top: 108px;
  background: linear-gradient(160deg, #4a9aff, #2a5ad8);
  border-color: #c4e4ff; color: #fff;
  box-shadow: 0 5px 0 #1a3a8e, 0 0 22px rgba(60,150,255,.5);
}

/* ===== 머리 ===== */
.머리 { text-align: center; margin-bottom: 20px; }
.머리 h1 {
  font-size: 56px;
  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); } }
.설명 { font-size: 21px; color: #cfe3ff; margin-top: 6px; }
.설명 b { color: #7ad8ff; }

/* ===== 지갑 ===== */
.지갑 { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.돈 {
  font-size: 22px;
  padding: 8px 22px;
  border-radius: 16px;
  background: rgba(0,0,0,.45);
  border: 3px solid rgba(255,255,255,.2);
}
.돈.보석 { border-color: rgba(122,216,255,.6); }
.돈.보석 b { color: #7ad8ff; }
.돈.조각 { border-color: rgba(255,211,77,.6); }
.돈.조각 b { color: #ffd34d; }

/* ===== 탭 ===== */
.탭줄 {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 22px;
}
.탭 {
  font-family: inherit; font-size: 20px;
  padding: 11px 24px;
  border: 3px solid rgba(255,255,255,.22);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  color: #fff; cursor: pointer; transition: .15s;
}
.탭:hover { transform: translateY(-3px); background: rgba(255,255,255,.16); }
.탭.고름 {
  background: linear-gradient(160deg, #a05ae8, #6a2ab8);
  border-color: #e0b8ff;
  box-shadow: 0 0 22px rgba(160,90,232,.65);
}

/* ===== 거르개 ===== */
.거르개 {
  max-width: 1100px; margin: 0 auto 22px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
#검색창 {
  font-family: inherit; font-size: 20px;
  width: min(420px, 90%);
  padding: 12px 20px;
  border-radius: 18px;
  border: 3px solid rgba(122,216,255,.45);
  background: rgba(0,0,0,.45);
  color: #fff; outline: none;
}
#검색창::placeholder { color: #8fa4c0; }
#검색창:focus { border-color: #7ad8ff; box-shadow: 0 0 18px rgba(122,216,255,.4); }

.칩줄 { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.칩 {
  font-family: inherit; font-size: 17px;
  padding: 7px 16px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.07);
  color: #fff; cursor: pointer; transition: .12s;
}
.칩:hover { transform: translateY(-2px); }
.칩.고름 { background: var(--칩색, #ffd34d); color: #1a1400; border-color: #fff; font-weight: bold; }

/* ===== 카드판 ===== */
.카드판 {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.카드 {
  position: relative;
  background: linear-gradient(165deg, rgba(255,255,255,.12), rgba(0,0,0,.35));
  border: 4px solid var(--등급색, #888);
  border-radius: 22px;
  padding: 16px 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: .16s;
  overflow: hidden;
}
.카드::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--등급색), transparent 65%);
  opacity: .2; pointer-events: none;
}
.카드:hover { transform: translateY(-7px) scale(1.03); box-shadow: 0 10px 30px var(--등급색); }

.카드 .번호 {
  position: absolute; top: 8px; left: 10px;
  font-size: 13px; color: rgba(255,255,255,.5);
}
.카드 .유형딱 {
  position: absolute; top: 8px; right: 10px;
  font-size: 18px;
}
.카드 .얼굴 {
  width: 84px; height: 84px; margin: 6px auto 8px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  background: var(--옷색, #333);
  border: 4px solid rgba(255,255,255,.35);
  box-shadow: 0 0 22px var(--등급색);
}
.카드 h3 { font-size: 22px; margin-bottom: 2px; }
.카드 .별명 { font-size: 13px; color: #b8c8e0; min-height: 30px; }
.카드 .별 { font-size: 17px; color: var(--등급색); margin: 4px 0; letter-spacing: 1px; }
.카드 .출신 {
  font-size: 12px; color: #8fa4c0;
  background: rgba(0,0,0,.35);
  border-radius: 10px; padding: 3px 8px;
  display: inline-block;
}
.카드 .보유 {
  position: absolute; bottom: 8px; right: 10px;
  font-size: 13px; color: #ffd34d;
  background: rgba(0,0,0,.5);
  border-radius: 10px; padding: 2px 8px;
}
/* ===== 🤫 시크릿 등급 특별 반짝임 ===== */
.카드[data-등급="시크릿"],
.결과카드[data-등급="시크릿"],
.자세히판[data-등급="시크릿"] {
  animation: 무지개테 2.4s linear infinite;
}
@keyframes 무지개테 {
  0%   { border-color: #00ffd0; box-shadow: 0 0 26px #00ffd0; }
  25%  { border-color: #7ad8ff; box-shadow: 0 0 30px #7ad8ff; }
  50%  { border-color: #ff4af0; box-shadow: 0 0 30px #ff4af0; }
  75%  { border-color: #ffd34d; box-shadow: 0 0 30px #ffd34d; }
  100% { border-color: #00ffd0; box-shadow: 0 0 26px #00ffd0; }
}
.카드[data-등급="시크릿"] .얼굴,
.결과카드[data-등급="시크릿"] .얼굴,
.자세히판[data-등급="시크릿"] .큰얼굴 {
  animation: 반짝돌기 3s linear infinite;
}
@keyframes 반짝돌기 {
  0%,100% { filter: drop-shadow(0 0 10px #00ffd0); }
  33% { filter: drop-shadow(0 0 16px #ff4af0); }
  66% { filter: drop-shadow(0 0 16px #ffd34d); }
}
.카드[data-등급="시크릿"]::after {
  content: "🤫"; position: absolute;
  bottom: 8px; left: 10px; font-size: 18px;
  animation: 둥실 1.8s ease-in-out infinite;
}

.카드.안가짐 { filter: grayscale(.85) brightness(.6); }
.카드.안가짐:hover { filter: grayscale(.4) brightness(.85); }

/* ===== 뽑기 ===== */
.뽑기판 {
  max-width: 620px; margin: 0 auto;
  background: rgba(0,0,0,.4);
  border: 4px solid rgba(255,211,77,.4);
  border-radius: 26px;
  padding: 26px;
  text-align: center;
}
.뽑기상자 {
  font-size: 90px;
  animation: 흔들 1.6s ease-in-out infinite;
  cursor: pointer;
}
@keyframes 흔들 {
  0%,100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(6deg) scale(1.07); }
}
.뽑기판 h2 { font-size: 34px; color: #ffd34d; margin: 6px 0 10px; }
.뽑기설명 { font-size: 18px; color: #cfe3ff; line-height: 1.6; }
.에픽글 { color: #c88aff; }

.확률표 {
  display: flex; gap: 6px; justify-content: center;
  flex-wrap: wrap; margin: 16px 0;
}
.확률칸 {
  font-size: 15px; padding: 6px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.4);
  border: 2px solid var(--등급색);
  color: var(--등급색);
}

.뽑기버튼줄 { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.큰버튼 {
  font-family: inherit; font-size: 22px;
  padding: 14px 28px;
  border: none; border-radius: 20px;
  background: linear-gradient(160deg, #7ad8ff, #2a7ac8);
  color: #05203a; font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 0 #14496e;
  transition: .12s;
}
.큰버튼:hover { transform: translateY(-3px); }
.큰버튼:active { transform: translateY(4px); box-shadow: 0 2px 0 #14496e; }
.큰버튼.금색 {
  background: linear-gradient(160deg, #ffd34d, #ff9a20);
  box-shadow: 0 6px 0 #8a5000; color: #3a2000;
}
.작은버튼 {
  margin-top: 14px;
  font-family: inherit; font-size: 16px;
  padding: 9px 20px;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  color: #cfe3ff; cursor: pointer;
}
.작은버튼:hover { background: rgba(255,255,255,.18); }

/* ===== 🔐 비밀 코드 ===== */
.비밀칸 {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px dashed rgba(255,255,255,.2);
}
.비밀칸 h3 { font-size: 22px; color: #c88aff; }
.비밀설명 { font-size: 15px; color: #8fa4c0; margin: 4px 0 10px; }
.비밀줄 { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#비밀입력 {
  font-family: inherit; font-size: 18px;
  padding: 10px 18px; width: min(260px, 70%);
  border-radius: 14px;
  border: 3px solid rgba(200,138,255,.5);
  background: rgba(0,0,0,.45);
  color: #fff; outline: none; text-align: center;
}
#비밀입력:focus { border-color: #c88aff; box-shadow: 0 0 16px rgba(200,138,255,.4); }
.비밀말 { margin-top: 10px; font-size: 17px; min-height: 24px; }
.비밀말.성공 { color: #3ddc84; }
.비밀말.실패 { color: #ff8a8a; }

.뽑기결과 {
  max-width: 1000px; margin: 26px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.결과카드 {
  background: rgba(0,0,0,.45);
  border: 4px solid var(--등급색);
  border-radius: 20px;
  padding: 14px 8px;
  text-align: center;
  animation: 뿅 .45s cubic-bezier(.3,1.6,.5,1) backwards;
  box-shadow: 0 0 26px var(--등급색);
}
@keyframes 뿅 {
  from { transform: scale(0) rotate(-25deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.결과카드 .얼굴 {
  width: 66px; height: 66px; margin: 0 auto 6px;
  border-radius: 50%; font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--옷색, #333);
  border: 3px solid rgba(255,255,255,.4);
}
.결과카드 h4 { font-size: 18px; }
.결과카드 .별 { color: var(--등급색); font-size: 15px; }
.결과카드 .새것 {
  display: inline-block; margin-top: 4px;
  font-size: 12px; padding: 2px 10px;
  border-radius: 10px;
  background: #ff4a8a; color: #fff;
}
.결과카드 .중복 {
  display: inline-block; margin-top: 4px;
  font-size: 12px; padding: 2px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.18); color: #ffd34d;
}

/* ===== 자세히 보기 ===== */
.덮개 {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.78);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.자세히판 {
  max-width: 520px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  background: linear-gradient(170deg, #1b2440, #0e1424);
  border: 5px solid var(--등급색, #888);
  border-radius: 28px;
  padding: 26px;
  text-align: center;
  animation: 뿅 .3s ease-out;
  box-shadow: 0 0 60px var(--등급색);
}
.자세히판 .큰얼굴 {
  width: 130px; height: 130px; margin: 0 auto 12px;
  border-radius: 50%; font-size: 70px;
  display: flex; align-items: center; justify-content: center;
  background: var(--옷색);
  border: 6px solid rgba(255,255,255,.35);
  box-shadow: 0 0 40px var(--등급색);
}
.자세히판 h2 { font-size: 36px; }
.자세히판 .별명 { font-size: 17px; color: #b8c8e0; margin-bottom: 6px; }
.자세히판 .딱지줄 { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0 16px; }
.딱지 {
  font-size: 16px; padding: 5px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.4);
  border: 2px solid rgba(255,255,255,.25);
}

.래벨줄 { margin: 12px 0; }
.래벨글 { font-size: 22px; color: #ffd34d; }
.경험틀 {
  height: 16px; background: rgba(0,0,0,.6);
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 10px; overflow: hidden; margin-top: 6px;
}
.경험바 { height: 100%; background: linear-gradient(90deg, #3ddc84, #7ad8ff); }

.능력표 { margin: 14px 0; text-align: left; }
.능력줄 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.능력이름 { width: 78px; font-size: 17px; color: #cfe3ff; }
.능력틀 {
  flex: 1; height: 20px;
  background: rgba(0,0,0,.6);
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 10px; overflow: hidden;
}
.능력바 { height: 100%; border-radius: 8px; transition: width .4s; }
.능력값 { width: 54px; text-align: right; font-size: 18px; color: #ffd34d; }

.스킬판 {
  background: rgba(160,90,232,.2);
  border: 3px solid rgba(200,138,255,.5);
  border-radius: 18px;
  padding: 14px;
  margin: 14px 0;
  text-align: left;
}
.스킬판 .스킬머리 { font-size: 20px; color: #e0b8ff; }
.스킬판 .스킬설명 { font-size: 16px; color: #dbe9ff; margin-top: 6px; line-height: 1.5; }
.스킬판 .소모 { font-size: 15px; color: #7ad8ff; margin-top: 6px; }

.대사판 {
  font-size: 18px; color: #ffe8a8;
  background: rgba(0,0,0,.4);
  border-left: 5px solid #ffd34d;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 12px 0;
  text-align: left;
}

.레벨업버튼 {
  font-family: inherit; font-size: 20px;
  padding: 12px 26px; border: none; border-radius: 18px;
  background: linear-gradient(160deg, #3ddc84, #1a9a5a);
  color: #032a16; font-weight: bold; cursor: pointer;
  box-shadow: 0 5px 0 #0d5a33;
}
.레벨업버튼:hover { transform: translateY(-2px); }
.레벨업버튼:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.닫기버튼 {
  font-family: inherit; font-size: 18px;
  padding: 10px 24px; margin-top: 10px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  color: #fff; cursor: pointer;
}

/* ===== 유형표 ===== */
.유형설명 {
  max-width: 900px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.유형카드 {
  background: rgba(0,0,0,.4);
  border: 4px solid var(--유형색);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
}
.유형카드 .큰이모지 { font-size: 46px; }
.유형카드 h3 { font-size: 26px; color: var(--유형색); }
.유형카드 p { font-size: 16px; color: #cfe3ff; margin-top: 8px; line-height: 1.6; }

.빈말 { text-align: center; font-size: 22px; color: #8fa4c0; padding: 40px; }

@media (max-width: 600px) {
  .머리 h1 { font-size: 36px; }
  .카드판 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
