@font-face {
    font-family: 'ArkPixel';
    src: url('/static/fonts/ark-pixel-12px-proportional-zh_cn.ttf.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg: #07111f;
    --bg-elevated: #0f172a;
    --bg-panel: rgba(15, 23, 42, 0.92);
    --bg-panel-strong: rgba(12, 20, 36, 0.96);
    --bg-panel-soft: rgba(20, 29, 51, 0.78);
    --border: rgba(125, 211, 252, 0.24);
    --border-strong: rgba(148, 163, 184, 0.32);
    --text: #e2e8f0;
    --text-soft: #93a4bf;
    --text-dim: #6b7a92;
    --accent: #22d3ee;
    --accent-strong: #38bdf8;
    --accent-warm: #f59e0b;
    --accent-success: #4ade80;
    --accent-danger: #fb7185;
    --accent-violet: #a78bfa;
    --shadow: 0 24px 48px rgba(2, 6, 23, 0.35);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --pixel-border: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(56, 189, 248, 0.12);
    --font-pixel: 'ArkPixel', 'Courier New', monospace;
    --font-display: 'Microsoft YaHei UI', 'PingFang SC', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
    --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(34, 211, 238, 0.16), transparent 38%),
        radial-gradient(circle at right bottom, rgba(167, 139, 250, 0.12), transparent 32%),
        linear-gradient(180deg, #07111f 0%, #091221 36%, #0b1424 100%);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.panel-card {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), var(--pixel-border);
    backdrop-filter: blur(18px);
}

.eyebrow,
.section-kicker {
    margin: 0;
    color: var(--accent);
    font-family: var(--font-pixel);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head.compact { margin-bottom: 14px; }
.section-head h2,
.section-head h3,
.page-title,
.control-hero h1 {
    margin: 4px 0 0;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.section-meta,
.form-note,
.overlay-subtitle,
.page-subtitle,
.hero-copy,
.control-copy {
    color: var(--text-soft);
    line-height: 1.7;
    font-size: 15px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.26);
    background: rgba(8, 19, 35, 0.88);
    color: var(--text);
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.chip.ok { border-color: rgba(74, 222, 128, 0.45); color: #bbf7d0; }
.chip.warn { border-color: rgba(245, 158, 11, 0.44); color: #fde68a; }
.chip.bad { border-color: rgba(251, 113, 133, 0.44); color: #fecdd3; }
.chip.phase { border-color: rgba(167, 139, 250, 0.42); color: #ddd6fe; }

.ghost-button,
.primary-button,
.button-row button,
.lobster-action-row button,
.topbar-actions a,
.control-entry-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    position: relative;
    overflow: hidden;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.ghost-button:hover,
.primary-button:hover,
.button-row button:hover,
.lobster-action-row button:hover,
.topbar-actions a:hover,
.control-entry-button:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.45);
    background: rgba(18, 31, 56, 0.92);
    box-shadow: 0 10px 24px rgba(8, 47, 73, 0.28);
}

.ghost-button:active,
.primary-button:active,
.button-row button:active,
.lobster-action-row button:active,
.topbar-actions a:active,
.control-entry-button:active {
    transform: translateY(1px) scale(0.985);
}

.primary-button {
    border-color: rgba(34, 211, 238, 0.45);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(56, 189, 248, 0.12));
}

.ghost-button::after,
.primary-button::after,
.button-row button::after,
.lobster-action-row button::after,
.topbar-actions a::after,
.control-entry-button::after {
    content: '';
    position: absolute;
    inset: -1px auto -1px -38%;
    width: 32%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-20deg) translateX(-160%);
    opacity: 0;
}

.ghost-button:hover::after,
.primary-button:hover::after,
.button-row button:hover::after,
.lobster-action-row button:hover::after,
.topbar-actions a:hover::after,
.control-entry-button:hover::after {
    opacity: 1;
    animation: button-sheen .7s ease;
}

.field-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-stack span {
    color: var(--text-soft);
    font-size: 14px;
}

.field-stack input,
.field-stack select,
.field-stack textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(8, 15, 30, 0.94);
    color: var(--text);
    padding: 13px 15px;
    font-size: 15px;
    resize: vertical;
}

.field-stack textarea {
    min-height: 132px;
    line-height: 1.6;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.compact-row { margin-top: 4px; }

.history-list,
.guest-strip,
.role-detail-list,
.event-tape,
.lobster-event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-state {
    color: var(--text-dim);
    padding: 14px 0;
    font-size: 15px;
    line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

@keyframes button-sheen {
    from { transform: skewX(-20deg) translateX(-160%); }
    to { transform: skewX(-20deg) translateX(420%); }
}
