/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090f;
  --surface: #111118;
  --surface2: #1a1a24;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.15);
  --text: #e8e8f0;
  --text-muted: #7a7a94;
  --text-dim: #555568;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --accent4: #f7971e;
  --accent5: #fc4a1a;

  /* Category colors */
  --cat-ai:      #6c63ff;
  --cat-note:    #43e97b;
  --cat-money:   #f7971e;
  --cat-global:  #38f9d7;
  --cat-anime:   #f953c6;
  --cat-health:  #4facfe;
  --cat-privacy: #fa709a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== Background Blobs ===== */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 20s ease-in-out infinite alternate;
}
.blob1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.15), transparent 70%);
  top: -200px; left: -200px;
  animation-duration: 22s;
}
.blob2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,101,132,0.10), transparent 70%);
  bottom: 10%; right: -150px;
  animation-duration: 18s;
}
.blob3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(67,233,123,0.08), transparent 70%);
  top: 50%; left: 40%;
  animation-duration: 25s;
}
@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 40px) scale(1.05); }
}

/* ===== Header ===== */
.header {
  position: relative;
  z-index: 10;
  padding: 48px 24px 0;
  max-width: 1200px;
  margin: 0 auto;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-icon {
  font-size: 36px;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.1);} }

.logo-title {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.date-badge {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
}
.update-time {
  font-size: 12px;
  color: var(--text-muted);
}

.header-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 28px;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 32px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-1px);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(108,99,255,0.35);
}
.filter-btn .cnt {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  margin-left: 4px;
}

/* ===== Main ===== */
.main {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ===== Cards Grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ===== Card ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.28s;
  border-radius: 20px;
}
.card:hover::before { opacity: 1; }

.card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* Category accent line */
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  transition: opacity 0.3s;
}

.card[data-cat="ai"]::after      { background: var(--cat-ai); }
.card[data-cat="note"]::after    { background: var(--cat-note); }
.card[data-cat="money"]::after   { background: var(--cat-money); }
.card[data-cat="global"]::after  { background: var(--cat-global); }
.card[data-cat="anime"]::after   { background: var(--cat-anime); }
.card[data-cat="health"]::after  { background: var(--cat-health); }
.card[data-cat="privacy"]::after { background: var(--cat-privacy); }

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
  flex-shrink: 0;
  margin-top: 3px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.tag-cat {
  background: rgba(108,99,255,0.15);
  color: var(--accent);
  border: 1px solid rgba(108,99,255,0.25);
}
.card[data-cat="ai"]     .tag-cat { background:rgba(108,99,255,.15);  color:var(--cat-ai);      border-color:rgba(108,99,255,.25); }
.card[data-cat="note"]   .tag-cat { background:rgba(67,233,123,.12);  color:var(--cat-note);    border-color:rgba(67,233,123,.2); }
.card[data-cat="money"]  .tag-cat { background:rgba(247,151,30,.12);  color:var(--cat-money);   border-color:rgba(247,151,30,.2); }
.card[data-cat="global"] .tag-cat { background:rgba(56,249,215,.12);  color:var(--cat-global);  border-color:rgba(56,249,215,.2); }
.card[data-cat="anime"]  .tag-cat { background:rgba(249,83,198,.12);  color:var(--cat-anime);   border-color:rgba(249,83,198,.2); }
.card[data-cat="health"] .tag-cat { background:rgba(79,172,254,.12);  color:var(--cat-health);  border-color:rgba(79,172,254,.2); }
.card[data-cat="privacy"].tag-cat { background:rgba(250,112,154,.12); color:var(--cat-privacy); border-color:rgba(250,112,154,.2); }

.tag-source {
  background: var(--surface2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* Card Title */
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  letter-spacing: -0.2px;
}

/* Card Why */
.card-why {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.card-region {
  font-size: 12px;
  color: var(--text-dim);
}

.card-signal {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
.signal-dots {
  display: flex;
  gap: 3px;
}
.signal-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}
.signal-dot.on { background: var(--accent3); }

.deepen-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(108,99,255,0.15);
  color: var(--accent);
  border: 1px solid rgba(108,99,255,0.25);
  letter-spacing: 0.3px;
  animation: glowPulse 2.5s ease-in-out infinite;
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 rgba(108,99,255,0); }
  50%      { box-shadow: 0 0 10px rgba(108,99,255,0.4); }
}

/* ===== Empty state ===== */
.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: 24px;
  padding: 36px;
  max-width: 580px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
}
.modal-close:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-num { font-size: 12px; color: var(--text-dim); font-weight: 700; letter-spacing: 1px; }
.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-title { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.3; letter-spacing: -0.3px; }

.modal-section { display: flex; flex-direction: column; gap: 8px; }
.modal-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.modal-section-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
}
.modal-section-body strong { color: var(--text); font-weight: 600; }

.modal-divider {
  border: none;
  border-top: 1px solid var(--border);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.modal-hint {
  font-size: 13px;
  color: var(--text-muted);
}
.modal-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 8px 16px;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 12px;
  transition: all 0.2s;
  white-space: nowrap;
}
.modal-link:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(108,99,255,0.4);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 2;
}

/* ===== Hidden state for filter ===== */
.card.hidden {
  display: none;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header { padding: 32px 16px 0; }
  .main { padding: 0 16px 60px; }
  .cards-grid { grid-template-columns: 1fr; gap: 14px; }
  .logo-title { font-size: 22px; }
  .header-desc { font-size: 13px; }
  .modal { padding: 24px 20px; border-radius: 20px; }
  .modal-title { font-size: 18px; }
  .filter-bar { gap: 6px; }
  .filter-btn { font-size: 12px; padding: 6px 12px; }
}

@media (max-width: 480px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
}
