/*
Theme Name: MoneyJupjup
Description: 머니줍줍 전용 테마 — 오늘의줍줍(Blogger) 커스텀 테마와 동일한 리스트/배지 구조를 워드프레스로 이식.
Version: 1.0
*/

:root {
  --brand: #16a34a;
  --brand-dark: #0f7c37;
  --bg: #f6f7f9;
  --card-bg: #ffffff;
  --text-main: #222222;
  --text-sub: #767676;
  --border: #e6e6e6;
}
:root[data-theme="dark"] {
  --bg: #15171c;
  --card-bg: #1f232b;
  --text-main: #e8e8ea;
  --text-sub: #9a9ea6;
  --border: #2b2f38;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--text-main);
}
a { text-decoration: none; color: inherit; }

/* 상단 네비게이션 */
#site-nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 10px 20px;
  gap: 8px;
}
#site-nav .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1em;
  white-space: nowrap;
}
#site-nav .brand .logo-emoji {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  flex: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 18px;
  flex: 1;
}
.nav-links .home-link {
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.92em;
  border-radius: 8px;
}
.nav-links .home-link:hover { background: var(--bg); }
.cat-dropdown { position: relative; }
.cat-dropdown .cat-trigger {
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.92em;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--text-main);
  font-family: inherit;
}
.cat-dropdown:hover .cat-trigger,
.cat-dropdown:focus-within .cat-trigger { background: var(--bg); }
.cat-dropdown .cat-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  min-width: 210px;
  padding: 6px;
  display: none;
  z-index: 60;
}
.cat-dropdown:hover .cat-menu,
.cat-dropdown:focus-within .cat-menu { display: block; }
.cat-dropdown .cat-menu a {
  display: block;
  padding: 9px 12px;
  font-size: 0.9em;
  border-radius: 8px;
}
.cat-dropdown .cat-menu a:hover { background: var(--bg); color: var(--brand); }
.nav-tools { display: flex; align-items: center; gap: 6px; }
.nav-tools .icon-btn {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-main);
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 700;
  font-family: inherit;
}
.nav-tools .icon-btn:hover { background: var(--bg); }
.search-box { display: flex; align-items: center; }
.search-box input {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-main);
  border-radius: 8px;
  padding: 0;
  height: 32px;
  font-size: 0.85em;
  width: 0;
  opacity: 0;
  margin-right: 0;
  transition: width 0.2s, opacity 0.2s, padding 0.2s, margin 0.2s;
}
.search-box.open input {
  width: 150px;
  opacity: 1;
  padding: 0 10px;
  margin-right: 6px;
}

/* 레이아웃 */
#content-wrapper {
  max-width: 1080px;
  margin: 16px auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  padding: 0 12px;
}
@media (max-width: 800px) {
  #content-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #site-nav { flex-wrap: wrap; padding: 10px 14px; row-gap: 8px; }
  #site-nav .brand { font-size: 1em; }
  .nav-links { order: 3; width: 100%; margin-left: 0; flex: none; }
  .nav-tools { margin-left: auto; }
  .search-box.open input { width: 110px; }
}

/* 글 목록 카드 */
.post-card {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  align-items: flex-start;
  transition: box-shadow 0.15s, transform 0.15s;
}
.post-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.post-card .badge {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3em;
}
.post-card .badge:before { content: "🧩"; }
.post-card[data-cat="캐시워크 돈버는퀴즈"] .badge { background: #2ecc71; }
.post-card[data-cat="캐시워크 돈버는퀴즈"] .badge:before { content: "🚶"; }
.post-card[data-cat="캐시닥/타임스프레드 용돈퀴즈"] .badge { background: #3498db; }
.post-card[data-cat="캐시닥/타임스프레드 용돈퀴즈"] .badge:before { content: "💰"; }
.post-card[data-cat="OK캐쉬백 오퀴즈"] .badge { background: #e74c3c; }
.post-card[data-cat="OK캐쉬백 오퀴즈"] .badge:before { content: "💳"; }
.post-card[data-cat="신한 퀴즈"] .badge { background: #1a5fb4; }
.post-card[data-cat="신한 퀴즈"] .badge:before { content: "🔵"; }
.post-card[data-cat="KB Pay 오늘의 퀴즈"] .badge { background: #ffb800; }
.post-card[data-cat="KB Pay 오늘의 퀴즈"] .badge:before { content: "🏦"; }
.post-card[data-cat="토스 행운퀴즈"] .badge { background: #3182f6; }
.post-card[data-cat="토스 행운퀴즈"] .badge:before { content: "🍀"; }
.post-card[data-cat="시럽월렛 타임어택 퀴즈"] .badge { background: #f39c12; }
.post-card[data-cat="시럽월렛 타임어택 퀴즈"] .badge:before { content: "🍯"; }
.post-card[data-cat="마이홈플러스 홈플퀴즈"] .badge { background: #16a085; }
.post-card[data-cat="마이홈플러스 홈플퀴즈"] .badge:before { content: "🏠"; }
.post-card[data-cat="우리원멤버스 데일리 퀴즈"] .badge { background: #8e44ad; }
.post-card[data-cat="우리원멤버스 데일리 퀴즈"] .badge:before { content: "👥"; }
.post-card[data-cat="버즈빌 초성퀴즈"] .badge { background: #9b59b6; }
.post-card[data-cat="버즈빌 초성퀴즈"] .badge:before { content: "🎯"; }
.post-card[data-cat="NaverPay"] .badge { background: #03c75a; }
.post-card[data-cat="NaverPay"] .badge:before { content: "🟢"; }
.post-card .post-title {
  font-size: 0.98em;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
}
.post-card .post-meta {
  font-size: 0.78em;
  color: var(--text-sub);
  display: flex;
  gap: 8px;
  align-items: center;
}
.post-card .post-meta .label-chip {
  background: #e9f9ee;
  color: var(--brand-dark);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* 개별 글 본문 */
.post-full {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 10px;
}
.post-title-full {
  font-size: 1.3em;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 10px;
}
.post-full .post-meta {
  font-size: 0.82em;
  color: var(--text-sub);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.post-full .post-meta .label-chip {
  background: #e9f9ee;
  color: var(--brand-dark);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}
.post-body { font-size: 0.98em; line-height: 1.8; }
.post-body h2, .post-body h3 { margin: 22px 0 10px; font-weight: 800; }
.post-body p { margin: 0 0 14px; }
.post-body .qb {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 14px;
}

/* 페이지네이션 */
.pager-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 4px;
  font-size: 0.88em;
  font-weight: 600;
  color: var(--text-sub);
}
.pager-row a:hover { color: var(--brand); }

/* 사이드바 공통 */
.side-widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.side-widget h2, .side-widget .title {
  font-size: 0.95em;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text-main);
}
.quicklink-list a {
  display: block;
  padding: 9px 4px;
  font-size: 0.88em;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}
.quicklink-list a:last-child { border-bottom: none; }

.icon-link-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  font-size: 0.88em;
  border-bottom: 1px solid var(--border);
}
.icon-link-list a:last-child { border-bottom: none; }
.icon-link-list a:before { content: "💬"; font-size: 0.9em; }

.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-row a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--text-main);
}
.pill-row a:hover { background: #e9f9ee; color: var(--brand-dark); border-color: var(--brand); }

.notice-banner {
  display: block;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #e74c3c;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9em;
  margin-bottom: 14px;
  animation: noticePulse 2.2s ease-in-out infinite;
}
@keyframes noticePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }

.countdown-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 0.95em;
}
.countdown-box .countdown-label { color: var(--text-sub); font-weight: 600; font-size: 0.85em; }

footer {
  text-align: center;
  padding: 24px 12px;
  font-size: 0.78em;
  color: var(--text-sub);
}
