/* overwatch-tier/assets/css/tier.css - OW2 Tier Maker 2026 Full */
:root {
  --tier-s: #FF3B30;
  --tier-a: #FF8C00;
  --tier-b: #FFD60A;
  --tier-c: #7ED321;
  --tier-d: #8E8E93;
  --bg: #0a0a0a;
  --card: #151515;
  --card-hover: #1e1e1e;
  --border: rgba(255,255,255,0.08);
}

.ow2-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px;
  background: var(--bg);
  color: #fff;
  font-family: 'Geist', 'Pretendard', system-ui, sans-serif;
  border-radius: 20px;
}

.ow2-wrap h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
}
.ow2-wrap h1 span {
  color: var(--tier-a);
}

/* 프리셋 버튼 */
.ow2-preset-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ow2-preset-btns button {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #1c1c1e;
  border: 1px solid var(--border);
  color: #aaa;
  cursor: pointer;
  transition: all .2s;
}
.ow2-preset-btns button:hover,
.ow2-preset-btns button.active {
  background: #ff7a00;
  color: #000;
  border-color: #ff7a00;
  box-shadow: 0 0 20px rgba(255,122,0,0.4);
}
#ow2-reset {
  margin-left: auto;
  background: #222;
  color: #888;
}

/* 티어 행 */
#ow2-tiers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-row {
  display: grid;
  grid-template-columns: 84px 1fr 48px;
  min-height: 86px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(255,255,255,0.02), transparent);
  transition: border-color .2s;
}
.tier-row.drag-over-row {
  border-color: #ff7a00;
}

.tier-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 900;
  color: #000;
}
.tier-label span { font-size: 22px; line-height: 1; }
.tier-label small { font-size: 9px; font-weight: 700; opacity: .7; letter-spacing: .5px; }

.tier-S .tier-label { background: var(--tier-s); }
.tier-A .tier-label { background: var(--tier-a); }
.tier-B .tier-label { background: var(--tier-b); }
.tier-C .tier-label { background: var(--tier-c); }
.tier-D .tier-label { background: var(--tier-d); color: #fff; }

.tier-dropzone {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  align-items: center;
  min-height: 86px;
  background: rgba(255,255,255,0.015);
  transition: all .2s;
}
.tier-dropzone.drag-over {
  background: rgba(255,122,0,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,122,0,0.3);
}
.tier-dropzone:empty::after {
  content: '여기로 드래그';
  font-size: 11px;
  color: rgba(255,255,255,0.18);
}

.tier-count {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.3);
  border-left: 1px solid var(--border);
}

/* 히어로 카드 */
.hero-card {
  position: relative;
  width: 74px;
  height: 92px;
  border-radius: 12px;
  background: var(--card);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 6px;
  cursor: grab;
  user-select: none;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.hero-card:active { cursor: grabbing; transform: scale(0.95); }
.hero-card:hover { background: var(--card-hover); transform: translateY(-2px) scale(1.03); }
.hero-card.dragging { opacity: 0.4; transform: scale(0.9); }

.hero-card.role-tank { border-color: #4AA8FF; box-shadow: 0 0 10px rgba(74,168,255,0.2); }
.hero-card.role-damage { border-color: #FF6B6B; box-shadow: 0 0 10px rgba(255,107,107,0.15); }
.hero-card.role-support { border-color: #7ED321; box-shadow: 0 0 10px rgba(126,211,33,0.15); }

.hero-emoji { font-size: 14px; }
.hero-name {
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  max-width: 66px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-tier-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.hero-tier-dot.S { background: var(--tier-s); }
.hero-tier-dot.A { background: var(--tier-a); }
.hero-tier-dot.B { background: var(--tier-b); }
.hero-tier-dot.C { background: var(--tier-c); }
.hero-tier-dot.D { background: var(--tier-d); }

/* 툴팁 - 상성 표시 */
.hero-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 10px 12px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  pointer-events: none;
}
.hero-card:hover .hero-tooltip { display: block; }
.hero-tooltip strong { font-size: 12px; color: #fff; display: block; margin-bottom: 6px; }
.hero-tooltip .weak, .hero-tooltip .strong {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 3px;
}
.hero-tooltip .weak { color: #ff6b6b; }
.hero-tooltip .strong { color: #7ed321; }

/* 미배치 풀 */
#ow2-pool {
  margin-top: 18px;
  border-radius: 16px;
  background: #101010;
  border: 1px dashed rgba(255,255,255,0.12);
  padding: 12px;
}
.pool-header {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
#ow2-pool .hero-card {
  display: inline-flex;
  margin: 4px;
}

/* 반응형 */
@media (max-width: 768px) {
  .tier-row { grid-template-columns: 56px 1fr 32px; min-height: 72px; }
  .tier-label span { font-size: 18px; }
  .tier-label small { display: none; }
  .hero-card { width: 62px; height: 82px; }
  .hero-name { font-size: 10px; }
  .hero-tooltip {
    left: auto; right: 0; transform: none;
    width: 180px;
  }
}

/* 스크롤바 */
#ow2-tiers::-webkit-scrollbar { height: 6px; }
#ow2-tiers::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 10px; }

.hero-card img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15);
  background: #000;
}
.hero-card:hover img { border-color: #ff7a00; }