/* ---------------------------------------------------------
   WSRC · 站点自定义样式（配合 Tailwind 使用）
   --------------------------------------------------------- */

:root {
    --ink: #070c09;
    --ink-2: #0f1a13;
    --paper: #070c09;
    --brand: #4ade80;
    --flame: #34d058;
    --gold: #6ee7a0;

    /* 黑绿主题新增令牌 */
    --bg: #070c09;
    --surface: #0b120d;
    --surface-2: #0f1a13;
    --surface-3: #16241a;
    --line: #1e3325;
    --line-soft: #16241a;
    --text: #e7f2ea;
    --muted: #93a99b;
    --on-accent: #04120a;
}

html {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-feature-settings: "ss01" on, "tnum" on;
}

::selection {
    background: rgba(52, 208, 88, 0.25);
    color: #070c09;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #0d1710;
}
::-webkit-scrollbar-thumb {
    background: #2a4034;
    border-radius: 999px;
    border: 2px solid #0d1710;
}
::-webkit-scrollbar-thumb:hover {
    background: #3a5142;
}

/* ----------------- 首页 Hero ----------------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(52, 208, 88, 0.20), transparent 62%),
        radial-gradient(800px 400px at 80% 20%, rgba(52, 208, 88, 0.08), transparent 65%),
        linear-gradient(180deg, #070c09 0%, #0a1410 55%, #070c09 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
    opacity: 0.7;
}

/* 地球 / 经纬球 */
.globe {
    position: absolute;
    left: 50%;
    top: 52%;
    width: min(780px, 92vw);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(52, 208, 88, 0.22) 0%, rgba(7, 12, 9, 0) 62%),
        radial-gradient(circle at 50% 50%, rgba(52, 208, 88, 0.10) 0%, transparent 45%);
    box-shadow: inset 0 0 120px rgba(52, 208, 88, 0.08);
}

.globe::before,
.globe::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.globe::after {
    inset: 12%;
    border-color: rgba(52, 208, 88, 0.14);
}

.globe-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(110, 231, 160, 0.16);
    transform: rotateX(72deg);
    animation: globe-spin 24s linear infinite;
}

.globe-ring::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid rgba(52, 208, 88, 0.18);
    transform: rotate(60deg);
}

.globe-ring-2 {
    animation-duration: 36s;
    animation-direction: reverse;
    border-color: rgba(52, 208, 88, 0.12);
}

.globe-ring-3 {
    inset: 18%;
    animation-duration: 18s;
    border-color: rgba(255, 255, 255, 0.08);
}

@keyframes globe-spin {
    from { transform: rotateX(72deg) rotateZ(0deg); }
    to   { transform: rotateX(72deg) rotateZ(360deg); }
}

/* 星点 */
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.5;
    animation: twinkle 4s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.star-lg {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 10px rgba(52, 208, 88, 0.7);
    background: #bff7d0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.8); }
    50%      { opacity: 0.9; transform: scale(1.15); }
}

.hero-title {
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
    letter-spacing: 0.14em;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.hero-glow {
    background: radial-gradient(ellipse at center, rgba(52, 208, 88, 0.18) 0%, transparent 70%);
    filter: blur(20px);
}

/* 印章元素 */
.seal {
    font-family: "Noto Serif SC", "Songti SC", serif;
    background: linear-gradient(160deg, #2bb34a 0%, #1f9d47 100%);
    box-shadow: 0 8px 30px rgba(31, 157, 71, 0.35);
}

/* ----------------- 通用动画 ----------------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .globe-ring,
    .star {
        animation: none !important;
        transition: none !important;
        opacity: 1;
        transform: none;
    }
}

/* ----------------- 正文排版 ----------------- */
.prose-wsrc {
    color: #c3d6c9;
    font-size: 16px;
    line-height: 1.95;
    word-break: break-word;
}

.prose-wsrc > * + * {
    margin-top: 1.15em;
}

.prose-wsrc h2 {
    margin-top: 2.2em;
    margin-bottom: 0.6em;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #e7f2ea;
    padding-left: 0.7rem;
    border-left: 3px solid var(--flame);
    line-height: 1.5;
}

.prose-wsrc h3 {
    margin-top: 1.8em;
    margin-bottom: 0.5em;
    font-size: 1.12rem;
    font-weight: 600;
    color: #e7f2ea;
}

.prose-wsrc p {
    margin: 1em 0;
}

.prose-wsrc a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(52, 208, 88, 0.3);
}

.prose-wsrc strong {
    color: #e7f2ea;
    font-weight: 600;
}

.prose-wsrc ul,
.prose-wsrc ol {
    margin: 1em 0;
    padding-left: 1.4em;
}

.prose-wsrc ul { list-style: disc; }
.prose-wsrc ol { list-style: decimal; }
.prose-wsrc li { margin: 0.4em 0; }
.prose-wsrc li::marker { color: var(--flame); }

.prose-wsrc blockquote {
    margin: 1.5em 0;
    padding: 1rem 1.25rem;
    border-left: 3px solid rgba(52, 208, 88, 0.5);
    background: #0f1a13;
    color: #a9bfb0;
    border-radius: 0 8px 8px 0;
}

.prose-wsrc img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5em auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.prose-wsrc table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 14px;
}

.prose-wsrc th,
.prose-wsrc td {
    border: 1px solid #1e3325;
    padding: 0.6rem 0.75rem;
    text-align: left;
}

.prose-wsrc th {
    background: #0f1a13;
    font-weight: 600;
    color: #e7f2ea;
}

.prose-wsrc hr {
    margin: 2em 0;
    border: none;
    border-top: 1px dashed #2a4034;
}

.prose-wsrc code {
    background: #16241a;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    color: #4ade80;
}

/* ----------------- 表单 ----------------- */
/* 宽度默认撑满，但允许 w-* 工具类覆盖（:where 权重为 0） */
:where(.field, .field-dark) {
    width: 100%;
}

.field {
    border-radius: 0.6rem;
    border: 1px solid var(--line);
    background: #0b120d;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    color: #e7f2ea;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
}

.field::placeholder {
    color: #5f7768;
}

/* 文件选择框：统一按钮样式，避免深色底上出现系统白块 */
input[type="file"] {
    padding: 0.42rem 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 0.7rem;
    padding: 0.34rem 0.85rem;
    border: 0;
    border-radius: 0.45rem;
    background: var(--flame);
    color: var(--on-accent);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: filter 0.18s;
}

input[type="file"]::file-selector-button:hover {
    filter: brightness(1.08);
}

.field:focus {
    border-color: rgba(52, 208, 88, 0.55);
    box-shadow: 0 0 0 3px rgba(52, 208, 88, 0.12);
}

.field-dark {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
}

.field-dark::placeholder {
    color: #7d9486;
}

.field-dark:focus {
    border-color: rgba(52, 208, 88, 0.6);
    box-shadow: 0 0 0 3px rgba(52, 208, 88, 0.14);
}

.label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #a9bfb0;
}

/* ----------------- 卡片 ----------------- */
.card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

.card-hover {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s, border-color 0.35s;
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 208, 88, 0.35);
    box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(52, 208, 88, 0.12);
}

/* 斜纹背景 */
.pattern-lines {
    background-image: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.035) 0,
        rgba(0, 0, 0, 0.035) 1px,
        transparent 1px,
        transparent 9px
    );
}

/* 顶部导航下拉 */
[data-dropdown].is-open [data-dropdown-menu] {
    visibility: visible;
    opacity: 1;
    transform: none;
}

/* 移动端菜单 */
[data-menu].is-open {
    display: block;
}

/* 表格 */
.table-wsrc {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.table-wsrc th {
    text-align: left;
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b8474;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1e3325;
    background: #0b120d;
}

.table-wsrc td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #16241a;
    color: #c3d6c9;
    vertical-align: middle;
}

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

.table-wsrc tbody tr:hover td {
    background: #0b120d;
}

/* 数字字体 */
.num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* =========================================================
   黑绿主题调色板：把 Tailwind 的浅色工具类映射到深色底
   （只改颜色，不动结构；!important 用于压过 hover/组态变体）
   ========================================================= */

/* ---------- 面 ---------- */
.bg-white {
    background-color: var(--surface-2) !important;
}
.hover\:bg-white:hover {
    background-color: var(--surface-3) !important;
}
.bg-white\/95 {
    background-color: rgba(7, 12, 9, 0.95) !important;
}
.bg-white\/90 {
    background-color: rgba(7, 12, 9, 0.9) !important;
}
.bg-white\/70 {
    background-color: rgba(11, 18, 13, 0.72) !important;
}
.bg-white\/60 {
    background-color: rgba(52, 208, 88, 0.14) !important;
}
.bg-slate-50 {
    background-color: var(--surface) !important;
}
.hover\:bg-slate-50:hover {
    background-color: var(--surface-3) !important;
}
.bg-slate-100 {
    background-color: var(--surface-3) !important;
}
.bg-slate-300 {
    background-color: #2a4034 !important;
}
.bg-slate-200 {
    background-color: #22362a !important;
}
.bg-slate-200\/70 {
    background-color: rgba(147, 169, 155, 0.16) !important;
}
.bg-slate-900 {
    background-color: #1d7a43 !important;
}
.hover\:bg-slate-800:hover {
    background-color: #248f4f !important;
}
.bg-slate-900\/80 {
    background-color: rgba(9, 28, 16, 0.85) !important;
}

/* ---------- 文字 ---------- */
.text-slate-900 { color: var(--text) !important; }
.text-slate-800 { color: #dcebe1 !important; }
.text-slate-700 { color: #cfe3d6 !important; }
.text-slate-600 { color: #b7cdbf !important; }
.text-slate-500 { color: var(--muted) !important; }
.text-slate-400 { color: #7f9488 !important; }
.text-slate-300 { color: #a3b8aa !important; }
.hover\:text-slate-900:hover { color: var(--text) !important; }
.hover\:text-slate-800:hover { color: var(--text) !important; }

/* ---------- 边框 / 环 ---------- */
.border-slate-100 { border-color: var(--line-soft) !important; }
.border-slate-200 { border-color: var(--line) !important; }
.border-slate-300 { border-color: #2d4735 !important; }
.hover\:border-slate-300:hover { border-color: rgba(52, 208, 88, 0.55) !important; }
.border-rose-300 { border-color: #7f2b3a !important; }
.hover\:border-rose-300:hover { border-color: #f43f5e !important; }
.hover\:border-emerald-300:hover { border-color: rgba(52, 208, 88, 0.55) !important; }
.border-emerald-200 { border-color: rgba(52, 208, 88, 0.4) !important; }
.border-amber-200 { border-color: rgba(245, 158, 11, 0.4) !important; }
.ring-slate-200 { --tw-ring-color: #2d4735 !important; }
.ring-emerald-200 { --tw-ring-color: rgba(52, 208, 88, 0.45) !important; }
.ring-amber-200 { --tw-ring-color: rgba(245, 158, 11, 0.45) !important; }
.ring-sky-200 { --tw-ring-color: rgba(56, 189, 248, 0.45) !important; }
.ring-violet-200 { --tw-ring-color: rgba(167, 139, 250, 0.45) !important; }

/* ---------- 状态徽章 ---------- */
.bg-emerald-50 { background-color: rgba(52, 208, 88, 0.12) !important; }
.bg-amber-50 { background-color: rgba(245, 158, 11, 0.12) !important; }
.bg-sky-50 { background-color: rgba(56, 189, 248, 0.12) !important; }
.bg-violet-50 { background-color: rgba(167, 139, 250, 0.12) !important; }
.bg-rose-50 { background-color: rgba(244, 63, 94, 0.12) !important; }
.hover\:bg-rose-50:hover { background-color: rgba(244, 63, 94, 0.2) !important; }
.text-emerald-600 { color: #4ade80 !important; }
.text-emerald-700 { color: #6ee7a0 !important; }
.text-amber-600 { color: #fbbf24 !important; }
.text-amber-700 { color: #fcd34d !important; }
.text-sky-700 { color: #7dd3fc !important; }
.text-violet-700 { color: #c4b5fd !important; }

/* ---------- 亮绿实底按钮：改用深墨色文字，保证对比度 ---------- */
.bg-\[\#34d058\] {
    color: var(--on-accent) !important;
}

/* ---------- 渐变端点 / 原生控件 ---------- */
.to-white {
    --tw-gradient-to: #0f1a13 var(--tw-gradient-to-position) !important;
}
.from-white {
    --tw-gradient-from: #0f1a13 var(--tw-gradient-from-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(15, 26, 19, 0)) !important;
}
.from-slate-50,
.from-slate-100 {
    --tw-gradient-from: var(--surface-3) var(--tw-gradient-from-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(22, 36, 26, 0)) !important;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: #34d058;
}

input,
textarea,
select {
    caret-color: #34d058;
}

/* 印章文字 */
.seal {
    color: var(--on-accent);
}

/* 打印 */
@media print {
    header, footer, .no-print { display: none !important; }
    body { background: #fff; }
}
