/* DX-VIEW 머니맵 공통 스타일 */

/* ============================================================
   메인 화면 3행 레이아웃
   ============================================================ */

/* 섹션 타이틀 */
.section-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  color: #1e293b;
}
.section-subtitle {
  margin: 0 0 1rem;
  color: #64748b;
  font-size: 0.875rem;
}

/* 그리드 시스템 */
.card-grid {
  display: grid;
  gap: 1.5rem;
}
.card-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.card-grid.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .card-grid.grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .card-grid.grid-3,
  .card-grid.grid-4 {
    grid-template-columns: 1fr;
  }
}

/* 메인 카드 */
.main-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.main-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

/* 준비중 카드 */
.main-card.status-coming {
  opacity: 0.7;
  cursor: not-allowed;
}
.main-card.status-coming:hover {
  transform: none;
  box-shadow: none;
  border-color: #e5e7eb;
}

/* 카드 헤더 */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.card-icon {
  font-size: 2.5rem;
  display: block;
}

/* 배지 */
.card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.badge-hot    { background: #ef4444; color: #fff; }
.badge-coming { background: #6b7280; color: #fff; }

/* 카드 내 리스트 */
.card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
}
.card-features li {
  padding: 0.1rem 0 0.1rem 0.875rem;
  position: relative;
}
.card-features li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #c9a36a;
}

/* 카드 액션 텍스트 */
.card-action {
  display: block;
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #c9a36a;
}
.card-action.disabled {
  color: #9ca3af;
}

/* 섹션 구분선 */
.section-divider {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #e5e7eb;
}

/* ── 전체 도구 배너 ──────────────────────────────────────────── */
.all-tools-banner {
  display: block;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.all-tools-banner:hover {
  transform: translateY(-2px);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.banner-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}
.banner-text {
  flex: 1;
}
.banner-text h3 {
  margin: 0 0 0.2rem;
  font-size: 1.125rem;
  font-weight: 700;
}
.banner-text p {
  margin: 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}
.banner-action {
  font-weight: 600;
  color: #c9a36a;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .banner-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ── 섹션 컨테이너 ──────────────────────────────────────────── */
.section-fun,
.section-money,
.section-all-tools {
  margin-bottom: 2.5rem;
}

/* ── 홈 화면 추가 가이드 버튼 ── */
.dx-home-guide-btn {
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: white;
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37,99,235,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.dx-home-guide-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37,99,235,0.4);
}
@media (max-width: 640px) {
  .dx-home-guide-btn { font-size: 0.75rem; padding: 0.4rem 0.65rem; }
}

/* ── 미니멀 푸터 (문의하기 링크) ── */
.dx-footer-minimal {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  padding: 1.25rem 1.5rem;
  margin-top: 3rem;
}
.dx-footer-minimal-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.88rem; color: #64748B;
}
.dx-footer-minimal-right { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.dx-footer-minimal-right a { color: #2563EB; text-decoration: none; font-weight: 600; }
.dx-footer-minimal-right a:hover { color: #1E40AF; text-decoration: underline; }
.dx-footer-divider { color: #CBD5E1; }
@media (max-width: 768px) {
  .dx-footer-minimal-inner { flex-direction: column; align-items: center; text-align: center; }
  .dx-footer-minimal-right { justify-content: center; }
}

/* ════════════════════════════════════════════════
   방문자 통계 아이콘 + 모달
   ════════════════════════════════════════════════ */

.dx-stats-icon {
  background: transparent;
  border: 1px solid #CBD5E1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.dx-stats-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #c9a36a;
}

@media (max-width: 768px) {
  .dx-stats-icon { width: 32px; height: 32px; font-size: 0.9rem; }
}

.dx-stats-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dx-stats-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.dx-stats-card {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  max-height: 88vh;
  overflow-y: auto;
}

.dx-stats-card h2 {
  margin: 0 0 1.25rem;
  color: #0F172A;
  font-size: 1.2rem;
  font-weight: 700;
}

.dx-stats-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #94A3B8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.15s;
}

.dx-stats-close:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.dx-stats-loading,
.dx-stats-error {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748B;
}

.dx-stats-error { color: #DC2626; }

.dx-stats-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dx-stats-cell {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.dx-stats-cell-label {
  font-size: 0.85rem;
  color: #64748B;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.dx-stats-cell-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: #2563EB;
  line-height: 1.1;
}

.dx-stats-cell-sub {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-top: 0.3rem;
}

.dx-stats-chart-wrap {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 1rem;
}

.dx-stats-chart-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 1rem;
}

.dx-stats-chart {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.4rem;
  align-items: end;
  height: 160px;
  padding-bottom: 1.5rem;
  position: relative;
}

.dx-stats-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  position: relative;
}

.dx-stats-bar-value {
  font-size: 0.65rem;
  color: #475569;
  font-weight: 600;
  margin-bottom: 0.2rem;
  white-space: nowrap;
}

.dx-stats-bar {
  width: 100%;
  background: linear-gradient(180deg, #3B82F6, #2563EB);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.3s ease-out, background 0.2s;
}

.dx-stats-bar-wrap:hover .dx-stats-bar {
  background: linear-gradient(180deg, #2563EB, #1E40AF);
}

.dx-stats-bar-label {
  position: absolute;
  bottom: -1.4rem;
  font-size: 0.65rem;
  color: #94A3B8;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .dx-stats-card { padding: 1.25rem 1rem; max-height: 92vh; }
  .dx-stats-cell-value { font-size: 1.4rem; }
  .dx-stats-bar-value { font-size: 0.55rem; }
  .dx-stats-bar-label { font-size: 0.6rem; }
}
