:root {
  --bg: #09111f;
  --bg-soft: rgba(14, 22, 40, 0.72);
  --panel: rgba(15, 23, 42, 0.62);
  --border: rgba(148, 163, 184, 0.18);
  --text: #eef2ff;
  --muted: #9fb0d1;
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --success: #22c55e;
  --shadow: 0 18px 60px rgba(2, 6, 23, 0.36);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; }

.aurora, .noise { position: fixed; inset: 0; pointer-events: none; }
.aurora-a { background: radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.45), transparent 34%), radial-gradient(circle at 40% 80%, rgba(236, 72, 153, 0.22), transparent 28%); }
.aurora-b { background: radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.3), transparent 32%), radial-gradient(circle at 70% 70%, rgba(34, 197, 94, 0.18), transparent 30%); }
.noise { opacity: 0.05; background-image: radial-gradient(rgba(255,255,255,.4) 1px, transparent 1px); background-size: 16px 16px; }

.shell { position: relative; z-index: 1; max-width: 1560px; margin: 0 auto; padding: 24px; }
.glass-panel { background: var(--panel); backdrop-filter: blur(16px); border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero { border-radius: 28px; padding: 28px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 18px; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 18px 60px rgba(0,0,0,.5), 0 0 110px rgba(124,58,237,.26); }
.eyebrow { font-size: 12px; letter-spacing: 0.22em; color: var(--accent-2); text-transform: uppercase; }
.hero h1 { margin: 8px 0 10px; font-size: 52px; line-height: 1.02; text-shadow: 0 0 26px rgba(124,58,237,.58), 0 0 54px rgba(6,182,212,.32); }
.subtext { margin: 0; color: var(--muted); max-width: 620px; font-size: 16px; }
.hero-actions { display: grid; grid-template-columns: minmax(300px, 420px) auto auto; gap: 12px; align-items: center; }
.search-box { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.search-box input { height: 48px; border-radius: 14px; border: 1px solid var(--border); outline: none; padding: 0 16px; background: rgba(255,255,255,0.04); color: var(--text); }
.primary-btn, .secondary-btn, .close-btn { border: 0; cursor: pointer; }
.primary-btn, .secondary-btn { height: 48px; padding: 0 18px; border-radius: 14px; font-weight: 700; }
.primary-btn { background: linear-gradient(135deg, #7c3aed, #06b6d4, #22c55e); color: #fff; box-shadow: 0 0 32px rgba(124,58,237,.45); }
.secondary-btn { background: rgba(124, 58, 237, 0.2); color: var(--text); border: 1px solid var(--border); box-shadow: 0 0 20px rgba(6,182,212,.18) inset; }
.search-section { border-radius: 24px; padding: 20px; margin-bottom: 18px; }
.hidden { display: none !important; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.meta-text { color: var(--muted); font-size: 14px; }
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.search-card { border-radius: 18px; padding: 16px; }
.search-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.search-card h3 { margin: 0; }
.search-card span { color: var(--muted); font-size: 13px; }
.search-list { display: grid; gap: 8px; }
.search-list a { display: grid; grid-template-columns: 24px 1fr; gap: 8px; text-decoration: none; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.04); }
.empty-search { padding: 30px 10px; text-align: center; color: var(--muted); }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.board-card { border-radius: 22px; overflow: hidden; min-height: 430px; box-shadow: 0 10px 32px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.04); }
.board-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 14px; border-bottom: 1px solid var(--border); }
.board-title-row { display: flex; align-items: center; gap: 10px; }
.source-icon { width: 26px; height: 26px; border-radius: 7px; object-fit: contain; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.board-header h3 { margin: 0 0 5px; font-size: 17px; font-weight: 700; }
.source-name.colored-name { color: var(--name-color, #fff); text-shadow: 0 0 10px var(--name-color, transparent), 0 0 24px color-mix(in srgb, var(--name-color, transparent) 50%, transparent); animation: nameGlow 2.4s ease-in-out infinite alternate; }
@keyframes nameGlow { from { text-shadow: 0 0 6px var(--name-color, transparent); opacity: .9; } to { text-shadow: 0 0 18px var(--name-color, transparent), 0 0 36px color-mix(in srgb, var(--name-color, transparent) 55%, transparent); opacity: 1; } }
.board-header p { margin: 0; color: var(--muted); font-size: 12px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 18px var(--success); }
.board-list { padding: 10px; max-height: none; overflow: hidden; }
.board-actions { padding: 0 12px 12px; }
.board-more-btn { width: 100%; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: rgba(124,58,237,.2); color: var(--text); font-weight: 700; cursor: pointer; }
.board-more-btn:disabled { opacity: .75; cursor: default; }
.board-card.expanded .board-list { max-height: 360px; overflow-y: auto; }
.board-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; text-decoration: none; border-radius: 14px; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.board-item:hover { transform: translateY(-2px); background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); }
.rank { width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; }
.rank-1 { background: #ef4444; }
.rank-2 { background: #f97316; }
.rank-3 { background: #f59e0b; }
.rank-normal { background: rgba(148, 163, 184, 0.42); }
.title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.hot { font-size: 13px; color: var(--muted); font-weight: 700; }
.empty-state { padding: 20px; text-align: center; color: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.65); backdrop-filter: blur(6px); }
.modal-panel { position: relative; width: min(1120px, calc(100vw - 32px)); height: min(86vh, 720px); border-radius: 28px; padding: 24px; overflow: hidden; display: grid; grid-template-rows: auto 150px minmax(0, 1fr); gap: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 90px rgba(0,0,0,.55), 0 0 120px rgba(124,58,237,.3); }
.close-btn { position: absolute; right: 18px; top: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--text); font-size: 24px; }
.modal-head { margin-bottom: 0; }
.modal-head h2 { margin: 10px 0 8px; font-size: 32px; }
.analysis-summary { margin: 0; color: var(--muted); }
.spiral-stage { position: relative; height: 150px; border-radius: 18px; border: 1px solid var(--border); background: radial-gradient(circle at 50% 45%, rgba(124,58,237,0.24), transparent 42%), radial-gradient(circle at 20% 80%, rgba(236,72,153,.2), transparent 28%), rgba(255,255,255,0.03); overflow: hidden; }
.spiral-cloud { position: absolute; inset: 0; }
.spiral-token { position: absolute; transform: translate(-50%, -50%) scale(.2); opacity: 0; color: #fff; text-shadow: 0 0 16px rgba(6,182,212,.4), 0 0 30px rgba(124,58,237,.28); animation: spiralIn .9s ease forwards, tokenPulse 1.6s ease-in-out infinite alternate; z-index: 2; white-space: nowrap; line-height: 1; }
.flux-number { position: absolute; color: rgba(255,255,255,.16); font-weight: 900; letter-spacing: .04em; pointer-events: none; mix-blend-mode: screen; text-shadow: 0 0 18px rgba(124,58,237,.38), 0 0 30px rgba(6,182,212,.24); animation: numberBlast 2.2s cubic-bezier(.2,.7,.2,1) infinite; z-index: 1; }
.spiral-token em { font-style: normal; font-size: .72em; color: rgba(6,182,212,.92); margin-left: 3px; letter-spacing: .02em; text-shadow: 0 0 10px rgba(6,182,212,.7); }
.analysis-overlay { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; font-weight: 700; background: linear-gradient(180deg, rgba(2,6,23,.08), rgba(2,6,23,.45)); }
.analysis-results { margin-top: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow-y: auto; padding-right: 6px; min-height: 0; align-content: start; }
.result-card { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: start; padding: 10px; border-radius: 14px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.result-score { font-size: 14px; font-weight: 900; color: var(--accent-2); line-height: 1.1; }
.result-card h3 { margin: 0 0 4px; font-size: 13px; line-height: 1.2; }
.result-card p { margin: 0 0 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.result-card small { color: var(--muted); font-size: 10px; line-height: 1.25; }
@keyframes spiralIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-20deg); } to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } }
@keyframes tokenPulse { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(35deg); } }
@keyframes numberBlast {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-16deg); }
  15% { opacity: .72; }
  70% { opacity: .3; transform: translate(-50%, -50%) scale(1.08) rotate(12deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3) rotate(28deg); }
}
@media (max-width: 1100px) { .hero { display: grid; } .hero-actions { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .shell { padding: 16px; } .hero h1 { font-size: 34px; } .hero-actions { grid-template-columns: 1fr; } .modal-panel { height: 90vh; grid-template-rows: auto 120px minmax(0, 1fr); } .spiral-stage { height: 120px; } .analysis-results { grid-template-columns: 1fr; } .result-card { grid-template-columns: 1fr; } }
