:root {
    --s-green:      #3dd68c;
    --s-green-dim:  rgba(61,214,140,0.12);
    --s-green-glow: rgba(61,214,140,0.3);
    --s-red:        #f04747;
    --s-red-dim:    rgba(240,71,71,0.12);
    --s-yellow:     #f0c050;
    --s-yellow-dim: rgba(240,192,80,0.12);
    --s-border:     rgba(255,255,255,0.07);
    --s-radius:     12px;
}
[data-theme="light"] { --s-border: rgba(0,0,0,0.09); }

.status-page { max-width: 1060px; margin: 0 auto; padding: 48px 24px 80px; }

.status-header { text-align: center; margin-bottom: 44px; }
.status-header h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-light); margin-bottom: 6px; }
.status-header h1 span { color: var(--s-green); }
.status-header p { color: var(--text-gray); font-size: 0.9rem; }
.shard-badge {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 12px; padding: 5px 14px;
    background: var(--s-green-dim); border: 1px solid rgba(61,214,140,0.22);
    border-radius: 20px; font-size: 0.82rem; font-weight: 700; color: var(--s-green);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--s-green); animation: sPulse 2s infinite; }
@keyframes sPulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.global-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 36px; }
@media(max-width:680px){ .global-stats{grid-template-columns:repeat(2,1fr)} }

.stat-card {
    background: var(--secondary-color); border: 1px solid var(--s-border);
    border-radius: var(--s-radius); padding: 18px 20px;
    display: flex; flex-direction: column; gap: 4px;
    animation: sFadeUp .4s ease both;
}
.stat-card:nth-child(1){animation-delay:.05s}
.stat-card:nth-child(2){animation-delay:.10s}
.stat-card:nth-child(3){animation-delay:.15s}
.stat-card:nth-child(4){animation-delay:.20s}
@keyframes sFadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

.stat-icon { font-size:.78rem; color:var(--text-gray); margin-bottom:4px; }
.stat-icon i { margin-right:5px; }
.stat-value { font-size:1.5rem; font-weight:800; letter-spacing:-0.02em; color:var(--text-light); }
.stat-label { font-size:.74rem; color:var(--text-gray); }

.status-legend {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 12px 18px; background: var(--secondary-color);
    border: 1px solid var(--s-border); border-radius: 10px; margin-bottom: 24px;
}
.legend-item { display:flex; align-items:center; gap:7px; font-size:.78rem; color:var(--text-gray); }
.legend-dot  { width:12px; height:12px; border-radius:50%; border:2px solid var(--bg-dark); flex-shrink:0; }
.legend-dot.ld-green  { background:#3dd68c; animation: uDotGreen 2.5s ease-in-out infinite; }
.legend-dot.ld-yellow { background:#faa61a; animation: uDotIdle  1s   ease-in-out infinite; }
.legend-dot.ld-red    { background:#f04747; animation: uDotRed   2.5s ease-in-out infinite; }

.section-label {
    font-size:.72rem; font-weight:700; letter-spacing:.08em;
    text-transform:uppercase; color:var(--text-gray); margin-bottom:14px;
}

.shards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.shard-card {
    position: relative;
    background: var(--secondary-color); border: 1px solid var(--s-border);
    border-radius: 10px; padding: 14px 10px 12px;
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    cursor: default;
    transition: border-color .2s, transform .15s, box-shadow .2s;
    animation: sFadeUp .35s ease both;
}
.shard-card:hover { transform: translateY(-2px); }
.shard-card.s-online        { border-color: rgba(61,214,140,.2); }
.shard-card.s-online:hover  { border-color: rgba(61,214,140,.5); box-shadow:0 0 16px var(--s-green-glow); }
.shard-card.s-offline       { border-color: rgba(240,71,71,.2); }
.shard-card.s-offline:hover { border-color: rgba(240,71,71,.45); box-shadow:0 0 12px rgba(240,71,71,.25); }
.shard-card.s-reconnecting  { border-color: rgba(240,192,80,.2); }
.shard-card.s-reconnecting:hover { border-color:rgba(240,192,80,.45); box-shadow:0 0 12px rgba(240,192,80,.25); }

@keyframes shardPulse {
    0%, 100% { border-color: rgba(61,214,140,.45); box-shadow: 0 0 10px rgba(61,214,140,.25); }
    50%      { border-color: rgba(255,255,255,.75); box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 0 18px rgba(255,255,255,.18); }
}
.shard-card.shard-found { animation: shardPulse 1.6s ease-in-out infinite !important; position: relative; z-index: 2; }

.shard-finder-sep { width: 1px; height: 16px; background: var(--s-border); flex-shrink: 0; }
.shard-finder-label { font-size: 0.75rem; font-weight: 700; color: var(--text-gray); white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.shard-finder-input {
    width: 170px; background: var(--bg-dark);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 7px;
    padding: 4px 10px; color: var(--text-light);
    font-size: 0.8rem; font-family: monospace; outline: none;
    transition: border-color 0.2s; height: 28px;
}
.shard-finder-input:focus { border-color: var(--primary-color); }
.shard-finder-result { font-size: 0.8rem; color: var(--text-gray); white-space: nowrap; }
.shard-finder-result.sf-notfound { color: #f04747; }
.shard-finder-result.sf-found    { color: var(--s-green); }
.shard-finder-result.sf-loading  { color: var(--text-gray); }
.shard-finder-result .shard-result-num { color: var(--primary-light); font-weight: 700; }

.shard-dot {
    position: absolute; top: 8px; right: 8px;
    width: 16px; height: 16px; border-radius: 50%;
    border: 3px solid var(--bg-dark);
}
.s-online       .shard-dot { background: #3dd68c; animation: uDotGreen  2.5s ease-in-out infinite; }
.s-offline      .shard-dot { background: #f04747; animation: uDotRed    2.5s ease-in-out infinite; }
.s-reconnecting .shard-dot { background: #faa61a; animation: uDotIdle   1s   ease-in-out infinite; }
@keyframes uDotGreen { 0%,100%{box-shadow:0 0 0 0 rgba(61,214,140,0.5)} 50%{box-shadow:0 0 0 4px rgba(61,214,140,0)} }
@keyframes uDotRed   { 0%,100%{box-shadow:0 0 0 0 rgba(240,71,71,0.5)}  50%{box-shadow:0 0 0 4px rgba(240,71,71,0)} }
@keyframes uDotIdle  { 0%,100%{box-shadow:0 0 0 0 rgba(250,166,26,0.5)} 50%{box-shadow:0 0 0 4px rgba(250,166,26,0)} }

.shard-id    { font-size:1.1rem; font-weight:800; letter-spacing:-0.02em; color:var(--text-light); }
.shard-ping  { font-size:.68rem; font-weight:700; padding:2px 7px; border-radius:10px; }
.s-online       .shard-ping { background:var(--s-green-dim);  color:var(--s-green); }
.s-offline      .shard-ping { background:var(--s-red-dim);    color:var(--s-red); }
.s-reconnecting .shard-ping { background:var(--s-yellow-dim); color:var(--s-yellow); }
.shard-servers { font-size:.67rem; color:var(--text-gray); display:flex; align-items:center; gap:3px; }

.shard-tip {
    position:absolute; bottom:calc(100% + 10px); left:50%;
    transform:translateX(-50%) scale(.94);
    background:var(--dropdown-bg); border:1px solid var(--border-color); border-radius:10px;
    padding:12px 14px; min-width:190px;
    pointer-events:none; opacity:0;
    transition:opacity .15s, transform .15s;
    z-index:200; box-shadow:0 10px 30px rgba(0,0,0,.3);
    white-space:nowrap;
}
.shard-card:hover .shard-tip { opacity:1; transform:translateX(-50%) scale(1); }
.shard-tip::after { content:''; position:absolute; top:100%; left:50%; transform:translateX(-50%); border:6px solid transparent; border-top-color:var(--dropdown-bg); }
.tip-title { font-size:.82rem; font-weight:700; color:var(--text-light); margin-bottom:9px; display:flex; align-items:center; gap:7px; }
.tip-dot { width:7px; height:7px; border-radius:50%; }
.s-online       .tip-dot { background:var(--s-green); }
.s-offline      .tip-dot { background:var(--s-red); }
.s-reconnecting .tip-dot { background:var(--s-yellow); }
.tip-row { display:flex; justify-content:space-between; gap:20px; font-size:.76rem; color:var(--text-gray); padding:2px 0; }
.tip-row .tv   { color:var(--text-light); font-weight:600; }
.tip-row .good { color:var(--s-green); }
.tip-row .warn { color:var(--s-yellow); }
.tip-row .bad  { color:var(--s-red); }

.ping-good { color: var(--s-green); }
.ping-warn { color: var(--s-yellow); }
.ping-bad  { color: var(--s-red); }

.btn-refresh {
    display: inline-flex; align-items: center; gap: 7px;
    margin-left: auto; padding: 7px 15px;
    background: var(--primary-dim);
    border: 1px solid var(--primary-border);
    border-radius: 8px; color: var(--primary-light);
    font-size: 0.82rem; font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    font-family: inherit;
}
.btn-refresh:hover:not(:disabled) { background: rgba(86,86,158,0.22); border-color: rgba(86,86,158,0.5); transform: translateY(-1px); }
.btn-refresh:disabled { cursor: not-allowed; }
.btn-refresh.loading  { opacity: 0.75; pointer-events: none; }
.btn-refresh.loading i { animation: spin 0.8s linear infinite; }
.btn-refresh.success { color: #3dd68c !important; border-color: rgba(61,214,140,0.4) !important; background: rgba(61,214,140,0.08) !important; }
.btn-refresh.error   { color: #f04747 !important; border-color: rgba(240,71,71,0.4) !important; background: rgba(240,71,71,0.08) !important; }
@keyframes spin { to { transform: rotate(360deg); } }

body { overflow-x: hidden; }
.docs-wrapper { display: flex; min-height: calc(100vh - 64px); }
.docs-sidebar { width: 240px; flex-shrink: 0; background: var(--bg-darker); border-right: 1px solid var(--border-color); padding: 24px 0; position: fixed; top: 64px; left: 0; height: calc(100vh - 64px); overflow-y: auto; z-index: 100; }
.sidebar-top { padding: 0 20px 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px; }
.sidebar-logo { font-size: 17px; font-weight: 800; color: var(--text-light); letter-spacing: -0.02em; }
.sidebar-logo sup { font-size: 0.5em; color: var(--primary-light); vertical-align: super; }
.sidebar-subtitle { font-size: 11px; color: var(--text-gray); margin-top: 3px; }
.nav-section { padding: 0 10px; margin-bottom: 4px; }
.nav-category { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-gray); padding: 10px 10px 5px; }
.nav-link { display: flex; align-items: center; gap: 9px; padding: 7px 10px; font-size: 13.5px; color: var(--text-gray); cursor: pointer; border-radius: 6px; transition: all 0.15s; user-select: none; border: none; background: none; width: 100%; text-align: left; font-family: inherit; text-decoration: none; }
.nav-link::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--border-color); flex-shrink: 0; transition: background 0.15s; }
.nav-link:hover { color: var(--text-light); }
.nav-link:hover::before { background: var(--primary-light); }
.nav-link.active { color: var(--text-light); background: rgba(86,86,158,0.18); }
.nav-link.active::before { background: var(--primary-light); }
.docs-main { margin-left: 240px; flex: 1; padding: 52px 64px 100px; max-width: 820px; overflow-x: hidden; }
.doc-page { display: none; animation: fadeIn 0.22s ease; }
.doc-page.active { display: block; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.page-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-dim); border: 1px solid var(--primary-border); color: var(--primary-light); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 100px; margin-bottom: 24px; }
.page-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-light); }
.hero-title { font-size: clamp(30px, 4vw, 52px); font-weight: 800; color: var(--text-light); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 14px; }
.hero-title sup { font-size: 0.42em; color: var(--primary-light); vertical-align: super; }
.hero-sub { font-size: 15px; color: var(--text-gray); max-width: 500px; line-height: 1.65; margin-bottom: 28px; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
hr.divider { border: none; border-top: 1px solid var(--border-color); margin: 0 0 28px; }
.section-heading { font-size: 20px; font-weight: 800; color: var(--text-light); letter-spacing: -0.02em; margin-bottom: 12px; }
.doc-section { margin-bottom: 48px; }
p { color: var(--text-gray); margin-bottom: 12px; line-height: 1.7; }
p:last-child { margin-bottom: 0; }
.info-box { background: rgba(86,86,158,0.08); border-left: 3px solid var(--primary-color); border-radius: 0 6px 6px 0; padding: 12px 16px; font-size: 14px; color: var(--text-light); margin: 14px 0; }
.info-box strong { color: #fff; }
.info-box.warn { background: rgba(240,192,80,0.06); border-left-color: #f0c050; color: var(--text-light); }
.info-box.tip  { background: rgba(61,214,140,0.06); border-left-color: #3dd68c; }
.step { display: flex; gap: 16px; margin-bottom: 20px; }
.step-num { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--primary-dim); border: 1px solid var(--primary-border); color: var(--primary-light); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.step-title { font-weight: 600; color: var(--text-light); font-size: 14px; margin-bottom: 3px; }
.step-desc  { font-size: 13px; color: var(--text-gray); }
.cmd-card { background: var(--secondary-color); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 10px; overflow: hidden; transition: border-color 0.15s; }
.cmd-card:hover { border-color: var(--primary-border); }
.cmd-header { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; user-select: none; }
.cmd-name  { font-family: 'Courier New', monospace; font-size: 13px; color: var(--primary-light); background: var(--primary-dim); border: 1px solid var(--primary-border); padding: 2px 9px; border-radius: 5px; white-space: nowrap; }
.cmd-short { flex: 1; font-size: 13.5px; color: var(--text-light); }
.cmd-tag   { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.tag-free  { background: rgba(61,214,140,0.1); color: #3dd68c; }
.tag-admin { background: rgba(240,192,80,0.1);  color: #f0c050; }
.cmd-arrow { color: var(--text-gray); font-size: 12px; transition: transform 0.2s; }
.cmd-card.open .cmd-arrow { transform: rotate(90deg); }
.cmd-body { display: none; padding: 0 16px 16px; border-top: 1px solid var(--border-color); }
.cmd-card.open .cmd-body { display: block; }
.cmd-body > p { margin-top: 12px; font-size: 13.5px; }
.params-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-gray); margin: 14px 0 7px; }
.params-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.params-table th { text-align: left; padding: 7px 11px; background: var(--bg-darker); color: var(--text-gray); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.params-table td { padding: 8px 11px; border-bottom: 1px solid var(--border-color); color: var(--text-light); }
.params-table tr:last-child td { border-bottom: none; }
.p-name { font-family: 'Courier New', monospace; color: var(--primary-light); }
.p-req  { font-size: 10px; padding: 1px 6px; border-radius: 3px; }
.req    { background: rgba(240,71,71,0.1);  color: #f04747; }
.opt    { background: rgba(61,214,140,0.1); color: #3dd68c; }
.example { background: var(--bg-darker); border: 1px solid var(--border-color); border-radius: 6px; padding: 9px 13px; font-family: 'Courier New', monospace; font-size: 12.5px; color: var(--primary-light); margin-top: 11px; }
code { font-family: 'Courier New', monospace; font-size: 12px; background: var(--bg-darker); border: 1px solid var(--border-color); padding: 1px 6px; border-radius: 4px; color: var(--primary-light); }
.feature-list { list-style: none; margin: 10px 0; }
.feature-list li { position: relative; padding-left: 16px; margin-bottom: 7px; font-size: 13.5px; color: var(--text-gray); }
.feature-list li::before { content: '›'; position: absolute; left: 0; color: var(--primary-light); font-weight: 700; }
.perms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
.perm-item { background: var(--secondary-color); border: 1px solid var(--border-color); border-radius: 7px; padding: 11px 13px; }
.perm-name { font-size: 13px; color: var(--text-light); font-weight: 500; margin-bottom: 2px; }
.perm-why  { font-size: 11.5px; color: var(--text-gray); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.doc-table th { text-align: left; padding: 9px 13px; background: var(--bg-darker); color: var(--text-gray); font-size: 10px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.doc-table td { padding: 9px 13px; border-bottom: 1px solid var(--border-color); color: var(--text-light); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: none; }
.faq-item { border-bottom: 1px solid var(--border-color); padding: 14px 0; }
.faq-q { font-weight: 500; color: var(--text-light); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; user-select: none; }
.faq-arrow { color: var(--text-gray); font-size: 12px; transition: transform 0.2s; }
.faq-item.open .faq-arrow { transform: rotate(90deg); }
.faq-a { display: none; padding-top: 9px; font-size: 13.5px; color: var(--text-gray); line-height: 1.65; }
.faq-item.open .faq-a { display: block; }
.faq-a a { color: var(--primary-light); }
.faq-a a:hover { text-decoration: underline; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.support-card { background: var(--secondary-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 16px; text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.support-card:hover { border-color: var(--primary-border); background: var(--primary-dim); }
.support-card .sc-icon  { font-size: 20px; margin-bottom: 7px; }
.support-card .sc-title { font-size: 13.5px; font-weight: 600; color: var(--text-light); margin-bottom: 2px; }
.support-card .sc-desc  { font-size: 11.5px; color: var(--text-gray); }
.docs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
    cursor: pointer;
}
.docs-overlay.active { display: block; }

.docs-hamburger { display: none; position: fixed; bottom: 20px; right: 20px; z-index: 200; background: var(--primary-color); color: #fff; border: none; border-radius: 50%; width: 46px; height: 46px; font-size: 16px; cursor: pointer; box-shadow: 0 4px 16px rgba(86,86,158,0.5); }
@media (max-width: 900px) {
    .docs-hamburger { display: flex; align-items: center; justify-content: center; }
    .docs-sidebar { top: 0; height: 100vh; transform: translateX(-100%); transition: transform 0.25s; z-index: 150; }
    .docs-sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.4); }
    .docs-main { margin-left: 0; padding: 32px 20px 80px; }
}

@media (max-width: 480px) {
    .status-page { padding: 28px 14px 60px; }
    .status-legend { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
    .shard-finder-input { width: 120px; }
    .status-header h1 { font-size: 1.5rem; }
    .hero-title { font-size: 1.6rem; }
    .hero-btns { flex-direction: column; align-items: stretch; }
    .hero-btns .btn { justify-content: center; }
    .params-table { font-size: 11.5px; }
    .params-table th, .params-table td { padding: 6px 8px; }
}