/* ============================================================
   赢政财经 — Markets Module CSS
   Builds on top of /assets/css/style.css (main site shared CSS)
   Only markets-specific styles here
   ============================================================ */

/* ── Hero ────────────────────────────────────────── */
.mkts-hero {
    text-align: center;
    padding: 3rem 0 2.5rem;
}
.mkts-hero__badge {
    display: inline-block;
    padding: .2rem .75rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(212,162,76,.12);
    color: var(--gold);
    margin-bottom: 1rem;
}
.mkts-hero__title {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light, #e8b85c));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .3rem;
}
.mkts-hero__sub {
    font-size: 1.05rem;
    color: var(--text, #f0ece6);
    margin-bottom: .5rem;
}
.mkts-hero__desc {
    font-size: .92rem;
    color: var(--muted, #a8a29e);
    max-width: 560px;
    margin: 0 auto .3rem;
}
.mkts-hero__extra {
    font-size: .85rem;
    color: #78716c;
    margin-bottom: 1.5rem;
}
.mkts-hero__cta {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.mkts-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.2rem;
    border-radius: 8px;
    font-size: .88rem;
    cursor: pointer;
    border: 1px solid var(--border-light, #252530);
    color: var(--muted, #a8a29e);
    background: transparent;
    transition: all .2s;
    text-decoration: none;
}
.mkts-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.mkts-btn--primary {
    background: linear-gradient(135deg, var(--gold, #d4a24c), #e8b85c);
    color: #000;
    font-weight: 600;
    border: none;
}
.mkts-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212,162,76,.3);
    color: #000;
}
.mkts-trust {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: .78rem;
    color: #78716c;
}
.mkts-trust span::before {
    content: '·';
    margin-right: .4rem;
    color: var(--gold, #d4a24c);
}
.mkts-trust span:first-child::before { display: none; }

/* ── Section ─────────────────────────────────────── */
.mkts-section {
    padding: 2.5rem 0;
}
.mkts-section--alt {
    background: rgba(15,15,18,.5);
    border-top: 1px solid var(--border, #1a1a1f);
    border-bottom: 1px solid var(--border, #1a1a1f);
    margin: 0 -1.25rem;
    padding: 2.5rem 1.25rem;
}
.mkts-section__hd {
    margin-bottom: 1.5rem;
}
.mkts-section__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.mkts-section__title i {
    color: var(--gold, #d4a24c);
    font-size: .95rem;
}
.mkts-section__desc {
    font-size: .85rem;
    color: var(--muted, #a8a29e);
}

/* ── Grid ────────────────────────────────────────── */
.mkts-grid {
    display: grid;
    gap: 1rem;
}
.mkts-grid--3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.mkts-grid--2 { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
.mkts-grid--4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ── Card ────────────────────────────────────────── */
.mkts-card {
    background: var(--card, #0f0f12);
    border: 1px solid var(--border, #1a1a1f);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all .2s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.mkts-card:hover {
    background: var(--card-hover, #141418);
    border-color: var(--border-light, #252530);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.mkts-card__hd {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .6rem;
    gap: .5rem;
}
.mkts-card__hd-left { min-width: 0; flex: 1; }
.mkts-card__ticker { font-size: 1.1rem; font-weight: 700; letter-spacing: .3px; }
.mkts-card__name { font-size: .76rem; color: var(--muted, #a8a29e); margin-top: .1rem; }
.mkts-card__badges { display: flex; gap: .35rem; align-items: center; flex-shrink: 0; }
.mkts-card__body { font-size: .85rem; color: var(--muted, #a8a29e); line-height: 1.6; }
.mkts-card__meta { display: flex; gap: .6rem; margin-top: .65rem; flex-wrap: wrap; font-size: .76rem; color: #78716c; align-items: center; }

/* ── Direction Badges ────────────────────────────── */
.mkts-dir { display: inline-block; padding: .15rem .55rem; border-radius: 5px; font-size: .73rem; font-weight: 600; }
.mkts-dir--bullish { background: rgba(34,197,94,.14); color: #22c55e; }
.mkts-dir--lean_bullish { background: rgba(134,239,172,.1); color: #86efac; }
.mkts-dir--mixed { background: rgba(156,163,175,.12); color: #9ca3af; }
.mkts-dir--lean_bearish { background: rgba(252,165,165,.1); color: #fca5a5; }
.mkts-dir--bearish { background: rgba(239,68,68,.14); color: #ef4444; }

/* ── Grade Badges ────────────────────────────────── */
.mkts-grade { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: .68rem; font-weight: 700; }
.mkts-grade--A { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #000; }
.mkts-grade--B { background: linear-gradient(135deg, #6b7280, #9ca3af); color: #fff; }
.mkts-grade--C { background: linear-gradient(135deg, #92400e, #cd7f32); color: #fff; }

/* ── Severity Badges ─────────────────────────────── */
.mkts-sev { display: inline-block; padding: .12rem .45rem; border-radius: 4px; font-size: .7rem; font-weight: 700; }
.mkts-sev--S1 { background: rgba(59,130,246,.14); color: #3b82f6; }
.mkts-sev--S2 { background: rgba(234,179,8,.14); color: #eab308; }
.mkts-sev--S3 { background: rgba(249,115,22,.14); color: #f97316; }
.mkts-sev--S4 { background: rgba(239,68,68,.14); color: #ef4444; }
.mkts-sev--S5 { background: rgba(153,27,27,.2); color: #fca5a5; }

/* ── Tags ────────────────────────────────────────── */
.mkts-tag { display: inline-block; padding: .1rem .4rem; border-radius: 4px; font-size: .7rem; background: rgba(212,162,76,.08); color: var(--gold, #d4a24c); }
.mkts-tf { display: inline-block; padding: .08rem .35rem; border-radius: 3px; font-size: .68rem; background: rgba(59,130,246,.08); color: #3b82f6; }
.mkts-status { display: inline-block; padding: .1rem .4rem; border-radius: 4px; font-size: .68rem; font-weight: 600; }
.mkts-status--confirmed { background: rgba(34,197,94,.12); color: #22c55e; }
.mkts-status--fermenting { background: rgba(249,115,22,.12); color: #f97316; }
.mkts-status--disputed { background: rgba(168,85,247,.12); color: #a855f7; }

/* ── Detail Panel ────────────────────────────────── */
.mkts-detail { max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; }
.mkts-detail.open { max-height: 4000px; padding-top: 1rem; }
.mkts-detail__inner { border-top: 1px solid var(--border, #1a1a1f); padding-top: 1rem; }
.mkts-detail__sec { margin-bottom: 1rem; }
.mkts-detail__label { font-size: .76rem; font-weight: 600; color: var(--gold, #d4a24c); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .5px; }
.mkts-detail__text { font-size: .84rem; color: var(--muted, #a8a29e); line-height: 1.6; }

/* ── Evidence List ───────────────────────────────── */
.mkts-ev-list { list-style: none; padding: 0; }
.mkts-ev-item { padding: .7rem; margin-bottom: .5rem; background: rgba(255,255,255,.015); border: 1px solid var(--border, #1a1a1f); border-radius: 8px; border-left: 3px solid var(--border, #1a1a1f); }
.mkts-ev-item[data-grade="A"] { border-left-color: #f59e0b; }
.mkts-ev-item[data-grade="B"] { border-left-color: #9ca3af; }
.mkts-ev-item[data-grade="C"] { border-left-color: #cd7f32; }
.mkts-ev-stmt { font-size: .84rem; margin-bottom: .3rem; }
.mkts-ev-meta { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .73rem; color: #78716c; }
.mkts-ev-src { color: #3b82f6; text-decoration: underline; text-decoration-color: rgba(59,130,246,.3); }
.mkts-ev-src:hover { color: var(--gold, #d4a24c); }
.mkts-ev-counter { font-size: .76rem; color: #78716c; font-style: italic; margin-top: .25rem; padding-left: .5rem; border-left: 2px solid var(--border, #1a1a1f); }

/* ── Impact Chain ────────────────────────────────── */
.mkts-chain { padding: .7rem; margin-bottom: .5rem; background: rgba(255,255,255,.015); border-left: 3px solid var(--border, #1a1a1f); border-radius: 0 8px 8px 0; }
.mkts-chain--bullish { border-left-color: #22c55e; }
.mkts-chain--bearish { border-left-color: #ef4444; }
.mkts-chain__hd { font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mkts-chain__path { font-size: .8rem; color: var(--muted, #a8a29e); margin-top: .25rem; }
.mkts-chain__etf { font-size: .76rem; color: #3b82f6; margin-top: .15rem; }
.mkts-chain__counter { font-size: .76rem; color: #78716c; font-style: italic; margin-top: .25rem; padding-left: .5rem; border-left: 2px solid var(--border, #1a1a1f); }

/* ── Community Buttons ───────────────────────────── */
.mkts-correct { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .75rem; }
.mkts-correct button { background: var(--bg, #08080a); border: 1px solid var(--border, #1a1a1f); color: var(--muted, #a8a29e); padding: .3rem .6rem; border-radius: 6px; font-size: .73rem; cursor: pointer; transition: all .15s; font-family: inherit; }
.mkts-correct button:hover { border-color: var(--gold, #d4a24c); color: var(--gold, #d4a24c); }

/* ── Modal ───────────────────────────────────────── */
.mkts-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000; align-items: center; justify-content: center; }
.mkts-overlay.open { display: flex; }
.mkts-modal { background: var(--card, #0f0f12); border: 1px solid var(--border, #1a1a1f); border-radius: 12px; padding: 1.5rem; max-width: 460px; width: 90%; }
.mkts-modal h3 { font-size: 1rem; margin-bottom: 1rem; }
.mkts-modal textarea, .mkts-modal input[type="url"] { width: 100%; background: var(--bg, #08080a); border: 1px solid var(--border, #1a1a1f); color: var(--text, #f0ece6); border-radius: 8px; padding: .65rem .75rem; font-size: .84rem; font-family: inherit; }
.mkts-modal textarea { resize: vertical; min-height: 80px; margin-top: .5rem; }
.mkts-modal-actions { display: flex; gap: .75rem; margin-top: 1rem; justify-content: flex-end; }

/* ── Why Cards ───────────────────────────────────── */
.mkts-why { background: var(--card, #0f0f12); border: 1px solid var(--border, #1a1a1f); border-radius: 12px; padding: 1.5rem 1rem; text-align: center; }
.mkts-why h4 { font-size: .92rem; margin-bottom: .4rem; }
.mkts-why p { font-size: .8rem; color: var(--muted, #a8a29e); line-height: 1.5; }

/* ── Disclaimer ──────────────────────────────────── */
.mkts-disclaimer { padding: 2rem 0; border-top: 1px solid var(--border, #1a1a1f); margin-top: 1rem; text-align: center; }
.mkts-disclaimer p { font-size: .73rem; color: #78716c; line-height: 1.6; max-width: 700px; margin: 0 auto .5rem; }
.mkts-disclaimer__slogan { font-size: .82rem !important; color: var(--muted, #a8a29e) !important; }
.mkts-disclaimer__sub { font-size: .7rem !important; }

/* ── Legend ───────────────────────────────────────── */
.mkts-legend { margin-top: 1.25rem; padding: .75rem 1rem; background: var(--card, #0f0f12); border: 1px solid var(--border, #1a1a1f); border-radius: 8px; font-size: .76rem; color: #78716c; line-height: 1.8; }
.mkts-legend strong { color: var(--muted, #a8a29e); }

/* ── Loading / Empty ─────────────────────────────── */
.mkts-loading { text-align: center; padding: 2.5rem; color: #78716c; font-size: .85rem; }
.mkts-spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border, #1a1a1f); border-top-color: var(--gold, #d4a24c); border-radius: 50%; animation: mkts-spin .6s linear infinite; margin-right: .5rem; vertical-align: middle; }
@keyframes mkts-spin { to { transform: rotate(360deg); } }
.mkts-empty { text-align: center; padding: 2rem; font-size: .85rem; color: #78716c; line-height: 1.6; }

/* ── Toast ───────────────────────────────────────── */
.mkts-toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--card, #0f0f12); border: 1px solid var(--gold, #d4a24c); color: var(--text, #f0ece6); padding: .65rem 1.1rem; border-radius: 8px; font-size: .84rem; z-index: 2000; opacity: 0; transform: translateY(8px); transition: all .3s; pointer-events: none; }
.mkts-toast.show { opacity: 1; transform: translateY(0); }

/* ── Add markets nav item to shared header ────────── */
.header-nav__link[href="/markets/"] { color: var(--gold, #d4a24c) !important; }

/* ── Lookup Form ─────────────────────────────────── */
.mkts-lookup-form { display: flex; gap: .65rem; align-items: stretch; flex-wrap: wrap; }
.mkts-lookup-select, .mkts-lookup-input { background: var(--bg, #08080a); border: 1px solid var(--border, #1a1a1f); color: var(--text, #f0ece6); padding: .6rem .75rem; border-radius: 8px; font-size: .88rem; font-family: inherit; }
.mkts-lookup-select { min-width: 150px; }
.mkts-lookup-select--sm { min-width: 90px; }
.mkts-lookup-select option[disabled] { color: #555; }
.mkts-lookup-input-wrap { position: relative; flex: 1; min-width: 200px; }
.mkts-lookup-input { width: 100%; }
.mkts-autocomplete { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--card, #0f0f12); border: 1px solid var(--border-light, #252530); border-radius: 0 0 8px 8px; z-index: 50; max-height: 240px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.mkts-autocomplete.open { display: block; }
.mkts-ac-item { padding: .5rem .75rem; cursor: pointer; font-size: .84rem; border-bottom: 1px solid rgba(255,255,255,.03); }
.mkts-ac-item:hover { background: rgba(212,162,76,.08); }
.mkts-ac-item .mkts-ac-ticker { font-weight: 600; margin-right: .4rem; }
.mkts-ac-item .mkts-ac-name { color: var(--muted, #a8a29e); font-size: .78rem; }

/* ── Lookup Report ───────────────────────────────── */
.mkts-report { margin-top: 1.25rem; background: var(--card, #0f0f12); border: 1px solid var(--border, #1a1a1f); border-radius: 12px; overflow: hidden; }
.mkts-report__hd { padding: 1.25rem; border-bottom: 1px solid var(--border, #1a1a1f); }
.mkts-report__ticker { font-size: 1.2rem; font-weight: 700; }
.mkts-report__meta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .4rem; font-size: .78rem; color: #78716c; align-items: center; }
.mkts-report__summary { padding: 1rem 1.25rem; font-size: .9rem; line-height: 1.7; color: var(--text, #f0ece6); border-bottom: 1px solid var(--border, #1a1a1f); }
.mkts-report__sec { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border, #1a1a1f); }
.mkts-report__sec:last-child { border-bottom: none; }
.mkts-report__sec-title { font-size: .8rem; font-weight: 600; color: var(--gold, #d4a24c); margin-bottom: .5rem; }
.mkts-report__history { display: flex; flex-direction: column; gap: .3rem; }
.mkts-report__history-row { display: flex; gap: .75rem; font-size: .8rem; align-items: center; }
.mkts-report__history-date { color: #78716c; min-width: 70px; }
.mkts-report__risk { padding: 1rem 1.25rem; background: rgba(255,255,255,.02); font-size: .76rem; color: #78716c; line-height: 1.5; }
.mkts-report__coming { padding: 2rem; text-align: center; }
.mkts-report__coming h3 { font-size: 1rem; margin-bottom: .5rem; }
.mkts-report__coming p { font-size: .85rem; color: var(--muted, #a8a29e); }
.mkts-report__candidates { list-style: none; padding: 0; margin-top: .75rem; }
.mkts-report__candidates li { padding: .5rem .75rem; cursor: pointer; border: 1px solid var(--border, #1a1a1f); border-radius: 6px; margin-bottom: .4rem; font-size: .85rem; transition: all .15s; }
.mkts-report__candidates li:hover { border-color: var(--gold, #d4a24c); background: rgba(212,162,76,.05); }
.mkts-lookup-loading { text-align: center; padding: 2rem; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .mkts-grid--3, .mkts-grid--2 { grid-template-columns: 1fr; }
    .mkts-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .mkts-hero__title { font-size: 1.6rem; }
    .mkts-section--alt { margin: 0 -.75rem; padding: 2rem .75rem; }
    .mkts-lookup-form { flex-direction: column; }
    .mkts-lookup-select, .mkts-lookup-input-wrap { min-width: auto; }
}
@media (max-width: 480px) {
    .mkts-grid--4 { grid-template-columns: 1fr; }
    .mkts-card { padding: 1rem; }
    .mkts-card__hd { flex-direction: column; gap: .4rem; }
    .mkts-hero__cta { flex-direction: column; align-items: center; }
}
