:root {
    /* 深色基调：冷静、稳重 */
    --bg: #121418;
    --card: #1a1d23;
    --text: #e4e6eb;
    --muted: #9a9ea8;
    --accent: #9e3d56;
    --accent-hover: #b34a66;
    --border: #2f343d;
    --link: #8ab4f8;
    --link-hover: #a8c7fa;
    --input-bg: #22262e;
    --inset-bg: #161920;
    --table-head: #22262e;
}

html {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.site-header .inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.brand {
    text-decoration: none;
    color: inherit;
}

.brand-zh {
    display: block;
    font-weight: 700;
    font-size: 1rem;
}

.brand-en {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.site-header nav a {
    color: var(--link);
    text-decoration: none;
    font-size: 0.9rem;
}

.site-header nav a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.inline-form {
    display: inline;
    margin: 0;
}

.link-btn {
    background: none;
    border: none;
    color: var(--link);
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

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

main.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.cta-banner {
    background: linear-gradient(145deg, #1e2229 0%, var(--card) 45%, #181b22 100%);
    border: 1px solid rgba(158, 61, 86, 0.45);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.cta-title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.cta-body {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text);
}

[dir="rtl"] .cta-banner {
    text-align: right;
}

.hero {
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 1.35rem;
    margin: 0 0 0.35rem;
}

.hero p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* APP下载入口样式 */
.app-download {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.app-download h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    color: var(--accent);
}

.app-download p {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* 捐款支持区域样式 */
.donation-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.donation-section h2 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.donation-section p {
    margin: 0 0 1rem;
    line-height: 1.6;
}

.donation-qr {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.donation-qr img {
    border: 4px solid white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.download-button {
    display: inline-block;
    background: var(--accent);
    color: #f0f2f5;
    text-decoration: none;
    padding: 0.65rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.download-button:hover {
    background: var(--accent-hover);
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.search-bar input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
}

.search-bar input[type="search"]::placeholder {
    color: var(--muted);
}

.captcha-img {
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
}

button.primary, .search-bar button {
    background: var(--accent);
    color: #f0f2f5;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

button.primary:hover, .search-bar button:hover {
    filter: brightness(1.08);
}

button.secondary {
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
}

button.secondary:hover {
    background: #2a303a;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.count-pill {
    display: inline-block;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.case-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
}

.case-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.case-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.evidence-count {
    font-weight: 600;
    color: var(--accent);
}

.evidence-block {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
    font-size: 0.88rem;
}

.evidence-attachment {
    margin-top: 0.35rem;
}

.evidence-inline-img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-top: 0.35rem;
    border: 1px solid var(--border);
}

.evidence-inline-video,
.evidence-inline-audio {
    display: block;
    max-width: 100%;
    margin-top: 0.35rem;
}

.evidence-file-link {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
}

.evidence-block pre, .jd-text {
    white-space: pre-wrap;
    background: var(--inset-bg);
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 4px;
    max-height: 200px;
    overflow: auto;
    margin: 0.35rem 0 0;
    color: var(--text);
}

.form-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

.form-row {
    margin-bottom: 1rem;
}

.form-row label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-row input[type="text"],
.form-row input[type="password"],
.form-row textarea,
.form-row select {
    width: 100%;
    max-width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
    background: var(--input-bg);
    color: var(--text);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--muted);
}

.form-row textarea {
    min-height: 80px;
    resize: vertical;
}

.field-error {
    color: #f87171;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.evidence-slot {
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 0.85rem;
    margin-bottom: 0.85rem;
    background: var(--inset-bg);
}

.evidence-slot h3 {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.alert {
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(22, 101, 52, 0.22);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(127, 29, 29, 0.25);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.admin-table th, .admin-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--table-head);
    color: var(--text);
    font-weight: 600;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.login-box {
    max-width: 360px;
    margin: 2rem auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

.lang-switcher {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
    line-height: 1.6;
}

[dir="rtl"] .lang-switcher {
    text-align: right;
}

.lang-switcher-label {
    font-weight: 600;
    margin-right: 0.35rem;
}

[dir="rtl"] .lang-switcher-label {
    margin-right: 0;
    margin-left: 0.35rem;
}

.lang-switcher-links {
    display: inline;
}

.lang-switcher a {
    color: var(--link);
    text-decoration: none;
    white-space: nowrap;
}

.lang-switcher a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.lang-sep {
    color: var(--muted);
    margin: 0 0.15rem;
}

.attacker-feed {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.attacker-feed-title {
    font-size: 1rem;
    margin: 0 0 0.35rem;
}

.attacker-feed-sub {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    line-height: 1.55;
}

.attacker-feed-empty {
    padding: 1rem;
    font-size: 0.9rem;
}

.attacker-feed-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
}

.attacker-feed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.attacker-feed-table th,
.attacker-feed-table td {
    padding: 0.5rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.attacker-feed-table th {
    background: var(--table-head);
    font-weight: 600;
    color: var(--text);
}

.attacker-feed-table tbody tr:last-child td {
    border-bottom: none;
}

.attacker-feed-table .mono {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.78rem;
}

/* ===== Android 风格案例列表 ===== */
.case-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.case-list li {
    display: block;
    width: 100%;
}

.case-item-link {
    display: flex;
    align-items: stretch;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.case-item-link:hover {
    border-color: var(--accent);
    background: #1e2229;
}

/* 左侧高亮竖线 */
.case-item-bar {
    width: 3px;
    flex-shrink: 0;
    background: var(--accent);
}

/* 主内容区 */
.case-item-body {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 0.75rem 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.case-item-company {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-item-brands {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

.case-item-oem {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.case-item-date {
    font-size: 0.72rem;
    color: var(--muted);
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 右侧证据入口 */
.case-item-evidence {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.75rem 0.9rem;
    background: #1e2229;
    border-left: 1px solid var(--border);
    flex-shrink: 0;
    min-width: 56px;
}

.case-item-badge {
    display: inline-block;
    background: var(--accent);
    color: #f0f2f5;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    line-height: 1.4;
    text-align: center;
}

.case-item-evidence-label {
    font-size: 0.68rem;
    color: var(--accent);
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
}

.case-item-arrow {
    font-size: 1rem;
    color: var(--accent);
    line-height: 1;
}

/* ===== 公开详情页 ===== */
.detail-title-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.detail-accent-bar {
    width: 4px;
    flex-shrink: 0;
    background: var(--accent);
}

.detail-title-content {
    padding: 1rem 1.1rem;
    flex: 1;
    min-width: 0;
}

.detail-company {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.detail-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.detail-evidence-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 0.75rem;
    letter-spacing: 0.04em;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.detail-evidence-card {
    margin-bottom: 0.75rem;
}

.detail-evidence-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

.detail-evidence-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    background: var(--accent);
    color: #f0f2f5;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
