/* ══════════════════════════════════
   공통 섹션
══════════════════════════════════ */
.market-section { padding: 22px 24px; }









/* ══════════════════════════════════
   아이템 경매장 그리드
══════════════════════════════════ */
.market-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.market-grid-full {
  grid-template-columns: repeat(4, 1fr);
}

.market-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: transform 0.17s, box-shadow 0.17s, border-color 0.17s;
  position: relative;
}
.market-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,100,200,0.22);
  border-color: rgba(126,207,255,0.4);
}

.market-thumb-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
}
.market-thumb {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
  display: block;
}
.market-thumb-fallback {
  position: absolute; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
}

.market-expired-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.7);
  color: rgba(220,235,255,0.55);
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
}

.market-info {
  padding: 10px 12px 12px;
}
.market-name {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.85rem;
  color: #f0f6ff;
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.market-note {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.72rem;
  color: rgba(220,235,255,0.6);
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.market-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.market-price {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.88rem;
  color: #f0f6ff;
  display: flex; align-items: center; gap: 4px;
}
.market-bids {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.68rem;
  color: rgba(220,235,255,0.55);
}
.market-end {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.68rem;
  color: rgba(220,235,255,0.45);
}
.market-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}
.market-seller {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.7rem;
  color: rgba(220,235,255,0.55);
}

/* 골드 코인 */
.price-coin {
  display: inline-block;
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe066, #d4a000);
  border: 1px solid rgba(255,220,60,0.4);
  flex-shrink: 0;
}
.price-coin.silver {
  background: radial-gradient(circle at 35% 35%, #d0d8e8, #8898b0);
  border-color: rgba(180,190,210,0.4);
}

/* ══════════════════════════════════
   닉네임 그리드
══════════════════════════════════ */
.nickname-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.nickname-grid-full { grid-template-columns: repeat(4, 1fr); }

.nickname-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.17s, box-shadow 0.17s, border-color 0.17s;
  overflow: hidden;
}
.nickname-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,80,180,0.2);
  border-color: rgba(126,207,255,0.35);
}
.nickname-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}
.nickname-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nickname-body { flex: 1; min-width: 0; }
.nickname-name {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.95rem; color: #ffe066;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
  text-shadow: 0 1px 0 #7a5000;
}
.nickname-seller {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.72rem; color: rgba(220,235,255,0.6);
  margin-bottom: 2px;
}
.nickname-end {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.68rem; color: rgba(220,235,255,0.42);
}
.nickname-expired-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.6);
  color: rgba(220,235,255,0.5);
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.62rem;
  padding: 2px 7px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ══════════════════════════════════
   경매 상세
══════════════════════════════════ */
.auction-detail-wrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: start;
}

.auction-info-box { padding: 22px; }
.auction-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
}
.auction-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }

.auction-title {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 1.15rem; color: #f0f6ff;
  margin-bottom: 6px;
}
.auction-note {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.82rem; color: rgba(220,235,255,0.7);
  margin-bottom: 16px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  border-left: 3px solid rgba(126,207,255,0.4);
}

.auction-stats {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.auction-stat-box {
  flex: 1;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.auction-stat-label {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.68rem; color: rgba(220,235,255,0.55);
}
.auction-stat-val {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.95rem; color: #f0f6ff;
  display: flex; align-items: center; gap: 4px;
}
.auction-stat-val.highlight { color: #ffe066; }

.auction-end-row, .auction-seller-row {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.8rem; margin-bottom: 10px;
}
.auction-end-label, .auction-seller-label {
  color: rgba(220,235,255,0.55); flex-shrink: 0;
}
.auction-end-val { color: #7ecfff; }
.auction-end-val.expired { color: rgba(220,235,255,0.4); }
.auction-seller-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
}
.auction-seller-name { color: rgba(220,235,255,0.8); }

.auction-dm-section {
  margin-top: 16px;
  padding: 14px;
  background: rgba(88,101,242,0.12);
  border: 1px solid rgba(88,101,242,0.3);
  border-radius: 10px;
}
.auction-dm-title {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.78rem; color: rgba(220,235,255,0.7);
  margin-bottom: 8px;
}
.auction-bidder-row {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.82rem; color: #f0f6ff;
  margin-bottom: 10px;
}

.dm-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: rgba(88,101,242,0.75);
  border: 1px solid rgba(140,150,255,0.4);
  border-radius: 8px;
  padding: 10px 16px;
  color: #fff;
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.17s;
  text-decoration: none;
}
.dm-btn:hover { background: rgba(88,101,242,1); }
.dm-btn-full { margin-top: 16px; }

/* 입찰 영역 */
.auction-bid-box { display: flex; flex-direction: column; gap: 14px; }
.auction-bid-list-wrap { padding: 18px; }

.auction-bid-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 340px; overflow-y: auto;
}
.auction-bid-list::-webkit-scrollbar { width: 3px; }
.auction-bid-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.auction-bid-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  font-family: 'Do Hyeon', sans-serif; font-size: 0.82rem;
}
.auction-bid-row.top-bid {
  background: rgba(255,224,102,0.1);
  border: 1px solid rgba(255,224,102,0.25);
}
.bid-rank {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.78rem; color: rgba(220,235,255,0.5);
  min-width: 18px;
}
.top-bid .bid-rank { color: #ffe066; }
.bid-avatar { width: 22px; height: 22px; border-radius: 50%; }
.bid-username { flex: 1; color: rgba(220,235,255,0.8); }
.bid-price {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.88rem; color: #f0f6ff;
  display: flex; align-items: center; gap: 4px;
}
.bid-empty {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.82rem; color: rgba(220,235,255,0.4);
  padding: 14px 0; text-align: center;
}

.auction-bid-form-wrap { padding: 18px; }
.bid-input-row {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.bid-submit-btn { width: auto; padding: 8px 20px; flex-shrink: 0; }
.bid-guide {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.72rem; color: rgba(220,235,255,0.5);
  margin-bottom: 6px;
}
.bid-msg {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.8rem; min-height: 18px;
}

/* 이미지 미리보기 */
.img-preview-wrap {
  border-radius: 8px; overflow: hidden;
  max-height: 180px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2); margin-bottom: 4px;
}
.img-preview-wrap img { max-width: 100%; max-height: 180px; object-fit: contain; }

/* ══════════════════════════════════
   닉네임 상세
══════════════════════════════════ */
.nickname-detail-wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 32px 36px;
}
.nickname-detail-badge {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.72rem;
  color: rgba(220,235,255,0.6);
  margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.nickname-detail-name {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 2rem;
  color: #ffe066;
  text-shadow: 0 2px 0 #7a5000;
  margin-bottom: 24px;
  word-break: break-all;
}
.nickname-detail-meta {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 20px;
}
.nickname-detail-row {
  display: flex; align-items: center; gap: 14px;
  font-family: 'Do Hyeon', sans-serif; font-size: 0.85rem;
}
.nd-label {
  color: rgba(220,235,255,0.55);
  min-width: 70px; flex-shrink: 0;
}
.nd-val { color: #f0f6ff; display: flex; align-items: center; gap: 8px; }
.nd-val.expired { color: rgba(220,235,255,0.4); }

.seller-row { display: flex; align-items: center; gap: 8px; }

.status-badge {
  font-family: 'Do Hyeon', sans-serif; font-size: 0.72rem;
  padding: 2px 10px; border-radius: 12px; border: 1px solid;
}
.status-badge.open { background: rgba(100,220,100,0.12); border-color: rgba(100,220,100,0.35); color: #88ee88; }
.status-badge.expired { background: rgba(120,120,120,0.12); border-color: rgba(180,180,180,0.2); color: rgba(220,235,255,0.45); }

.nickname-detail-guide {
  font-family: 'Do Hyeon', sans-serif; font-size: 0.8rem;
  line-height: 1.7; color: rgba(220,235,255,0.65);
  padding: 12px 16px; border-radius: 10px;
  margin-bottom: 16px;
}

.nd-own-notice {
  font-family: 'Do Hyeon', sans-serif; font-size: 0.82rem;
  color: rgba(220,235,255,0.5);
  text-align: center; padding: 12px;
}
.nd-own-notice.expired { color: rgba(220,235,255,0.35); }

.nick-guide {
  font-family: 'Do Hyeon', sans-serif; font-size: 0.75rem;
  color: rgba(220,235,255,0.55); line-height: 1.6;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

/* ══════════════════════════════════
   반응형
══════════════════════════════════ */
@media (max-width: 960px) {
  .market-grid, .market-grid-full { grid-template-columns: repeat(2, 1fr); }
  .nickname-grid, .nickname-grid-full { grid-template-columns: repeat(2, 1fr); }
  .auction-detail-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .market-grid, .market-grid-full { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .nickname-grid, .nickname-grid-full { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════
   더보기 버튼 강화
══════════════════════════════════ */
.sec-more {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.8rem;
  color: #7ecfff;
  text-decoration: none;
  border: 1px solid rgba(126,207,255,0.45);
  border-radius: 14px;
  padding: 4px 14px;
  background: rgba(126,207,255,0.1);
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sec-more::after {
  content: '›';
  font-size: 1rem;
  line-height: 1;
}
.sec-more:hover {
  background: rgba(126,207,255,0.22);
  box-shadow: 0 0 10px rgba(126,207,255,0.25);
}

/* ══════════════════════════════════
   빈 상태 — 가운데 정렬
══════════════════════════════════ */
.market-empty, .market-empty-full {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.88rem;
  color: rgba(220,235,255,0.45);
  padding: 36px 0;
  text-align: center;
  grid-column: 1 / -1;
  width: 100%;
}

/* ══════════════════════════════════
   홈으로 / 목록으로 버튼 색상 수정
══════════════════════════════════ */
.det-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 4px 12px 4px 8px;
  color: #f0f6ff !important;        /* 보라색 덮어쓰기 */
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none !important; /* 밑줄 제거 */
}
.det-back-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #f0f6ff !important;
}
.det-back-btn svg path {
  stroke: #f0f6ff;
}

/* ══════════════════════════════════
   모달 오버레이 + 박스 (auction/list, nickname/list 에서 사용)
══════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,50,0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  width: 420px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 28px;
  border-radius: 16px;
}
.modal-box::-webkit-scrollbar { width: 4px; }
.modal-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 1.1rem;
  color: #ffe066;
  text-shadow: 0 1px 0 #7a5000;
}
.modal-close {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: #f0f6ff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-form label {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.82rem;
  color: rgba(220,235,255,0.8);
}
.modal-form small {
  font-size: 0.72rem;
  color: rgba(220,235,255,0.5);
}
.modal-input {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  color: #f0f6ff;
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
  transition: border-color 0.14s;
}
.modal-input:focus { border-color: rgba(126,207,255,0.5); }
.modal-input[type="file"] { padding: 6px 10px; cursor: pointer; }
.modal-submit {
  margin-top: 6px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(88,101,242,0.8);
  border: 1px solid rgba(140,150,255,0.4);
  color: #fff;
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}
.modal-submit:hover { background: rgba(88,101,242,1); }

/* ══════════════════════════════════
   등록 버튼 (sec-header 우측)
══════════════════════════════════ */
.write-modal-btn {
  font-family: 'Do Hyeon', sans-serif;
  font-size: 0.8rem;
  color: #ffe066;
  background: rgba(255,224,102,0.12);
  border: 1px solid rgba(255,224,102,0.4);
  border-radius: 14px;
  padding: 4px 16px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.write-modal-btn:hover {
  background: rgba(255,224,102,0.25);
  box-shadow: 0 0 10px rgba(255,224,102,0.2);
}

/* ══════════════════════════════════
   datetime-local 달력 아이콘 가시성 개선
══════════════════════════════════ */
/* ══════════════════════════════════
   datetime-local 달력 아이콘 가시성 개선
══════════════════════════════════ */
.modal-input[type="datetime-local"] {
  color-scheme: dark;
  position: relative;
}

/* 아이콘 자체를 강제로 흰색으로 */
.modal-input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(220,235,255,0.85)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  background-color: transparent;
  color: transparent;
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.modal-input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}