/* ===========================================
   기본
=========================================== */
body {
  font-family: Pretendard, sans-serif;
}

/* ===========================================
   상단 네비게이션
=========================================== */
header {
  backdrop-filter: blur(6px);
  background: rgba(13,17,23,0.92);
  border-bottom: 1px solid rgba(80,90,110,0.4);
}

header a:hover,
header button:hover {
  color: white;
  transition: 0.15s;
}

/* ===========================================
   검색창
=========================================== */
.main-search-input {
  background: #0f1218;
  border: 1.8px solid #30343f;
  border-radius: 12px;
  padding: 12px 16px;
  color: #dbe1ec;
  font-size: 15px;
  width: 260px;
  transition: all 0.25s ease;
}

.main-search-input:focus {
  width: 430px;
  border-color: #4ea9ff;
  background: #161b25;
  outline: none;
}

/* 검색 패널 */
.search-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 430px;
  padding: 12px;
  background: #0f131a;
  border: 1px solid #2f3542;
  z-index: 9000;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.18s;
}

.search-panel.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(6px);
}

.panel-title {
  font-size: 13px;
  color: #9ba3b5;
  margin-bottom: 4px;
}

/* ===========================================
   좌측 패널 (툴팁·즐겨찾기)
=========================================== */
.panel-box {
  background: #1a1f29;
  border: 1px solid rgba(100,110,130,0.3);
  padding: 16px;
  border-radius: 12px;
  transition: 0.2s;
}

.panel-box:hover {
  border-color: rgba(140,150,200,0.45);
}

#favItems div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

#favItems div:hover {
  background: rgba(255,255,255,0.05);
}

/* ===========================================
   옵션 필터
=========================================== */
.input-box {
  background: #11151c;
  border: 1px solid #394150;
  border-radius: 8px;
  padding: 8px;
  color: #d2dae6;
  outline: none;
  transition: 0.15s;
}

.input-box:focus {
  border-color: #4fa3ff;
}

.filter-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: #202630;
  border: 1px solid #303a49;
  color: #c1cad8;
  transition: 0.15s;
}

.filter-btn:hover {
  background: #2b3240;
  border-color: #4fa3ff;
}

.filter-btn.active {
  background: #4f8bff;
  border-color: #7eb5ff;
  color: white;
}

/* ===========================================
   팝니다 / 삽니다 박스
=========================================== */

.trade-board {
  background: linear-gradient(180deg, rgba(20, 32, 48, 0.95) 0%, rgba(16, 25, 38, 0.95) 100%);
  border: 1px solid rgba(88, 131, 205, 0.48);
  box-shadow: 0 14px 35px rgba(5, 10, 18, 0.45);
}

.trade-board-header {
  border-bottom: 1px solid rgba(92, 122, 168, 0.35);
  padding-bottom: 10px;
}

.trade-board-title {
  font-size: 19px;
  font-weight: 700;
  color: #b9d6ff;
  letter-spacing: -0.01em;
}

.trade-tab-btn {
  border: 1px solid #365176;
  background: rgba(35, 50, 71, 0.9);
  color: #d7e5ff;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.trade-tab-btn:hover {
  border-color: #5f87c5;
  background: rgba(48, 68, 96, 0.95);
}

.trade-tab-btn.is-active {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: #7cb3ff;
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.32);
}

.trade-list-title {
  font-size: 13px;
  font-weight: 600;
  color: #8ea5c8;
  margin-bottom: 12px;
}

.price-chart-card {
  border: 1px solid rgba(96, 147, 222, 0.45);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(21, 33, 49, 0.94) 0%, rgba(14, 22, 34, 0.95) 100%);
}

.price-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.price-chart-title {
  color: #c6ddff;
  font-weight: 700;
  font-size: 15px;
}

.price-chart-meta {
  color: #94a9c9;
  font-size: 12px;
}

.price-chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.price-chart-stat {
  border: 1px solid rgba(107, 138, 184, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #d9e7ff;
  background: rgba(19, 30, 45, 0.85);
}

.price-chart-plot {
  position: relative;
  width: 100%;
  height: 180px;
}

.price-chart-empty {
  border: 1px dashed rgba(111, 136, 171, 0.55);
  border-radius: 10px;
  text-align: center;
  padding: 20px 10px;
  color: #8ea5c8;
  font-size: 13px;
}

.sell-card {
  border: 1px solid #334154;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 23, 33, 0.95) 0%, rgba(13, 19, 28, 0.95) 100%);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sell-card:hover {
  transform: translateY(-2px);
  border-color: #5b86c2;
  box-shadow: 0 10px 20px rgba(3, 8, 16, 0.45);
}

.trade-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.trade-pagination button {
  background: #111827;
  color: #e4ecfb;
  border: 1px solid #334155;
}

.trade-pagination button:hover {
  background: #1a2435;
  border-color: #5979a4;
}

#sellList {
  border-color: rgba(80,140,255,0.4);
}

#buyList {
  border-color: rgba(70,180,90,0.4);
}

h3.text-blue-400 {
  font-weight: 600;
  font-size: 17px;
}

h3.text-green-400 {
  font-weight: 600;
  font-size: 17px;
}

.list-card {
  background: #11151c;
  border: 1px solid #3a4350;
  padding: 10px;
  border-radius: 8px;
  transition: 0.2s;
}

.list-card:hover {
  background: #161b24;
  border-color: #5f6f85;
}

.list-card-price {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

@media (max-width: 640px) {
  .trade-board-title {
    font-size: 17px;
  }

  .trade-tab-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .trade-pagination {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}
