/* ---- style.css 전역 button 스타일 override ---- */
.ta-boss-tab,
.ta-more-btn,
.ta-search-clear {
  background: var(--panel2) !important;
  color: #60607a !important;
}
.ta-boss-tab.active {
  background: rgba(74,222,128,0.1) !important;
  color: var(--primary) !important;
}
.ta-more-btn:hover {
  background: rgba(74,222,128,0.04) !important;
  color: var(--primary) !important;
}
.ta-search-clear:hover {
  background: none !important;
  color: var(--text) !important;
}
.ta-action-btn.edit {
  background: #14532d !important;
  color: #fff !important;
}
.ta-action-btn.delete {
  background: #7f1d1d !important;
  color: #fff !important;
}

/* =============================================
   보스 타임어택 - 전용 스타일 (v5 통합)
   ============================================= */

/* ---- 헤더 ---- */
.ta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.ta-header-left { display: flex; align-items: center; gap: 12px; }
.ta-icon { font-size: 28px; filter: drop-shadow(0 0 8px rgba(74,222,128,0.4)); }
.ta-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #4ade80, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}
.ta-subtitle { font-size: 12px; color: #8080a0; margin: 2px 0 0; }

.ta-submit-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #000;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.ta-submit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(34,197,94,0.3);
}

/* ---- 검색바 ---- */
.ta-search-wrap {
  display: flex;
  align-items: center;
  background: var(--panel2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  gap: 8px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.ta-search-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(74,222,128,0.1);
}
.ta-search-icon { font-size: 13px; color: #404055; flex-shrink: 0; }
.ta-search-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
  padding: 10px 0;
}
.ta-search-wrap input::placeholder { color: #606080; }
.ta-search-clear {
  background: none;
  border: none;
  color: #a0a0b8;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  transition: color 0.15s;
  transform: none;
}
.ta-search-clear:hover { color: var(--text); filter: none; transform: none; }
.ta-search-clear.hidden { display: none; }

/* ---- 보스 필터 ---- */
.ta-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
  flex-wrap: wrap;
}
.ta-boss-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ta-boss-tab {
  padding: 6px 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: #a0a0b8;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  transition: all 0.15s;
  transform: none;
}
.ta-boss-tab:hover { color: #d0d0e0; border-color: var(--border2); filter: none; transform: none; }
.ta-boss-tab.active {
  background: rgba(74,222,128,0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 8px rgba(74,222,128,0.15);
}

/* ---- 목록 ---- */
.ta-list { display: flex; flex-direction: column; gap: 8px; }
.ta-list.hidden { display: none; }

/* ---- 기록 카드 ---- */
.ta-record {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.ta-record::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--border2);
  transition: background 0.18s;
}
.ta-record:hover {
  border-color: var(--border2);
  background: rgba(255,255,255,0.04);
  transform: translateX(2px);
}
.ta-record:hover::before { background: var(--primary); }
.ta-record:hover { box-shadow: none; filter: none; }

/* 1위 강조 */
.ta-record.is-first {
  border-color: rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.04);
}
.ta-record.is-first::before { background: var(--gold); }
.ta-record.is-first:hover { border-color: rgba(245,158,11,0.6); }

.ta-record-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ta-record-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ta-record-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* 순위 */
.ta-rank {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #c0c0d8;
  min-width: 34px;
  letter-spacing: 0.5px;
}
.ta-rank.gold { color: var(--gold); font-size: 16px; }

/* 시간 */
.ta-time {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.ta-record.is-first .ta-time { color: var(--gold); }

/* 보스 뱃지 */
.ta-boss-badge {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border2);
  color: #b0b0cc;
  font-weight: 600;
}

/* 영상 */
.ta-video-link {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.25);
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.15s;
  white-space: nowrap;
}
.ta-video-link:hover {
  background: rgba(74,222,128,0.15);
  border-color: var(--primary);
}

.ta-novideo { font-size: 12px; color: #7878a0; }
.ta-date    { font-size: 12px; color: #7878a0; white-space: nowrap; }

/* 파티 */
.ta-party {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.ta-record-title { margin-top: 6px; font-size: 13px; color: #c8c8dc; font-weight: 500; }

/* ---- 캐릭터 아이콘 ---- */
.char-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border2);
  cursor: default;
}
.char-icon img { display: block; object-fit: cover; object-position: top center; }
.char-icon.size-sm img { width: 68px; height: 68px; }
.char-name {
  width: 100%;
  text-align: center;
  font-size: 10px;
  color: #111;
  background: #fff;
  padding: 2px 2px 0;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 3px solid var(--rank-color, #555);
}
.char-icon-text {
  background: var(--panel2);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #9090a8;
  border: 1px solid var(--border);
}

/* ---- 상세 카드 ---- */
.ta-detail-record {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
}

/* ---- 더보기 ---- */
.ta-more-btn {
  width: 100%;
  margin-top: 4px;
  padding: 11px;
  background: transparent;
  border: 1px dashed var(--border2);
  border-radius: var(--radius-sm);
  color: #9090b0;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  transition: all 0.15s;
  transform: none;
}
.ta-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(74,222,128,0.04);
  filter: none;
  transform: none;
}

/* ---- 빈 상태 ---- */
.ta-empty {
  text-align: center;
  padding: 50px 20px;
  color: #60607a;
}
.ta-empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.4; }
.ta-empty-msg  { font-size: 13px; line-height: 1.6; }

/* ---- 토스트 ---- */
.ta-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: #000;
  padding: 11px 22px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}
.ta-toast.hidden { display: none; }
.ta-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 제출 폼 ---- */
.ta-form { display: flex; flex-direction: column; gap: 6px; }
.ta-label { font-size: 13px; color: #b8b8cc; font-weight: 700; margin-top: 10px; }
.ta-req { color: var(--red); }
.ta-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  transition: border-color 0.2s;
  outline: none;
}
.ta-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(74,222,128,0.1); }
.ta-input::placeholder { color: #606080; }
select.ta-input option { background: #1a1a22; color: var(--text); }
select.ta-input optgroup { background: #111118; color: #9090b8; font-size: 11px; }

.ta-optional-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.ta-optional-header:hover { background: rgba(255,255,255,0.03); }
.ta-optional-body {
  display: none;
  padding: 8px 0 4px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
  margin-left: 2px;
}
.ta-optional-body.open { display: block; }

/* ---- 장비 그리드 (제출) ---- */
.ta-equip-section { margin-top: 6px; }
.ta-equip-slot-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.ta-equip-slot-labels span {
  text-align: center;
  font-size: 12px;
  color: #9090b8;
  background: rgba(0,0,0,0.2);
  padding: 4px 0;
  border-radius: 4px;
}
.ta-equip-grid { display: flex; flex-direction: column; gap: 10px; }
.ta-equip-row-wrap { display: flex; flex-direction: column; gap: 4px; }
.ta-equip-row  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-items: start; }
.ta-equip-member-label { grid-column: 1 / -1; font-size: 12px; color: #8080a0; margin: 6px 0 2px; }
.ta-equip-cell { display: flex; flex-direction: column; gap: 3px; }
.ta-equip-cell select {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a22;
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  cursor: pointer;
  -webkit-appearance: auto;
  appearance: auto;
}
.ta-equip-cell select option {
  background: #1a1a22;
  color: var(--text);
}
.ta-equip-cell select:focus { border-color: var(--primary); }
.ta-equip-preview {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
}
.ta-equip-preview img {
  width: 22px; height: 22px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border2);
}
.ta-equip-preview span { font-size: 10px; color: #8888a8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 상세 페이지 장비 ---- */
.eq-header-row {
  display: grid;
  grid-template-columns: 70px repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.eq-header-spacer {}
.eq-slot-title {
  text-align: center;
  font-size: 12px;
  color: #9090a8;
  background: rgba(0,0,0,0.2);
  padding: 6px 0;
  border-radius: 4px;
  font-weight: 700;
}
.eq-table { display: flex; flex-direction: column; gap: 8px; }
.eq-row { display: grid; grid-template-columns: 70px repeat(4, 1fr); gap: 8px; align-items: center; }
.eq-member-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-align: right;
  padding-right: 8px;
  font-family: 'Noto Sans KR', sans-serif;
}
.eq-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  min-height: 100px;
  justify-content: center;
}
.eq-cell.eq-empty { opacity: 0.25; }
.eq-cell.eq-empty span { font-size: 12px; color: #60607a; }
.eq-img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border2); }
.eq-name { font-size: 11px; color: #b0b0c8; text-align: center; line-height: 1.4; word-break: keep-all; overflow-wrap: break-word; max-width: 100%; }

/* ---- 상세 액션 버튼 ---- */
.ta-detail-actions { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }
.ta-action-btn {
  border: 0;
  color: #fff;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  transform: none;
}
.ta-action-btn.edit   { background: #14532d; }
.ta-action-btn.edit:hover   { background: #166534; filter: none; transform: none; }
.ta-action-btn.delete { background: #7f1d1d; }
.ta-action-btn.delete:hover { background: #991b1b; filter: none; transform: none; }

/* 상세 공통 */
.party-detail {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: flex-start;
}
.char-card {
  display: flex; flex-direction: column; align-items: center;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border2); cursor: default; flex-shrink: 0;
}
.char-card img { width: 150px; height: 210px; display: block; object-fit: cover; object-position: top center; }
.char-card .card-name {
  width: 100%; text-align: center; font-size: 12px; font-weight: bold;
  color: #111; background: #fff; padding: 4px 3px 2px;
  box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-bottom: 4px solid var(--rank-color, #555);
}
a.video { color: var(--primary); text-decoration: none; font-weight: bold; }
a.video:hover { text-decoration: underline; }
.novideo { color: #60607a; }
.equip-detail-section { margin-top: 20px; }
.equip-detail-section > b { display: block; margin-bottom: 8px; color: #9090a8; font-size: 13px; }
