@font-face {
    font-family: 'MyCustomFont';
    src: url('font/a.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg: #f4f6fc;
    --text: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --card-bg: rgba(255,255,255,0.48);
    --card-border: rgba(255,255,255,0.6);
    --card-shadow: 0 8px 28px rgba(0,0,0,0.04);
    --accent: #4f6ef7;
    --accent-soft: #eef1ff;
    --accent-glow: rgba(79,110,247,0.2);
    --blur: 16px;
    --saturate: 1.3;
    --toolbar-bg: rgba(255,255,255,0.65);
    --toolbar-border: rgba(255,255,255,0.75);
    --tag-bg: rgba(79,110,247,0.07);
    --tag-text: #4f6ef7;
    --link-bg: rgba(255,255,255,0.4);
    --link-hover-bg: rgba(255,255,255,0.65);
    --divider: rgba(0,0,0,0.05);
    --decoration-1: rgba(147,180,255,0.5);
    --decoration-2: rgba(200,160,255,0.4);
    --decoration-3: rgba(255,180,200,0.35);
    --decoration-4: rgba(160,210,255,0.4);
    --toast-bg: rgba(255,255,255,0.75);
    --msg-bg: rgba(255,255,255,0.5);
    --msg-border: rgba(0,0,0,0.08);
    --input-bg: rgba(255,255,255,0.7);
    --input-border: rgba(0,0,0,0.1);
}
.dark-mode {
    --bg: #12141d;
    --text: #e2e4ec;
    --text-secondary: #b0b5c2;
    --text-muted: #6b7080;
    --card-bg: rgba(28,30,42,0.55);
    --card-border: rgba(255,255,255,0.08);
    --card-shadow: 0 8px 28px rgba(0,0,0,0.35);
    --accent: #7b93ff;
    --accent-soft: #1e2240;
    --accent-glow: rgba(123,147,255,0.25);
    --toolbar-bg: rgba(30,32,42,0.7);
    --toolbar-border: rgba(255,255,255,0.1);
    --tag-bg: rgba(123,147,255,0.1);
    --tag-text: #9aafff;
    --link-bg: rgba(35,37,48,0.45);
    --link-hover-bg: rgba(42,45,58,0.65);
    --divider: rgba(255,255,255,0.06);
    --decoration-1: rgba(100,130,220,0.28);
    --decoration-2: rgba(150,120,210,0.22);
    --decoration-3: rgba(200,130,160,0.2);
    --decoration-4: rgba(100,160,210,0.22);
    --toast-bg: rgba(30,32,42,0.75);
    --msg-bg: rgba(40,42,55,0.5);
    --msg-border: rgba(255,255,255,0.08);
    --input-bg: rgba(40,42,55,0.7);
    --input-border: rgba(255,255,255,0.1);
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'MyCustomFont', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background 0.4s, color 0.3s;
    padding-bottom: 80px;
    line-height: 1.5;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}
.bg-orb.orb1 { width: 380px; height: 380px; background: var(--decoration-1); top: -10%; left: -8%; animation: float1 22s infinite ease-in-out; }
.bg-orb.orb2 { width: 320px; height: 320px; background: var(--decoration-2); top: 55%; right: -10%; animation: float2 24s infinite ease-in-out; }
.bg-orb.orb3 { width: 280px; height: 280px; background: var(--decoration-3); bottom: -8%; left: 25%; animation: float3 20s infinite ease-in-out; }
.bg-orb.orb4 { width: 240px; height: 240px; background: var(--decoration-4); top: 30%; left: 50%; animation: float4 26s infinite ease-in-out; }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 25% { transform: translate(30px,25px) scale(1.05); } 50% { transform: translate(-15px,40px) scale(0.95); } 75% { transform: translate(20px,-10px) scale(1.03); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 30% { transform: translate(-30px,-20px) scale(1.04); } 60% { transform: translate(15px,-35px) scale(0.93); } 85% { transform: translate(-20px,15px) scale(1.02); } }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1); } 30% { transform: translate(25px,-25px) scale(1.06); } 60% { transform: translate(-20px,15px) scale(0.94); } 80% { transform: translate(10px,-5px) scale(1.02); } }
@keyframes float4 { 0%,100% { transform: translate(0,0) scale(1); } 20% { transform: translate(-25px,20px) scale(1.04); } 50% { transform: translate(20px,-30px) scale(0.95); } 70% { transform: translate(-10px,-15px) scale(1.03); } }

.toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    background: var(--toast-bg); backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid var(--card-border); border-radius: 14px;
    padding: 10px 24px; font-size: 0.9rem; font-weight: 500; color: var(--text);
    z-index: 100; box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none;
}
.toast.hide { opacity: 0; transform: translateX(-50%) translateY(-10px); }

.container { position: relative; z-index: 1; max-width: 1050px; margin: 0 auto; padding: 36px 20px 20px; display: flex; flex-direction: column; gap: 24px; }
.grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }

.glass-card {
    background: var(--card-bg); backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
    -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
    border: 1px solid var(--card-border); border-radius: 18px;
    padding: 26px 24px; box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, background 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
}
.glass-card:hover { transform: translateY(-3px); box-shadow: 0 18px 35px rgba(0,0,0,0.08); border-color: rgba(255,255,255,0.25); }
.dark-mode .glass-card:hover { box-shadow: 0 18px 35px rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.15); }

.card-site { grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.site-header { display: flex; flex-direction: column; align-items: flex-end; margin-bottom: 4px; }
.site-icon {
    width: 56px; height: 56px; border-radius: 15px;
    background: transparent;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; box-shadow: 0 8px 22px var(--accent-glow);
    cursor: pointer; transition: transform 0.2s ease; margin-bottom: 6px;
    user-select: none; -webkit-tap-highlight-color: transparent; overflow: hidden;
}
.site-icon:hover { transform: scale(1.05); }
.site-icon img { width: 100%; height: 100%; object-fit: cover; }
.site-name { font-size: 1.7rem; font-weight: 700; line-height: 1.2; text-align: right; }
.site-badge { position: absolute; top: 10px; left: 12px; font-size: 1.5rem; z-index: 2; opacity: 0.9; pointer-events: none; text-shadow: 0 0 6px rgba(255,255,255,0.5); }
@keyframes iconSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.site-icon.spin-anim { animation: iconSpin 0.6s ease-in-out; }
.site-desc { white-space:pre-wrap;font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; max-width: 90%; align-self: flex-start; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.tag { padding: 5px 12px; border-radius: 13px; font-size: 0.78rem; background: var(--tag-bg); color: var(--tag-text); border: 1px solid var(--card-border); backdrop-filter: blur(6px); transition: 0.2s; }
.tag:hover { border-color: var(--accent); transform: translateY(-1px); }
.status { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); align-self: flex-start; flex-wrap: wrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; flex-shrink: 0; }
.status-time { font-weight: 500; color: var(--text); background: rgba(255,255,255,0.5); padding: 2px 8px; border-radius: 8px; font-size: 0.78rem; backdrop-filter: blur(4px); }
.dark-mode .status-time { background: rgba(255,255,255,0.1); }
.status-sep { opacity: 0.3; margin: 0 2px; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }

.card-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px;
    text-decoration: none; color: var(--text); background: var(--link-bg);
    border: 1px solid var(--card-border); backdrop-filter: blur(8px); transition: all 0.25s ease;
}
.link-item:hover { background: var(--link-hover-bg); border-color: var(--accent); transform: translateX(3px); }
.link-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0; border: 1px solid var(--card-border); transition: 0.2s;
    overflow: hidden;
}
.link-icon img { width: 100%; height: 100%; object-fit: cover; }
.link-item:hover .link-icon { background: var(--accent-soft); border-color: var(--accent); }
.link-info { flex: 1; min-width: 0; }
.link-name { font-weight: 600; font-size: 0.85rem; }
.link-desc { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-arrow { color: var(--text-muted); transition: 0.2s; flex-shrink: 0; }
.link-item:hover .link-arrow { color: var(--accent); transform: translateX(3px); }

.highlight-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.highlight-list li {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
    background: var(--link-bg); border: 1px solid var(--card-border);
    font-size: 0.82rem; color: var(--text-secondary); transition: 0.2s;
}
.highlight-list li:hover { border-color: var(--accent); background: var(--link-hover-bg); transform: translateX(3px); }
.hl-icon { flex-shrink: 0; font-size: 0.95rem; }

.msg-board { margin-top: 20px; border-top: 1px solid var(--divider); padding-top: 16px; }
.msg-board-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; color: var(--text); }
.msg-list { max-height: 160px; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.msg-empty { color: var(--text-muted); font-size: 0.78rem; text-align: center; padding: 12px; }
.msg-item { background: var(--msg-bg); border: 1px solid var(--msg-border); border-radius: 10px; padding: 8px 12px; font-size: 0.8rem; backdrop-filter: blur(6px); }
.msg-item .msg-nick { font-weight: 600; color: var(--accent); margin-right: 6px; }
.msg-item .msg-time { font-size: 0.65rem; color: var(--text-muted); margin-left: 6px; }
.msg-item .msg-text { display: block; margin-top: 4px; color: var(--text); line-height: 1.4; }
.msg-form { margin-top: 8px; }
.msg-form-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.msg-input {
    flex: 1; min-width: 80px; background: var(--input-bg); border: 1px solid var(--input-border);
    border-radius: 10px; padding: 8px 12px; font-size: 0.8rem; color: var(--text);
    outline: none; transition: 0.2s; backdrop-filter: blur(4px);
}
.msg-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,110,247,0.15); }
.captcha-box { display: flex; align-items: center; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px; overflow: hidden; backdrop-filter: blur(4px); }
.captcha-code { padding: 6px 10px; font-size: 0.85rem; font-weight: 700; letter-spacing: 2px; color: var(--accent); user-select: none; min-width: 50px; text-align: center; }
.captcha-refresh { background: transparent; border: none; border-left: 1px solid var(--input-border); padding: 6px 8px; cursor: pointer; font-size: 0.9rem; color: var(--text-secondary); transition: 0.2s; }
.captcha-refresh:hover { color: var(--accent); background: rgba(0,0,0,0.05); }
.msg-captcha-input { max-width: 80px; flex: 0 0 auto; }
.msg-textarea {
    width: 100%; background: var(--input-bg); border: 1px solid var(--input-border);
    border-radius: 10px; padding: 10px 12px; font-size: 0.8rem; color: var(--text);
    outline: none; resize: vertical; min-height: 50px; backdrop-filter: blur(4px);
    margin-bottom: 8px; transition: 0.2s; font-family: inherit;
}
.msg-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,110,247,0.15); }
.msg-submit {
    width: 100%; padding: 8px 16px; background: var(--accent); color: #fff;
    border: none; border-radius: 10px; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: 0.2s; backdrop-filter: blur(4px);
}
.msg-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.msg-submit:active { transform: scale(0.97); }

.footer { text-align: center; font-size: 0.75rem; color: var(--text-muted); padding: 8px 0 0; }
.footer .dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); margin: 0 8px; vertical-align: middle; opacity: 0.5; }

.floating-toolbar { position: fixed; bottom: 90px; right: 20px; z-index: 99; display: flex; flex-direction: column; gap: 10px; }
.tool-btn {
    width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--toolbar-border);
    background: var(--toolbar-bg); backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.25s ease; color: var(--text); position: relative;
    -webkit-tap-highlight-color: transparent;
}
.tool-btn:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.tool-btn:active { transform: scale(0.92); }
.tool-btn svg { width: 19px; height: 19px; stroke-width: 2.2; }
.tooltip {
    position: absolute; right: 50px; background: var(--toolbar-bg); backdrop-filter: blur(10px);
    border: 1px solid var(--toolbar-border); color: var(--text); font-size: 0.7rem;
    padding: 4px 10px; border-radius: 7px; white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translateX(6px); transition: 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tool-btn:hover .tooltip { opacity: 1; transform: translateX(0); }
.btn-back-top { opacity: 0; pointer-events: none; transform: translateY(8px); transition: 0.3s; }
.btn-back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    .card-site { grid-row: auto; }
    .container { padding: 24px 14px 16px; gap: 18px; }
    .glass-card { padding: 20px 16px; border-radius: 15px; }
    .site-name { font-size: 1.4rem; }
    .site-desc { max-width: 100%; font-size: 0.85rem; }
    .tool-btn { width: 36px; height: 36px; border-radius: 11px; }
    .tool-btn svg { width: 17px; height: 17px; }
    .tooltip { display: none; }
    .msg-form-row { flex-direction: column; }
    .msg-captcha-input { max-width: 100%; }
}
@media (max-width: 400px) {
    .container { padding: 16px 10px 12px; gap: 14px; }
    .glass-card { padding: 16px 12px; }
    .site-name { font-size: 1.2rem; }
    .tags { gap: 5px; }
    .tag { font-size: 0.7rem; padding: 4px 9px; }
    .status { font-size: 0.7rem; }
    .status-time { font-size: 0.7rem; padding: 2px 6px; }
}
.site-badge {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 1.5rem;
    z-index: 2;
    opacity: 0.9;
    pointer-events: none;
    font-weight: bold;
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 3s ease infinite;
    white-space: nowrap;
}
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blinkCaret {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--text); }
}
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
#aboutTextDisplay {
    white-space: pre-wrap;
}
#siteDescDisplay {
    white-space: pre-wrap;
}
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    box-shadow: 0 0 8px currentColor;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.status-indicator.normal {
    background-color: #22c55e;
    color: #22c55e;
}
.status-indicator.busy {
    background-color: #eab308;
    color: #eab308;
}