:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2128;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #ff6b35;
    --accent-2: #ffb347;
    --danger: #f85149;
    --warning: #d29922;
    --success: #3fb950;
    --info: #58a6ff;
    --mark-bg: rgba(255, 215, 0, 0.35);
    --mark-text: #fff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    
}
.container { max-width: 980px; margin: 0 auto; padding: 40px 24px 80px; }

/* ============ TOP NAV ============ */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}
.topnav-inner {
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.topnav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.topnav a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}
.topnav a.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(255, 107, 53, 0.08);
}
.topnav a.discord {
    color: #5865f2;
    border-color: rgba(88, 101, 242, 0.4);
}
.topnav a.discord:hover {
    background: rgba(88, 101, 242, 0.12);
}
.topnav .spacer { flex: 1; }
/* ============ HEADER ============ */
header {
    text-align: center; padding: 40px 20px; margin-bottom: 40px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, transparent 100%);
    border-radius: 12px; border: 1px solid var(--border);
    position: relative;
}
header h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
header p { color: var(--text-secondary); font-size: 1.05rem; }

/* ============ IP COPY ============ */
.ip-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.ip-copy:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    transform: translateY(-1px);
}
.ip-copy:active { transform: translateY(0); }
.ip-copy .ip-icon { color: var(--accent); font-size: 1rem; }
.ip-copy .ip-feedback {
    color: var(--success);
    font-weight: 700;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.ip-copy .ip-feedback.show { opacity: 1; }

/* ============ SERVER STATUS ============ */
.server-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
}
.server-status .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary);
}
.server-status.online .dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.server-status.offline .dot { background: var(--danger); }
.server-status .label { color: var(--text-primary); }
.server-status .detail { color: var(--text-secondary); font-weight: 500; }

/* ============ SEARCH ============ */
.search-wrap {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.search-wrap input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap .search-icon { color: var(--text-secondary); font-size: 1.1rem; }
.search-wrap .search-hint { color: var(--text-secondary); font-size: 0.82rem; white-space: nowrap; }
mark {
    background: var(--mark-bg);
    color: var(--mark-text);
    padding: 0 2px;
    border-radius: 3px;
}

/* ============ TOC ============ */
.toc {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 12px; padding: 24px 28px; margin-bottom: 40px;
}
.toc h2 { font-size: 1.2rem; margin-bottom: 16px; color: var(--accent); }
.toc ul { list-style: none; columns: 3; column-gap: 16px; }
.toc ul li { break-inside: avoid; margin-bottom: 8px; }
.toc a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.95rem;
    padding: 6px 10px; border-radius: 6px; transition: all 0.15s ease; display: block;
}
.toc a:hover { color: var(--text-primary); background: var(--bg-tertiary); padding-left: 14px; }

/* ============ RULES ============ */
.section-title {
    font-size: 1.8rem; font-weight: 700; margin: 56px 0 20px;
    padding-bottom: 12px; border-bottom: 2px solid var(--accent); display: inline-block;
}
.rule {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-left: 4px solid var(--accent); border-radius: 10px;
    padding: 24px 28px; margin-bottom: 20px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.rule:hover { border-left-color: var(--accent-2); transform: translateX(2px); }
.rule.hidden { display: none; }
.rule-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.rule-code {
    font-family: "SFMono-Regular", Consolas, monospace;
    background: var(--accent); color: #000; font-weight: 700;
    font-size: 0.85rem; padding: 4px 10px; border-radius: 6px; letter-spacing: 0.5px;
}
.rule-title { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.rule > p { margin-bottom: 12px; color: var(--text-primary); }
.rule-subnum {
    font-family: "SFMono-Regular", Consolas, monospace;
    color: var(--accent); font-weight: 700; margin-right: 6px;
}
.rule-section { margin-top: 14px; }
.rule-section-title {
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.rule-section-title::before { content: ""; width: 4px; height: 14px; border-radius: 2px; }
.rule-section.examples .rule-section-title::before { background: var(--danger); }
.rule-section.exceptions .rule-section-title::before { background: var(--success); }
.rule-section.notes .rule-section-title::before { background: var(--info); }
.rule-section.punishment .rule-section-title::before { background: var(--warning); }
.rule-section ul { list-style: none; padding-left: 0; }
.rule-section ul li {
    padding: 6px 0 6px 20px; position: relative;
    color: var(--text-secondary); font-size: 0.95rem;
}
.rule-section ul li::before {
    content: "\25B8"; position: absolute; left: 0;
    color: var(--accent); font-weight: 700;
}

/* ============ PUNISHMENT CHAIN ============ */
.punishment-chain { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.punishment-step {
    background: var(--bg-tertiary); border: 1px solid var(--border);
    padding: 5px 12px; border-radius: 6px; font-size: 0.88rem;
    font-weight: 600; color: var(--text-primary);
    font-family: "SFMono-Regular", Consolas, monospace;
}
.punishment-step.severe {
    background: rgba(248, 81, 73, 0.15); border-color: var(--danger); color: var(--danger);
}
.punishment-arrow { color: var(--text-secondary); font-size: 0.8rem; }

/* ============ IMPORTANT ============ */
.important {
    background: rgba(210, 153, 34, 0.08); border: 1px solid var(--warning);
    border-left: 4px solid var(--warning); border-radius: 10px;
    padding: 20px 24px; margin: 30px 0;
}
.important h3 { color: var(--warning); font-size: 1.1rem; margin-bottom: 12px; }
.important ul { list-style: none; padding-left: 0; }
.important ul li {
    padding: 5px 0 5px 22px; position: relative;
    color: var(--text-primary); font-size: 0.95rem;
}
.important ul li::before {
    content: "!"; position: absolute; left: 0; top: 5px;
    width: 16px; height: 16px; background: var(--warning); color: #000;
    border-radius: 50%; font-weight: 900; font-size: 11px;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ============ CASES ============ */
.case {
    background: var(--bg-tertiary); border-radius: 10px;
    padding: 18px 22px; margin-bottom: 14px; border-left: 3px solid var(--info);
}
.case-situation { color: var(--text-primary); font-size: 0.95rem; margin-bottom: 8px; }
.case-situation strong { color: var(--info); }
.case-verdict { font-size: 0.9rem; font-weight: 600; }
.case-verdict.violation { color: var(--danger); }
.case-verdict.no-violation { color: var(--success); }

/* ============ SCP TOOLTIP ============ */
.scp {
    color: var(--accent);
    font-weight: 600;
    cursor: help;
    border-bottom: 1px dashed var(--accent);
    position: relative;
}
.scp-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--bg-tertiary);
    border: 1px solid var(--accent);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 400;
    white-space: normal;
    width: 240px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    line-height: 1.5;
}
.scp:hover .scp-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}
.scp-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--accent);
}

/* ============ STAFF LIST ============ */
.staff-list { display: flex; flex-direction: column; gap: 12px; }
.staff-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 10px; padding: 14px 20px;
    transition: all 0.15s ease; flex-wrap: wrap;
}
.staff-card:hover { background: var(--bg-tertiary); border-color: #444c56; }
.staff-link { text-decoration: none; font-weight: 700; font-size: 1.05rem; transition: opacity 0.15s ease; min-width: 140px; }
.staff-link:hover { opacity: 0.75; }
.staff-nick {
    color: var(--text-primary); font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.95rem; flex: 1; min-width: 180px;
}
.staff-role {
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 600;
    padding: 4px 10px; background: var(--bg-tertiary);
    border-radius: 6px; border: 1px solid var(--border);
}

/* ============ REPORT FORM ============ */
.form-wrap {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.form-submit:hover { background: var(--accent-2); transform: translateY(-1px); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.form-status {
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    display: none;
}
.form-status.success {
    display: block;
    background: rgba(63, 185, 80, 0.12);
    border: 1px solid var(--success);
    color: var(--success);
}
.form-status.error {
    display: block;
    background: rgba(248, 81, 73, 0.12);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* ============ FOOTER ============ */
footer {
    text-align: center; margin-top: 60px; padding-top: 30px;
    border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.9rem;
}
footer .updated {
    margin-top: 6px;
    font-size: 0.82rem;
    opacity: 0.7;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
    .container { padding: 20px 16px 60px; }
    header { padding: 28px 16px; }
    header h1 { font-size: 1.9rem; }
    .rule { padding: 18px 18px; }
    .rule-title { font-size: 1.1rem; }
    .section-title { font-size: 1.4rem; }
    .toc ul { columns: 1; }
    .topnav { padding: 8px 12px; }
    .topnav a { padding: 6px 10px; font-size: 0.85rem; }
    .staff-card { flex-direction: column; align-items: flex-start; }
    .staff-link { min-width: auto; }
    .search-wrap { flex-direction: column; align-items: stretch; }
    .search-wrap .search-hint { text-align: center; }
    .scp-tooltip { width: 200px; }
    .form-wrap { padding: 20px 18px; }
}

/* ===== SVG icon alignment ===== */
.topnav a svg { vertical-align: -3px; margin-right: 6px; }
.ip-icon { display: inline-flex; align-items: center; }
.ip-icon svg { vertical-align: -2px; }
.search-wrap .search-icon { display: inline-flex; align-items: center; color: var(--text-secondary); }
h3 svg { vertical-align: -3px; margin-right: 8px; }

/* ============ PLUGIN TABS ============ */
.plugin-tabs {
    display: flex;
    gap: 12px;
    margin: 32px 0 24px;
    flex-wrap: wrap;
}
.plugin-tab {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.plugin-tab:hover {
    color: var(--text-primary);
    border-color: #444c56;
    transform: translateY(-1px);
}
.plugin-tab.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(255, 107, 53, 0.08);
    box-shadow: 0 0 0 1px var(--accent);
}
.plugin-tab svg {
    flex-shrink: 0;
}
.plugin-panel {
    display: none;
}
.plugin-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ PLUGIN LIST ============ */
.plugin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.plugin-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 16px 22px;
    transition: all 0.15s ease;
}
.plugin-card:hover {
    border-left-color: var(--accent-2);
    transform: translateX(2px);
}
.plugin-name {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}
.plugin-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}
.plugin-desc code {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.88rem;
    color: var(--accent-2);
}
@media (max-width: 640px) {
    .plugin-tabs { flex-direction: column; }
    .plugin-tab { width: 100%; }
}
