/* =============================================
   PokeCardDB - メインスタイルシート
   TCGdex API連携 ポケモンカードデータベース
   ============================================= */

:root {
  --primary: #e3350d;
  --primary-dark: #b5290a;
  --primary-light: #ff6b47;
  --secondary: #3d7dca;
  --secondary-dark: #2c5fa0;
  --accent: #ffcb05;
  --accent-dark: #e6b800;
  --dark: #1a1a2e;
  --dark2: #16213e;
  --dark3: #0f3460;
  --surface: #1e1e2e;
  --surface2: #252540;
  --surface3: #2d2d50;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0c0;
  --text-muted: #6060a0;
  --border: #3a3a5c;
  --border-light: #4a4a7a;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

/* ── ページ遷移フェードイン ──
   common.js の InstantNav がクリック時に opacity:0 にし、
   次ページは @keyframes page-in で 0.15s でフェードイン。
   prerender 済みページは既に描画済みなので一瞬で表示される。 */
@keyframes page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body {
  font-family: 'Noto Sans JP', 'Segoe UI', sans-serif;
  background: var(--dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  animation: page-in 0.15s ease-out both;
}

/* ===================== NAVBAR ===================== */
.navbar {
  background: linear-gradient(135deg, var(--dark2) 0%, var(--dark3) 100%);
  border-bottom: 2px solid var(--primary);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(227, 53, 13, 0.3);
  overflow: visible; /* アイコン飛び出し許可 */
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 16px;
  height: 76px;
  overflow: visible; /* アイコン飛び出し許可 */
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0 4px;
}

.navbar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #e0e0e0 40%, #cc0000 41%, #cc0000 100%);
  border-radius: 50%;
  border: 3px solid #333;
  position: relative;
  box-shadow: 0 0 12px rgba(227, 53, 13, 0.6);
}

.navbar-logo .logo-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: #333;
  transform: translateY(-50%);
}

.navbar-logo .logo-text {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 0px;
  display: flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
}

/* ── ピカチュウのしっぽ風ロゴ ── */
.pika-logo {
  /* Lilita One: 極太・丸みのある躍動感フォント（しっぽのジグザグ感） */
  font-family: 'Lilita One', 'Noto Sans JP', sans-serif;
  font-style: italic;          /* しっぽの傾き */
  letter-spacing: 0.02em;
}

/* 文字ごとに黄→茶のグラデーション配色（しっぽの付け根=黄・先端=茶） */
.pika-logo .logo-char {
  animation: none;   /* 揺れなし */
  text-shadow: 0 2px 0 rgba(0,0,0,0.35);
  transform: none;
}
/* みんなの → 鮮やかな黄色 */
.lc-m  { color: #ffe600; }
.lc-n  { color: #ffe600; }
.lc-n2 { color: #ffe600; }
.lc-no { color: #ffe600; }
/* ポケカ → オレンジ〜茶（しっぽ先端） */
.lc-po { color: #ffbb00; }
.lc-ke { color: #e08000; }
.lc-ka { color: #c96000; }
/* 検索 → 茶色 */
.lc-se { color: #a84800; }
.lc-i  { color: #8b3a00; }

/* 白蛇ロゴ画像 */
.logo-snake-img {
  width: 2.8rem;
  height: 2.8rem;
  object-fit: contain;
  vertical-align: middle;
  margin-left: 4px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

/* 白蛇の横に並ぶ言語切り替えボタン */
.logo-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.logo-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 800;
  font-style: normal;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1;
}
.logo-lang-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
}
.logo-lang-btn.active {
  color: #ffe600;
  border-color: #ffe600;
  background: rgba(255,230,0,0.12);
  text-shadow: 0 0 8px rgba(255,230,0,0.5);
}

.logo-char {
  display: inline-block;
  font-weight: 900;
  animation: logo-bounce 2.4s ease-in-out infinite;
  position: relative;
  text-shadow: 0 2px 0 rgba(0,0,0,0.3);
}
.logo-sep { display: none; }

@keyframes logo-bounce {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  30%       { transform: translateY(-4px) rotate(1deg); }
  60%       { transform: translateY(-2px) rotate(0deg); }
}

@keyframes logo-spin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

.navbar-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.navbar-search input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}

.navbar-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.15);
}

.navbar-search input::placeholder { color: var(--text-muted); }

.navbar-search .search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.navbar-search .search-btn:hover { color: var(--accent); }

.navbar-nav {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-left: auto;
}

/* 旧ナビバー右端の言語切り替え（非使用・非表示） */
.lang-switcher { display: none; }
.lang-btn      { display: none; }

/* ── ナビアイコン画像（共通ベース） ── */
.nav-icon-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: -18px;
  margin-bottom: -4px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), filter 0.25s;
}

/* ── タブ風ナビリンク共通 ── */
.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 18px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.06em;
  transition: all 0.2s;
  white-space: nowrap;
  color: rgba(255,255,255,0.45);
  border-bottom: 3px solid transparent;
  position: relative;
  top: 0;
}

/* ホーム：ポケモンセンター → スカイブルー */
.nav-link[href*="index"] { color: rgba(120,210,255,0.6); }
.nav-link[href*="index"]:hover,
.nav-link[href*="index"].active {
  color: #78d2ff;
  background: rgba(120,210,255,0.07);
  border-bottom-color: #78d2ff;
  text-shadow: 0 0 8px rgba(120,210,255,0.6);
}
.nav-link[href*="index"]:hover .nav-icon-img,
.nav-link[href*="index"].active .nav-icon-img {
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.7)) drop-shadow(0 0 24px rgba(120,210,255,1));
  transform: scale(1.15) translateY(-8px) rotate(3deg);
}

/* シリーズ一覧：ボックス → ゴールド */
.nav-link[href*="sets"] { color: rgba(255,210,60,0.6); }
.nav-link[href*="sets"]:hover,
.nav-link[href*="sets"].active {
  color: #ffd23c;
  background: rgba(255,210,60,0.07);
  border-bottom-color: #ffd23c;
  text-shadow: 0 0 8px rgba(255,210,60,0.6);
}
.nav-link[href*="sets"]:hover .nav-icon-img,
.nav-link[href*="sets"].active .nav-icon-img {
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.7)) drop-shadow(0 0 24px rgba(255,210,60,1));
  transform: scale(1.15) translateY(-8px) rotate(-3deg);
}



/* カード検索：カード裏面 → シアン */
.nav-link[href*="cards"] { color: rgba(100,220,220,0.6); }
.nav-link[href*="cards"]:hover,
.nav-link[href*="cards"].active {
  color: #64dcdc;
  background: rgba(100,220,220,0.07);
  border-bottom-color: #64dcdc;
  text-shadow: 0 0 8px rgba(100,220,220,0.6);
}
.nav-link[href*="cards"]:hover .nav-icon-img,
.nav-link[href*="cards"].active .nav-icon-img {
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.7)) drop-shadow(0 0 24px rgba(100,220,220,1));
  transform: scale(1.15) translateY(-8px) rotate(3deg);
}

/* ===================== LAYOUT ===================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-wrapper { padding: 32px 0; }

/* ===================== HERO ===================== */
.hero {
  background: linear-gradient(135deg, var(--dark2) 0%, var(--dark3) 50%, #1a0030 100%);
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(227, 53, 13, 0.08) 0%, transparent 60%);
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.3;
}

/* ヒーロータイトル：デコ文字ブロック */
.hero-title-block {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.hero-char {
  display: inline-block;
  font-weight: 900;
  position: relative;
  animation: hero-pop 3s ease-in-out infinite;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}

.hero-char-em { display: none; }

/* ヒーロー文字の色割り当て */
.hc1  { color: #ff6b9d; animation-delay: 0.00s; }
.hc2  { color: #ff8c42; animation-delay: 0.06s; }
.hc3  { color: #ffd93d; animation-delay: 0.12s; }
.hc4  { color: #6bcb77; animation-delay: 0.18s; }
.hc5  { color: #4d96ff; animation-delay: 0.24s; }
.hc6  { color: #c77dff; animation-delay: 0.30s; }
.hc7  { color: #ff6b9d; animation-delay: 0.36s; }
.hc8  { color: #ff8c42; animation-delay: 0.42s; }
.hc9  { color: #ffd93d; animation-delay: 0.48s; }
.hc10 { color: #6bcb77; animation-delay: 0.54s; }
.hc11 { color: #4d96ff; animation-delay: 0.60s; }
.hc12 { color: #c77dff; animation-delay: 0.66s; }

.hero-title-dot { display: none; }

@keyframes hero-pop {
  0%, 100% { transform: translateY(0) scale(1);      }
  25%       { transform: translateY(-6px) scale(1.08); }
  50%       { transform: translateY(-3px) scale(1.03); }
  75%       { transform: translateY(-5px) scale(1.06); }
}

@keyframes hero-wobble {
  0%, 100% { transform: rotate(-8deg) scale(1.1);  }
  50%       { transform: rotate(8deg)  scale(1.2);  }
}

@keyframes hero-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* タイトル背景デコ */
.hero-title::before {
  content: '';
  position: absolute;
  inset: -12px -20px;
  background: radial-gradient(ellipse at center, rgba(255,203,5,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.hero-search {
  max-width: 320px;
  margin: 0 18% 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0;
}

.hero-search-input {
  flex: 1;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--border);
  border-right: none;
  border-radius: 50px 0 0 50px;
  color: var(--text-primary);
  font-size: 0.83rem;
  font-family: inherit;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.hero-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.12);
}

.hero-search-input::placeholder { color: var(--text-muted); }

.hero-search-btn {
  padding: 8px 16px;
  background: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 0 50px 50px 0;
  color: white;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.hero-search-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ─── 最新コメントスライダー（ヒーロー下） ─── */
.latest-comment-wrap {
  margin-top: 28px;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.latest-comment-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-align: left;
}

.latest-comment-slider {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.latest-comment-card {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  min-height: 80px;
  transition: opacity 0.3s ease;
}

/* フェードアニメ */
.lc-fade-out { opacity: 0; transform: translateY(4px); transition: opacity 0.3s, transform 0.3s; }
.lc-fade-in  { animation: lc-in 0.4s ease forwards; }
@keyframes lc-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* カード内レイアウト */
.lc-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
}
.lc-inner:hover .lc-card-name { color: var(--accent); }

.lc-img-wrap {
  flex-shrink: 0;
  width: 54px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface2);
}

.lc-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.lc-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--surface3);
  border-radius: 6px;
}

.lc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lc-card-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.lc-set-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc-msg-row {
  margin-top: 4px;
  min-width: 0;
}

.lc-username { display: none; }

.lc-msg {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.lc-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ドットインジケーター */
.lc-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.lc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  border: none;
}

.lc-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ローディング・空 */
.lc-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.lc-empty {
  padding: 22px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===================== SECTION ===================== */
.section { margin-bottom: 48px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
}

.section-link {
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.section-link:hover { color: var(--accent); }

/* ===================== CARD GRID ===================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.card-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.card-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-item:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(255, 203, 5, 0.2);
}

.card-item-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  background: var(--surface2);
  overflow: hidden;
}

.card-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card-item:hover .card-item-img {
  transform: scale(1.05);
}

.card-item-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  border-bottom: 1px solid var(--border);
  padding: 12px 8px;
}

.card-item-placeholder .ph-icon {
  font-size: 2rem;
  opacity: 0.4;
}

.card-item-placeholder .ph-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
  max-width: 90%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

.card-item-placeholder .ph-num {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* 画像なし詳細ページ左カラム */
.no-image-card {
  background: linear-gradient(135deg, var(--surface2) 0%, var(--dark3) 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 16px;
}

.no-image-card .ni-icon {
  font-size: 5rem;
  opacity: 0.25;
  margin-bottom: 16px;
}

.no-image-card .ni-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.no-image-card .ni-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.no-image-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(255, 203, 5, 0.1);
  border: 1px solid rgba(255, 203, 5, 0.3);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.card-item-body {
  padding: 10px 12px;
}

.card-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-item-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 50px;
  font-weight: 600;
}

.badge-chat {
  background: rgba(52, 152, 219, 0.2);
  color: #5dade2;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.rank-1 { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #333; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #333; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #a05a1c); color: #fff; }
.rank-other { background: var(--surface3); color: var(--text-secondary); font-size: 0.7rem; }

.hot-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  z-index: 10;
  animation: hot-pulse 2s ease-in-out infinite;
}

@keyframes hot-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(227, 53, 13, 0.5); }
  50% { box-shadow: 0 0 14px rgba(227, 53, 13, 0.9); }
}

/* ===================== SET GRID ===================== */
.set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.set-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
}

.set-card:hover {
  border-color: var(--secondary);
  background: var(--surface2);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(61, 125, 202, 0.2);
}

.set-icon {
  width: 50px;
  height: 50px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.set-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.set-info { flex: 1; min-width: 0; }

.set-name {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.set-series {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.set-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===================== ACCORDION (シリーズ一覧) ===================== */
.accordion-block {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface2);
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  transition: background 0.2s ease;
  text-align: left;
  gap: 12px;
}

.accordion-header:hover {
  background: var(--surface3);
}

.accordion-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.accordion-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* セットカードのBOX画像（大きめ表示） */
.set-icon-box {
  width: 72px;
  height: 72px;
  background: var(--surface3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.set-box-img {
  width: 100%;
  height: 100%;
  object-fit: contain;  /* ロゴが縦横比を保つよう contain */
  transition: transform 0.2s ease;
}

.set-card:hover .set-box-img {
  transform: scale(1.06);
}

.accordion-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accordion-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  flex-shrink: 0;
  font-weight: 500;
}

.accordion-chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.accordion-chevron.open {
  transform: rotate(180deg);
  color: var(--secondary);
}

.accordion-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  animation: accordionFadeIn 0.2s ease;
}

.accordion-body.open {
  display: block;
}

.accordion-set-grid {
  gap: 10px;
}

@keyframes accordionFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* EN版 series-accordion（英語版sets.htmlで使用） */
.series-accordion {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 10px;
}

.series-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface2);
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  transition: background 0.2s ease;
  text-align: left;
}

.series-accordion-btn:hover {
  background: var(--surface3);
}

.series-accordion-title {
  font-size: 0.97rem;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-accordion-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  flex-shrink: 0;
}

.series-accordion-chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.series-accordion-btn.open .series-accordion-chevron {
  transform: rotate(180deg);
  color: var(--secondary);
}

.series-accordion-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.series-accordion-body.open {
  display: block;
  animation: accordionFadeIn 0.2s ease;
}

/* ===================== RANKING ===================== */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ranking-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.ranking-item:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateX(4px);
}

.ranking-num {
  font-size: 1.3rem;
  font-weight: 900;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.ranking-num.gold { color: #ffd700; }
.ranking-num.silver { color: #c0c0c0; }
.ranking-num.bronze { color: #cd7f32; }
.ranking-num.other { color: var(--text-muted); font-size: 1rem; }

.ranking-card-img {
  width: 46px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--surface2);
  flex-shrink: 0;
}

.ranking-info { flex: 1; min-width: 0; }

.ranking-name {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.ranking-set {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.ranking-chat-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.ranking-chat-count .count-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--secondary);
  line-height: 1;
}

.ranking-chat-count .count-label {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.trend-up { color: var(--success); font-weight: 700; font-size: 0.85rem; }
.trend-new { color: var(--accent); font-weight: 700; font-size: 0.75rem; }

/* ── 価格トレンドランキングアイテム ── */
.price-trend-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.price-trend-item:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateX(4px);
}
.price-trend-item.up-item:hover   { border-color: #e3350d; }
.price-trend-item.down-item:hover { border-color: #3d7dca; }

.price-trend-change {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 62px;
}
.price-trend-pct {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}
.price-trend-pct.up   { color: #e3350d; }
.price-trend-pct.down { color: #3d7dca; }
.price-trend-price-now {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 3px;
}
.price-trend-price-past {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ===================== FILTER BAR ===================== */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.filter-select {
  padding: 7px 12px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--secondary);
}

.filter-search {
  flex: 1;
  min-width: 200px;
  padding: 7px 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
}

.filter-search:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-search::placeholder { color: var(--text-muted); }

.filter-btn {
  padding: 7px 16px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover { background: var(--primary-dark); }

.filter-btn.secondary {
  background: var(--surface3);
  color: var(--text-secondary);
}

.filter-btn.secondary:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* ===================== PAGINATION ===================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 8px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
  min-width: 38px;
  text-align: center;
}

.page-btn:hover {
  border-color: var(--secondary);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===================== LOADING ===================== */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.pokeball-loader {
  width: 48px;
  height: 48px;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #ddd 40%, #cc0000 41%, #cc0000 100%);
  border-radius: 50%;
  border: 3px solid #333;
  position: relative;
  animation: spin 0.8s linear infinite;
}

.pokeball-loader::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: #333;
  transform: translateY(-50%);
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { color: var(--text-secondary); font-size: 0.9rem; }

.skeleton {
  background: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 12px;
  text-align: center;
}

.empty-state .empty-icon { font-size: 4rem; opacity: 0.3; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); }
.empty-state p { font-size: 0.9rem; color: var(--text-muted); }

/* ===================== CARD DETAIL ===================== */
.card-detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  align-items: start;
}

.card-detail-left {
  position: sticky;
  top: 88px;
}

.card-detail-img-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
  transition: var(--transition);
}

.card-detail-img-wrap:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(255, 203, 5, 0.15);
}

.card-detail-img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.card-detail-img:hover { transform: scale(1.04); }

.card-detail-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.2;
}

.card-detail-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }

.info-table th {
  padding: 10px 16px;
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  width: 120px;
}

.info-table td {
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* ===================== EBAY PRICE ===================== */
/* ─────────────────────────────────────────
   TCGdex 価格セクション
───────────────────────────────────────── */
.pricing-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.pricing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.pricing-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-tabs {
  display: flex;
  gap: 6px;
}

.pricing-tab {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pricing-tab.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
}

.pricing-tab:hover:not(.active) {
  border-color: var(--secondary);
  color: var(--secondary);
}

.pricing-currency-tag {
  font-size: 0.65rem;
  opacity: 0.8;
  font-weight: 400;
}

/* 価格3つ並べグリッド */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.pricing-box {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  border: 1.5px solid var(--border);
  transition: var(--transition);
}

.pricing-box-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-box-high { border-color: rgba(231,76,60,0.4); }
.pricing-box-avg  { border-color: rgba(255,203,5,0.4); }
.pricing-box-low  { border-color: rgba(46,204,113,0.4); }

.pricing-box-high .pricing-box-value { color: #e74c3c; }
.pricing-box-avg  .pricing-box-value { color: var(--accent); }
.pricing-box-low  .pricing-box-value { color: var(--success); }

.pricing-box-value {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 4px;
}

.pricing-box-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* バリアント選択 */
.pricing-variant-wrap {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.variant-btn {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  cursor: pointer;
  transition: var(--transition);
}

.variant-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.variant-btn:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* チャート */
.pricing-chart-wrap {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.pricing-chart-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pricing-updated {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 8px;
}

.pricing-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* モバイル対応 */
@media (max-width: 480px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .pricing-box-value { font-size: 0.95rem; }
  .pricing-header { flex-direction: column; align-items: flex-start; }
}

.ebay-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.ebay-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  justify-content: space-between;
}

.ebay-logo {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -1px;
}

.ebay-logo span:nth-child(1) { color: #e53238; }
.ebay-logo span:nth-child(2) { color: #0064d2; }
.ebay-logo span:nth-child(3) { color: #f5af02; }
.ebay-logo span:nth-child(4) { color: #86b817; }

.ebay-updated { font-size: 0.75rem; color: var(--text-muted); }

.ebay-price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.price-box {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.price-box-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-box-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--success);
}

.price-box-value.loading-val {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ebay-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: #0064d2;
  border-radius: var(--radius-sm);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}

.ebay-link:hover {
  background: #0053b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 100, 210, 0.4);
}

.ebay-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}

/* ===================== CHAT ===================== */
.card-data-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

/* ═══════════════════════════════════════
   価格予想投票セクション
═══════════════════════════════════════ */
.vote-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.vote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.vote-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.vote-total-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 比率バー */
.vote-bar-wrap {
  margin-bottom: 14px;
}

.vote-bar-track {
  display: flex;
  height: 22px;
  border-radius: 50px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.vote-bar-up {
  background: linear-gradient(90deg, #ff6a00, #ee0979);
  transition: width 0.5s ease;
  min-width: 0;
}

.vote-bar-down {
  background: linear-gradient(90deg, #2980b9, #1a5276);
  transition: width 0.5s ease;
  min-width: 0;
}

.vote-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.vote-label-up   { color: #ff6a00; }
.vote-label-down { color: #2980b9; }

/* 投票ボタン */
.vote-btns {
  display: flex;
  gap: 12px;
}

.vote-btn {
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s, box-shadow 0.15s;
  letter-spacing: 0.03em;
}

.vote-btn:hover  { filter: brightness(1.12); transform: translateY(-2px); }
.vote-btn:active { transform: scale(0.97); }

.vote-btn-up {
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,106,0,0.35);
}

.vote-btn-down {
  background: linear-gradient(135deg, #2980b9, #1a5276);
  color: #fff;
  box-shadow: 0 4px 14px rgba(41,128,185,0.35);
}

.vote-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}

/* 投票済みメッセージ */
.vote-already {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.vote-already.voted-up {
  background: rgba(255,106,0,0.12);
  border: 1px solid rgba(255,106,0,0.3);
  color: #ff6a00;
}

.vote-already.voted-down {
  background: rgba(41,128,185,0.12);
  border: 1px solid rgba(41,128,185,0.3);
  color: #2980b9;
}

.chat-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.chat-header {
  padding: 14px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-count-badge {
  background: var(--secondary);
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 700;
}

.chat-messages {
  height: 380px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: var(--surface2); }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.chat-msg {
  display: flex;
  gap: 10px;
  animation: msg-appear 0.3s ease-out;
}

@keyframes msg-appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
}

.chat-msg-body { flex: 1; min-width: 0; }

.chat-msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-username { font-size: 0.85rem; font-weight: 700; }
.chat-time { font-size: 0.72rem; color: var(--text-muted); }

.chat-msg-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  background: var(--surface2);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  border: 1px solid var(--border);
  word-break: break-word;
}

.chat-input-wrap {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}

.chat-name-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  margin-bottom: 8px;
  transition: var(--transition);
}

.chat-name-input:focus { outline: none; border-color: var(--secondary); }
.chat-name-input::placeholder { color: var(--text-muted); }

.chat-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  resize: none;
  height: 78px;
  transition: var(--transition);
  margin-bottom: 8px;
}

.chat-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.1);
}

.chat-textarea::placeholder { color: var(--text-muted); }

.chat-submit-btn {
  padding: 9px 22px;
  background: var(--secondary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  float: right;
}

.chat-submit-btn:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
}

.chat-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===================== BREADCRUMB ===================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--secondary); text-decoration: none; transition: var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-muted); }

/* ===================== IMAGE ZOOM OVERLAY ===================== */
.img-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  backdrop-filter: blur(8px);
}

.img-overlay.active { display: flex; }

.img-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: zoom-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoom-in {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease-out;
  max-width: 320px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===================== FOOTER ===================== */
.footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.footer-brand .logo-text {
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.footer-logo-text {
  background: linear-gradient(90deg, #ff6b9d, #ff9f43, #ffd93d, #6bcb77, #4d96ff, #c77dff, #ff6b9d);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: footer-shine 4s linear infinite;
  letter-spacing: 1px;
}

@keyframes footer-shine {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.footer-brand p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1400px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .card-detail-layout {
    grid-template-columns: 1fr;
  }
  .card-detail-left { position: static; }
  .card-detail-img-wrap { max-width: 300px; margin: 0 auto 16px; }
}

@media (max-width: 768px) {
  .navbar-inner { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 8px; }
  .navbar-search { order: 3; max-width: 100%; width: 100%; }
  .navbar-nav { margin-left: 0; gap: 2px; }
  .nav-icon-img { width: 52px; height: 52px; margin-top: -12px; }
  .nav-link { padding: 4px 10px; font-size: 0.68rem; gap: 3px; }
  .hero { padding: 40px 20px; }
  .set-grid { grid-template-columns: 1fr 1fr; }
  .ebay-price-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .set-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ebay-price-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.6rem; gap: 2px; }
  .hero-title-block { gap: 1px; }
  .hero-title-dot { margin: 0 3px; }
  .navbar-logo .logo-text { font-size: 0.82rem; gap: 0; }
  .logo-sep { margin: 0 1px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .latest-comment-wrap { max-width: 100%; }
  .lc-img-wrap { width: 44px; height: 60px; }
  .lc-card-name { font-size: 0.88rem; }
  .nav-icon-img { width: 44px; height: 44px; margin-top: -10px; }
  .nav-link { padding: 4px 8px; font-size: 0.62rem; }
}

/* ===================== UTILS ===================== */
.text-center { text-align: center; }
.clearfix::after { content: ''; display: table; clear: both; }

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
