/* ==========================================================================
   검은사막 전서버 가문 & 캐릭터 OP.GG 검색기 스타일 (search_styles.css)
   ========================================================================== */

/* 1. 로그인 게이트 화면 검색 위젯 */
.gate-search-box {
  margin-top: 24px;
  padding: 20px 22px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  text-align: left;
}

.gate-search-head {
  margin-bottom: 14px;
}

.gate-search-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.gate-search-head h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 4px 0;
}

.gate-search-head p {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
}

.gate-search-form {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.gate-search-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
}

.gate-search-input {
  width: 100%;
  padding: 12px 76px 12px 40px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.gate-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  background: rgba(30, 41, 59, 1);
}

.btn-gate-search-btn {
  position: absolute;
  right: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gate-search-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.5);
}

.gate-search-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
  color: #64748b;
}

.gate-search-tags a {
  color: #94a3b8;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s ease;
}

.gate-search-tags a:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
}

/* 2. 대시보드 내부 메인 검색 섹션 (#tab-bdo-search) */
.bdo-search-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.bdo-search-hero {
  text-align: center;
  padding: 36px 20px 28px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  margin-bottom: 28px;
}

.bdo-search-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.bdo-search-hero-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}

.bdo-search-hero-sub {
  font-size: 0.92rem;
  color: #94a3b8;
  max-width: 620px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.bdo-search-bar-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
}

.search-bar-icon {
  position: absolute;
  left: 18px;
  color: #64748b;
  font-size: 1.15rem;
  pointer-events: none;
}

.main-bdo-search-input {
  width: 100%;
  padding: 16px 105px 16px 50px;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  color: #f8fafc;
  font-size: 1.02rem;
  font-weight: 600;
  outline: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.main-bdo-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  background: #0f172a;
}

.btn-main-search-submit {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-main-search-submit:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.6);
  transform: translateY(-1px);
}

.bdo-search-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
}

.quick-title {
  color: #94a3b8;
  font-weight: 700;
}

.btn-quick-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-tag:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* 3. 검색 안내 카드 & 결과 리스트 */
.bdo-search-guide-card {
  text-align: center;
  padding: 50px 24px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}

.guide-icon {
  font-size: 2.8rem;
  color: #38bdf8;
  margin-bottom: 14px;
}

.bdo-search-guide-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 8px 0;
}

.bdo-search-guide-card p {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 20px 0;
}

.guide-stats-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 0.82rem;
  color: #94a3b8;
}

.stat-pill strong {
  color: #f8fafc;
}

/* 4. 검색 결과 카드 그리드 */
.bdo-search-cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.bdo-result-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bdo-result-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.brc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.brc-family-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brc-family-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
}

.brc-match-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.brc-char-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 6px;
}

.brc-mid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.84rem;
}

.brc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #94a3b8;
}

.brc-guild-name {
  font-weight: 700;
  color: #f1f5f9;
}

.brc-main-char {
  color: #cbd5e1;
}

.brc-btn {
  width: 100%;
  padding: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.bdo-result-card:hover .brc-btn {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
}

/* 5. 가문 상세 프로필 팝업 모달 (#bdo-profile-modal) */
.bdo-prof-header {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.bph-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.bph-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bph-family {
  font-size: 1.6rem;
  font-weight: 900;
  color: #f8fafc;
}

.bph-guild-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  color: #f59e0b;
  font-size: 0.85rem;
  font-weight: 800;
}

.bph-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bph-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bph-info-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.bph-info-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #cbd5e1;
}

/* 레드카드 길드 등록 스펙 특별 카드 */
.bph-gear-highlight {
  margin-top: 14px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 프로필 내부 탭 (캐릭터 목록 / 길드 연혁 / 세탁 이력) */
.bdo-modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  padding-bottom: 2px;
}

.bdo-m-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 18px;
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bdo-m-tab-btn:hover {
  color: #f8fafc;
}

.bdo-m-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

/* 캐릭터 그리드 */
.chars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.char-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.char-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--class-color, #64748b);
}

.char-main-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 2px;
}

.char-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 6px;
}

.char-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
}

.char-class {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--class-color, #94a3b8);
}

.char-level {
  font-size: 0.85rem;
  font-weight: 800;
  color: #e2e8f0;
}

/* 길드 이적 타임라인 */
.guild-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 20px;
}

.guild-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #0f172a;
}

.timeline-item.ongoing .timeline-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.timeline-guild {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.timeline-ongoing-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #22c55e;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
}

.timeline-date {
  font-size: 0.82rem;
  color: #94a3b8;
}

/* 세탁/닉변 내역 */
.rename-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rename-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
}

.rename-clean {
  text-align: center;
  padding: 36px 16px;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
  border: 1px dashed rgba(34, 197, 94, 0.25);
  border-radius: 12px;
}

@media (max-width: 640px) {
  .bdo-search-hero-title {
    font-size: 1.4rem;
  }
  .main-bdo-search-input {
    padding-right: 90px;
    font-size: 0.92rem;
  }
  .btn-main-search-submit {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .chars-grid {
    grid-template-columns: 1fr;
  }
}
#bdo-profile-modal { z-index: 100000 !important; }

/* 인기 검색어 태그 및 관리자 삭제/추가 버튼 스타일 */
.quick-tag-item {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.15s ease;
}

.quick-tag-item:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.quick-tag-item .btn-quick-tag {
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-tag-item:hover .btn-quick-tag {
  color: #38bdf8;
}

.btn-tag-delete {
  background: rgba(239, 68, 68, 0.2);
  border: none;
  border-left: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-tag-delete:hover {
  background: #ef4444;
  color: #fff;
}

.btn-tag-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px dashed rgba(34, 197, 94, 0.4);
  border-radius: 8px;
  color: #22c55e;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tag-add:hover {
  background: rgba(34, 197, 94, 0.3);
  border-color: #22c55e;
  color: #4ade80;
}
