/* ============================================================
   愿想API · 全站设计系统 V2 —— 深色科技简约
   组件：波纹 / 白屏转场 / 抽屉导航 / 横向弹幕 / 卡片 / 表单
   ============================================================ */

:root {
    --bg: #070b14;
    --bg2: #0b1120;
    --card: rgba(17, 24, 39, 0.66);
    --card-solid: #0f1522;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(0, 212, 255, 0.35);
    --text: #e8ecf4;
    --text2: #8b93a7;
    --text3: #5b6478;
    --cyan: #00d4ff;
    --blue: #0071e3;
    --purple: #7c6cff;
    --green: #34c759;
    --red: #ff3b30;
    --orange: #ff9500;
    --grad: linear-gradient(135deg, #00d4ff, #0071e3 55%, #7c6cff);
    --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-2: 0 8px 30px rgba(0,0,0,0.45);
    --shadow-3: 0 20px 60px rgba(0,0,0,0.6);
    --glow: 0 0 26px rgba(0, 212, 255, 0.14);
    --radius: 18px;
    --radius-sm: 12px;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
    background-color: var(--bg);
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* 背景：细网格 + 双色光晕（科技感） */
body::before {
    content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 46px 46px;
}
body::after {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(600px 400px at 12% -5%, rgba(0,212,255,0.13), transparent 60%),
        radial-gradient(700px 500px at 108% 108%, rgba(124,108,255,0.13), transparent 60%),
        radial-gradient(500px 380px at 50% 120%, rgba(0,113,227,0.10), transparent 60%);
}


/* ============ 抽屉导航（左上角菜单） ============ */
#drawer-mask {
    position: fixed; inset: 0; z-index: 980; background: rgba(4, 8, 16, 0.6);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden; transition: all .3s var(--ease);
}
#drawer-mask.show { opacity: 1; visibility: visible; }
#drawer {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 990;
    width: 280px; max-width: 84vw;
    background: rgba(10, 15, 28, 0.82);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    backdrop-filter: blur(28px) saturate(160%);
    border-right: 1px solid var(--line);
    transform: translateX(-102%);
    transition: transform .38s var(--ease);
    display: flex; flex-direction: column; padding: 22px 16px;
    overflow-y: auto;
}
#drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.drawer-head img { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; }
.drawer-head .d-title { font-size: 15px; font-weight: 700; }
.drawer-head .d-sub { font-size: 11px; color: var(--text3); margin-top: 1px; }
.drawer-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 14px; margin: 2px 0; border-radius: 14px;
    color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 500;
    position: relative; overflow: hidden;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.drawer-item i { width: 20px; text-align: center; color: var(--cyan); font-size: 15px; }
.drawer-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.drawer-item.active { background: linear-gradient(90deg, rgba(0,212,255,0.12), transparent); color: var(--cyan); }

/* ============ 波纹 ============ */
.ripple-ink {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.45), rgba(255,255,255,0.08) 65%);
    transform: scale(0); animation: rippleAnim .6s var(--ease) forwards;
    pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(1); opacity: 0; } }

/* ============ 导航栏 ============ */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(8, 13, 24, 0.72);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 54px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.menu-btn {
    width: 38px; height: 38px; border-radius: 12px; border: none; cursor: pointer;
    background: rgba(255,255,255,0.06); color: var(--text);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; position: relative; overflow: hidden;
    transition: background .2s var(--ease);
}
.menu-btn:hover { background: rgba(255,255,255,0.12); }
.brand {
    display: flex; align-items: center; gap: 9px;
    font-weight: 700; font-size: 16px; letter-spacing: 0.01em;
    color: var(--text); text-decoration: none;
}
.brand img { width: 24px; height: 24px; border-radius: 7px; object-fit: cover; }
.brand .brand-grad {
    background: var(--grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 4px; }
.nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 15px; border-radius: 980px;
    font-size: 13px; font-weight: 500; color: var(--text2);
    text-decoration: none; position: relative; overflow: hidden;
    transition: all .2s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active {
    color: var(--cyan);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.25);
}

/* ============ 主容器 ============ */
.main { max-width: 1100px; margin: 0 auto; padding: 36px 20px 60px; }
.main-narrow { max-width: 680px; margin: 0 auto; padding: 40px 20px 60px; }

/* ============ 页头 ============ */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 26px;
}
.page-title h1 {
    font-size: 34px; font-weight: 800; letter-spacing: -0.01em;
    background: linear-gradient(120deg, #fff, #9fd8ff 60%, #c8bfff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-title .sub { color: var(--text2); font-size: 14px; margin-top: 8px; }
.page-title .sub b { color: var(--cyan); font-weight: 650; }

/* ============ 按钮（波纹内嵌） ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 22px; border-radius: 980px;
    font-size: 14px; font-weight: 600; font-family: inherit;
    border: none; cursor: pointer; text-decoration: none;
    position: relative; overflow: hidden;
    transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .2s var(--ease), opacity .2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--grad); color: #fff;
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.4), 0 0 0 1px rgba(0,212,255,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(0, 212, 255, 0.45), 0 0 0 1px rgba(0,212,255,0.5); }
.btn-glass {
    background: rgba(255,255,255,0.07); color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
}
.btn-glass:hover { background: rgba(255,255,255,0.12); }
.btn-danger { background: rgba(255,59,48,0.14); color: #ff6b61; box-shadow: inset 0 0 0 1px rgba(255,59,48,0.3); }
.btn-danger:hover { background: rgba(255,59,48,0.22); }
.btn-success { background: var(--grad); color: #fff; box-shadow: 0 4px 20px rgba(0, 113, 227, 0.4); }
.btn-success:hover { box-shadow: 0 6px 28px rgba(0, 212, 255, 0.45); }
.btn-approve { background: rgba(52,199,89,0.14); color: #5fe08a; box-shadow: inset 0 0 0 1px rgba(52,199,89,0.3); }
.btn-approve:hover { background: rgba(52,199,89,0.24); }
.btn-bx { background: rgba(255,149,0,0.14); color: #ffb340; box-shadow: inset 0 0 0 1px rgba(255,149,0,0.3); }
.btn-bx:hover { background: rgba(255,149,0,0.24); }
.btn-top { background: rgba(0,113,227,0.14); color: #4da3ff; box-shadow: inset 0 0 0 1px rgba(0,113,227,0.3); }
.btn-top:hover { background: rgba(0,113,227,0.24); }

.icon-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 13px; border-radius: 980px;
    font-size: 12px; font-weight: 600; font-family: inherit;
    border: none; cursor: pointer; text-decoration: none;
    background: rgba(255,255,255,0.06); color: var(--text2);
    position: relative; overflow: hidden;
    transition: all .18s var(--ease);
}
.icon-btn:hover { background: rgba(255,255,255,0.12); color: var(--text); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn.blue { background: rgba(0,113,227,0.12); color: #4da3ff; }
.icon-btn.blue:hover { background: rgba(0,113,227,0.22); }
.icon-btn.red { background: rgba(255,59,48,0.1); color: #ff6b61; }
.icon-btn.red:hover { background: rgba(255,59,48,0.2); }

/* ============ 统计胶囊 ============ */
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stat-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 980px;
    background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px var(--line);
    font-size: 12px; color: var(--text2); font-weight: 500;
}
.stat-pill b { font-size: 13px; color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.dot-n  { background: var(--green);  color: var(--green); }
.dot-m  { background: var(--red);    color: var(--red); }
.dot-p  { background: var(--text3);  color: var(--text3); }
.dot-pd { background: var(--orange); color: var(--orange); }
.dot-b  { background: var(--cyan);   color: var(--cyan); }

/* ============ 分区卡片 ============ */
.section-card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow-2), var(--glow);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    padding: 28px; margin-bottom: 30px;
}
.section-card h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.section-card .sec-sub { color: var(--text2); font-size: 13px; margin: 4px 0 22px; }
.section-card.editing { box-shadow: 0 0 0 2px rgba(0,212,255,0.4), var(--shadow-3); }
.section-card.flash { animation: flashCard 1.1s var(--ease); }
@keyframes flashCard {
    0%, 100% { box-shadow: var(--shadow-2), var(--glow); }
    30% { box-shadow: 0 0 0 2px rgba(0,212,255,0.5), var(--shadow-3); }
}

/* ============ 表单 ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text2); }
.form-label .required { color: var(--red); }
.form-control {
    width: 100%; padding: 11px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(10, 15, 28, 0.7);
    font-size: 14px; font-family: inherit; color: var(--text);
    transition: all .2s var(--ease);
}
.form-control::placeholder { color: var(--text3); }
.form-control:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.12), 0 0 18px rgba(0,212,255,0.08);
    background: rgba(8, 12, 24, 0.9);
}
textarea.form-control { resize: vertical; }
select.form-control {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b93a7'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-hint { font-size: 12px; color: var(--text3); }

/* 胶囊多选 */
.chip-options { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-option { position: relative; }
.chip-option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.chip-option label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 980px;
    background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px var(--line);
    font-size: 13px; font-weight: 500; color: var(--text2);
    cursor: pointer; user-select: none;
    transition: all .2s var(--ease);
}
.chip-option:hover label { background: rgba(255,255,255,0.09); }
.chip-option input:checked + label {
    color: var(--cyan); font-weight: 600;
    background: rgba(0, 212, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.45);
}
.chip-option input:focus-visible + label { box-shadow: 0 0 0 4px rgba(0,212,255,0.2); }

/* 复选框 */
.checkbox-group { display: flex; align-items: center; gap: 8px; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--cyan); cursor: pointer; }

/* 参数动态行 */
.params-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 26px 0 14px; padding-top: 22px; border-top: 1px solid var(--line);
}
.params-head h3 { font-size: 16px; font-weight: 700; }
.param-row {
    display: grid; grid-template-columns: 1fr 110px 110px 1fr auto;
    gap: 12px; align-items: end;
    background: rgba(8, 12, 24, 0.5); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px;
}
.param-row .del-btn { align-self: end; }

/* ============ 表格 ============ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    text-align: left; color: var(--text3); font-weight: 600;
    padding: 9px 10px; border-bottom: 1px solid var(--line);
}
.table td { padding: 11px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text2); }
.table tr:last-child td { border-bottom: none; }
.table td:first-child {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color: var(--cyan); font-weight: 600;
}
.req-yes { color: #ff6b61; font-weight: 600; }
.req-no  { color: var(--text3); }

/* ============ 徽章 / 标签 ============ */
.status-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 980px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.status-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.tag-normal     { background: rgba(52,199,89,0.12);  color: #5fe08a; }
.tag-maintenance{ background: rgba(255,59,48,0.12);  color: #ff6b61; }
.tag-private    { background: rgba(139,147,167,0.14);color: #aab2c4; }
.tag-paid       { background: rgba(255,149,0,0.13);  color: #ffb340; }

.meta-tag {
    display: inline-block; padding: 3px 9px; border-radius: 7px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
}
.meta-method.m-get  { background: rgba(0,212,255,0.12);  color: #4dd9ff; }
.meta-method.m-post { background: rgba(52,199,89,0.13);  color: #5fe08a; }
.meta-method.m-both { background: rgba(124,108,255,0.14); color: #a89dff; }
.meta-out { background: rgba(255,255,255,0.06); color: var(--text2); }

/* ============ details 展开 ============ */
.card-details { border-top: 1px solid var(--line); }
.card-details summary {
    list-style: none; cursor: pointer;
    padding: 11px 2px; font-size: 13px; font-weight: 600; color: var(--cyan);
    display: flex; align-items: center; justify-content: space-between;
    transition: color .2s var(--ease); user-select: none;
}
.card-details summary::-webkit-details-marker { display: none; }
.card-details summary::after {
    content: ''; width: 8px; height: 8px; flex: 0 0 8px;
    border-right: 1.6px solid var(--text3); border-bottom: 1.6px solid var(--text3);
    transform: rotate(45deg); transition: transform .25s var(--ease);
}
.card-details[open] summary::after { transform: rotate(-135deg); }
.details-body { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.card-details[open] .details-body { max-height: 560px; overflow: auto; }

/* ============ 代码块 ============ */
.code-block {
    background: rgba(4, 8, 16, 0.85); color: #c9f6ff;
    border: 1px solid rgba(0,212,255,0.14);
    border-radius: 10px; padding: 13px 15px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px; line-height: 1.6;
    white-space: pre-wrap; word-break: break-all;
    max-height: 320px; overflow: auto; margin-bottom: 14px;
}
.php-code { margin: 6px 0; }
.php-tag { color: #ff9f0a; }
.php-comment { color: #57d64a; }

/* ============ 提示条 ============ */
.alert {
    border-radius: var(--radius-sm); padding: 13px 16px;
    font-size: 13px; margin-bottom: 18px;
    display: flex; align-items: center; gap: 9px;
}
.alert-error { background: rgba(255,59,48,0.1); color: #ff6b61; box-shadow: inset 0 0 0 1px rgba(255,59,48,0.25); }
.alert-success { background: rgba(52,199,89,0.1); color: #5fe08a; box-shadow: inset 0 0 0 1px rgba(52,199,89,0.25); }

/* ============ 搜索 ============ */
.list-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.list-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.search-wrap { position: relative; max-width: 420px; width: 100%; }
.search-wrap > i {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text3); font-size: 13px; pointer-events: none;
}
.search-input {
    width: 100%; padding: 11px 16px 11px 40px;
    border-radius: 980px; border: 1px solid var(--line);
    background: rgba(10, 15, 28, 0.7); font-size: 14px; font-family: inherit;
    color: var(--text);
    transition: all .2s var(--ease);
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus {
    outline: none; border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(0,212,255,0.12), 0 0 18px rgba(0,212,255,0.08);
}

/* ============ 网格 / 卡片 ============ */
.grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    padding: 20px; display: flex; flex-direction: column;
    position: relative; overflow: hidden; text-decoration: none; color: inherit;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
    opacity: 0; transform: translateY(14px);
    animation: cardIn .45s var(--ease) forwards;
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.5), transparent);
    opacity: 0; transition: opacity .3s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-2), var(--glow); }
.card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-title-name { font-size: 16px; font-weight: 650; margin-top: 12px; }
.card-desc { font-size: 13px; color: var(--text2); margin-top: 4px; margin-bottom: 12px; }
.card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 14px; gap: 8px; flex-wrap: wrap;
}
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.visit-count { font-size: 12px; color: var(--text3); }

/* 友链卡片 */
.friend-card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    padding: 20px; display: flex; flex-direction: column;
    position: relative; overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
    opacity: 0; transform: translateY(14px);
    animation: cardIn .45s var(--ease) forwards;
}
.friend-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-2), var(--glow); }
.friend-card.highlighted { border-color: rgba(255,149,0,0.45); box-shadow: 0 0 0 1px rgba(255,149,0,0.3), var(--shadow-2), 0 0 22px rgba(255,149,0,0.1); }
.friend-header { display: flex; align-items: center; gap: 12px; }
.friend-avatar {
    width: 46px; height: 46px; border-radius: 14px; object-fit: cover;
    background: rgba(255,255,255,0.07); flex: 0 0 46px;
    border: 1px solid var(--line);
}
.friend-name { font-size: 15px; font-weight: 650; }
.friend-desc { font-size: 12px; color: var(--text2); margin-top: 2px; line-height: 1.45; }
.friend-desc2 { font-size: 13px; color: var(--text2); margin: 10px 0 14px; line-height: 1.55; }
.friend-url {
    font-size: 11px; color: var(--text3);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    word-break: break-all; margin-bottom: 12px;
}
.visit-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 980px;
    background: var(--grad); color: #fff;
    font-size: 13px; font-weight: 600; text-decoration: none;
    position: relative; overflow: hidden;
    transition: all .2s var(--ease);
    align-self: flex-start;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.35);
}
.visit-btn:hover { box-shadow: 0 6px 24px rgba(0, 212, 255, 0.4); }
.apply-card {
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; min-height: 180px; text-decoration: none; color: var(--text3);
    background: rgba(0, 212, 255, 0.03); position: relative; overflow: hidden;
    transition: all .3s var(--ease);
}
.apply-card:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 212, 255, 0.07); box-shadow: var(--glow); }
.apply-card .plus-circle {
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(0, 212, 255, 0.12); color: var(--cyan);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    box-shadow: 0 0 20px rgba(0,212,255,0.2);
}

/* ============ 加载 / 空态 ============ */
.loading-container {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 26px; color: var(--text3); font-size: 13px;
}
.loading-spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(0,212,255,0.15); border-top-color: var(--cyan);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.no-results {
    grid-column: 1 / -1; text-align: center;
    padding: 60px 20px; color: var(--text3); font-size: 14px;
}
.no-results i { font-size: 30px; opacity: .4; display: block; margin-bottom: 12px; color: var(--cyan); }

/* ============ 列表行（友链管理） ============ */
.link-list { display: flex; flex-direction: column; gap: 12px; }
.link-card {
    background: var(--card); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-1); border: 1px solid var(--line);
    padding: 18px;
    transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
    opacity: 0; transform: translateY(10px);
    animation: cardIn .4s var(--ease) forwards;
}
.link-card:hover { border-color: var(--line-strong); }
.link-card.highlighted { border-color: rgba(255,149,0,0.45); box-shadow: 0 0 18px rgba(255,149,0,0.08); }
.link-card .link-name { font-size: 15px; font-weight: 650; }
.link-card .link-url { font-size: 12px; color: var(--text3); margin-top: 2px; word-break: break-all; }
.link-icon { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: rgba(255,255,255,0.06); }
.link-desc { font-size: 13px; color: var(--text2); margin-top: 8px; }
.submit-time { font-size: 11px; color: var(--text3); margin-top: 8px; }
.link-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.edit-form {
    margin-top: 14px; padding: 16px;
    background: rgba(8, 12, 24, 0.5); border: 1px solid var(--line);
    border-radius: var(--radius-sm); display: none;
}
.edit-form .form-grid { grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; }
.empty-alert {
    padding: 18px; text-align: center; color: var(--text3); font-size: 13px;
    background: rgba(255,255,255,0.03); border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
}

/* ============ 横向滚动弹幕 ============ */
.danmu-layer {
    position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden;
}
.danmu-item {
    position: absolute; left: 0; top: 0;
    padding: 5px 14px; border-radius: 980px;
    background: rgba(8, 13, 24, 0.55);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid rgba(0,212,255,0.18);
    color: #cfeaff; font-size: 12.5px; white-space: nowrap;
    box-shadow: 0 0 16px rgba(0,212,255,0.08);
    transform: translateX(100vw);
    animation: danmuMove linear forwards;
}
@keyframes danmuMove {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100vw - 100%)); }
}

/* ============ 页脚 ============ */
.footer { text-align: center; padding: 26px; color: var(--text3); font-size: 13px; }

/* ============ 首页专用 ============ */
.hero {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 30px 20px;
}
.hero-card {
    position: relative; text-align: center;
    background: rgba(10, 15, 28, 0.6);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    backdrop-filter: blur(26px) saturate(160%);
    border: 1px solid var(--line);
    border-radius: 30px; box-shadow: var(--shadow-3), var(--glow);
    padding: 54px 46px 42px; max-width: 640px; width: 100%;
    animation: cardIn .55s var(--ease) forwards;
    overflow: hidden;
}
.hero-card::before {
    content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.7), transparent);
}
.avatar-wrap { position: relative; width: 104px; height: 104px; margin: 0 auto 22px; }
.avatar-ring {
    position: absolute; inset: -6px; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--cyan), var(--blue), var(--purple), var(--cyan));
    animation: spin 7s linear infinite;
    filter: drop-shadow(0 0 14px rgba(0,212,255,0.35));
}
.avatar-inner {
    position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
    border: 3px solid #0b1120;
}
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-name {
    font-size: 30px; font-weight: 800; letter-spacing: -0.01em;
    background: linear-gradient(120deg, #fff, #9fd8ff 60%, #c8bfff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--text2); font-size: 14px; margin-top: 8px; }
.count-row { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.count-pill {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    min-width: 100px; padding: 12px 18px; border-radius: 16px;
    background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px var(--line);
    font-size: 12px; color: var(--text3);
}
.count-pill .num {
    font-size: 24px; font-weight: 800; letter-spacing: -0.01em;
    background: var(--grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 30px; }
.action-btn {
    display: flex; align-items: center; justify-content: center; gap: 11px;
    padding: 17px 18px; border-radius: 16px;
    background: rgba(255,255,255,0.05);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--text); font-size: 14.5px; font-weight: 600; text-decoration: none;
    position: relative; overflow: hidden;
    transition: all .28s var(--ease);
}
.action-btn i { color: var(--cyan); font-size: 17px; filter: drop-shadow(0 0 8px rgba(0,212,255,0.5)); }
.action-btn:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-2), var(--glow);
    background: rgba(0, 212, 255, 0.06);
}
.action-btn:hover i { color: #fff; }
.action-btn:active { transform: scale(0.97); }
.welcome-card {
    margin-top: 22px; padding: 18px 22px; border-radius: 16px;
    background: rgba(0, 212, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.16);
}
.welcome-card .w-title { font-size: 14px; font-weight: 700; color: var(--cyan); }
.welcome-card .w-line { font-size: 13px; color: var(--text2); margin-top: 6px; }
.welcome-card .w-line b { color: var(--text); font-weight: 600; }
.beian-row { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.beian-pill {
    display: inline-block; padding: 7px 18px; border-radius: 980px;
    background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px var(--line);
    font-size: 12px; color: var(--text2); text-decoration: none;
    animation: gentleFloat 3.2s ease-in-out infinite;
    transition: color .2s var(--ease);
}
.beian-pill:hover { color: var(--cyan); }
.copyright { font-size: 12px; color: var(--text3); }

@keyframes gentleFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .main { padding: 24px 16px 48px; }
    .main-narrow { padding: 28px 16px 48px; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .page-title h1 { font-size: 28px; }
    .form-grid, .edit-form .form-grid { grid-template-columns: 1fr; }
    .param-row { grid-template-columns: 1fr 1fr; }
    .grid { grid-template-columns: 1fr; }
    .nav-inner { padding: 0 12px; }
    .nav-link { padding: 7px 11px; }
    .nav-links .nav-link span { display: none; }
    .section-card { padding: 20px; }
    .hero-card { padding: 38px 22px 30px; border-radius: 24px; }
    .action-row { grid-template-columns: 1fr; }
    .hero-name { font-size: 25px; }
}
@media (max-width: 480px) {
    .param-row { grid-template-columns: 1fr; }
}

/* 尊重系统减少动效设置 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .danmu-item { display: none; }
}


/* ============ 浅色主题（白天模式） ============ */
:root[data-theme="light"] {
    --bg: #f2f5fa;
    --bg2: #ffffff;
    --card: rgba(255, 255, 255, 0.82);
    --card-solid: #ffffff;
    --line: rgba(15, 23, 42, 0.09);
    --line-strong: rgba(0, 113, 227, 0.4);
    --text: #0f172a;
    --text2: #475569;
    --text3: #94a3b8;
    --cyan: #0090e8;
    --blue: #0071e3;
    --purple: #6c5ce7;
    --green: #1db954;
    --red: #ff3b30;
    --orange: #f59e0b;
    --shadow-1: 0 1px 3px rgba(15,23,42,0.08);
    --shadow-2: 0 8px 30px rgba(15,23,42,0.10);
    --shadow-3: 0 20px 60px rgba(15,23,42,0.16);
    --glow: 0 0 26px rgba(0, 113, 227, 0.10);
}
:root[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
}
:root[data-theme="light"] body::after {
    background:
        radial-gradient(600px 400px at 12% -5%, rgba(0,144,232,0.10), transparent 60%),
        radial-gradient(700px 500px at 108% 108%, rgba(108,92,231,0.10), transparent 60%);
}
:root[data-theme="light"] .navbar { background: rgba(255,255,255,0.78); }
:root[data-theme="light"] .menu-btn { background: rgba(15,23,42,0.06); color: var(--text); }
:root[data-theme="light"] .menu-btn:hover { background: rgba(15,23,42,0.1); }
:root[data-theme="light"] .btn-glass { background: rgba(15,23,42,0.05); }
:root[data-theme="light"] .btn-glass:hover { background: rgba(15,23,42,0.09); }
:root[data-theme="light"] .form-control,
:root[data-theme="light"] .search-input { background: rgba(255,255,255,0.9); border-color: var(--line); }
:root[data-theme="light"] .form-control:focus,
:root[data-theme="light"] .search-input:focus { background: #fff; }
:root[data-theme="light"] select.form-control {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
:root[data-theme="light"] .code-block { background: rgba(15,23,42,0.92); }
:root[data-theme="light"] .danmu-item { background: rgba(255,255,255,0.8); color: #334155; border-color: rgba(0,144,232,0.3); }
:root[data-theme="light"] #drawer { background: rgba(255,255,255,0.88); }
:root[data-theme="light"] #drawer-mask { background: rgba(15,23,42,0.35); }
:root[data-theme="light"] .hero-card,
:root[data-theme="light"] .login-box,
:root[data-theme="light"] .error-card { background: rgba(255,255,255,0.82); }
:root[data-theme="light"] .param-row,
:root[data-theme="light"] .edit-form { background: rgba(15,23,42,0.03); }
:root[data-theme="light"] .chip-option label { background: rgba(15,23,42,0.05); }
:root[data-theme="light"] .chip-option input:checked + label { color: var(--blue); background: rgba(0,113,227,0.1); box-shadow: inset 0 0 0 1px rgba(0,113,227,0.4); }
:root[data-theme="light"] .page-title h1,
:root[data-theme="light"] .hero-name {
    background: linear-gradient(120deg, #0f172a, #0090e8 60%, #6c5ce7);
    -webkit-background-clip: text; background-clip: text;
}
:root[data-theme="light"] .api-header h1 {
    background: linear-gradient(120deg, #0f172a, #0090e8 60%, #6c5ce7);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
:root[data-theme="light"] .table td:first-child { color: var(--blue); }
:root[data-theme="light"] .meta-method.m-get { background: rgba(0,144,232,0.1); color: #0080cc; }
:root[data-theme="light"] .meta-method.m-post { background: rgba(29,185,84,0.12); color: #17a34a; }
:root[data-theme="light"] .meta-method.m-both { background: rgba(108,92,231,0.12); color: #5b4fd8; }

/* ============ 主题切换按钮 ============ */
.theme-toggle {
    width: 36px; height: 36px; border-radius: 12px; border: none; cursor: pointer;
    background: rgba(255,255,255,0.06); color: var(--text2);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; position: relative; overflow: hidden;
    transition: all .25s var(--ease);
}
.theme-toggle:hover { background: rgba(0,212,255,0.14); color: var(--cyan); box-shadow: 0 0 14px rgba(0,212,255,0.2); }
:root[data-theme="light"] .theme-toggle { background: rgba(15,23,42,0.06); }
:root[data-theme="light"] .theme-toggle:hover { color: var(--blue); background: rgba(0,113,227,0.1); }

/* 点击点处的青色脉冲环 */
.veil-pulse {
    position: fixed; z-index: 9998; width: 44px; height: 44px;
    margin: -22px 0 0 -22px; border-radius: 50%;
    border: 3px solid rgba(0,212,255,0.85);
    box-shadow: 0 0 34px rgba(0,212,255,0.6), inset 0 0 18px rgba(0,212,255,0.3);
    pointer-events: none; transform: scale(0);
    animation: veilPulse .55s var(--ease) forwards;
}
:root[data-theme="light"] .veil-pulse {
    border-color: rgba(0,144,232,0.85);
    box-shadow: 0 0 34px rgba(0,144,232,0.5), inset 0 0 18px rgba(0,144,232,0.25);
}
@keyframes veilPulse { to { transform: scale(28); opacity: 0; } }

/* ============ 转场遮罩（类切换，杜绝残留） ============ */
#transition-veil {
    position: fixed; inset: 0; z-index: 9999; pointer-events: none;
    --x: 50%; --y: 50%;
    clip-path: circle(0px at var(--x) var(--y));
    visibility: hidden;
    background: radial-gradient(circle at var(--x) var(--y), rgba(0,212,255,0.30), rgba(7,11,20,0.97) 58%);
    transition: clip-path .42s var(--ease), visibility 0s linear .55s;
}
#transition-veil.on {
    visibility: visible;
    transition: clip-path .42s var(--ease);
}
#transition-veil.off { display: none !important; visibility: hidden !important; clip-path: circle(0px at 50% 50%) !important; }
:root[data-theme="light"] #transition-veil {
    background: radial-gradient(circle at var(--x) var(--y), rgba(0,144,232,0.28), rgba(242,245,250,0.98) 58%);
}

/* ============ 浅色主题补充 ============ */
:root[data-theme="light"] .nav-link:hover,
:root[data-theme="light"] .drawer-item:hover,
:root[data-theme="light"] .icon-btn,
:root[data-theme="light"] .meta-out,
:root[data-theme="light"] .count-pill,
:root[data-theme="light"] .stat-pill,
:root[data-theme="light"] .beian-pill,
:root[data-theme="light"] .action-btn,
:root[data-theme="light"] .empty-alert,
:root[data-theme="light"] .loading-container { background: rgba(15,23,42,0.05); }
:root[data-theme="light"] .icon-btn:hover { background: rgba(15,23,42,0.1); }
:root[data-theme="light"] .action-btn:hover { background: rgba(0,113,227,0.06); box-shadow: var(--shadow-2); }
:root[data-theme="light"] .card::before,
:root[data-theme="light"] .hero-card::before { background: linear-gradient(90deg, transparent, rgba(0,113,227,0.5), transparent); }
:root[data-theme="light"] .welcome-card { background: rgba(0,113,227,0.06); box-shadow: inset 0 0 0 1px rgba(0,113,227,0.2); }
:root[data-theme="light"] .bottom-nav .nav-btn { background: rgba(255,255,255,0.92); color: #334155; }
:root[data-theme="light"] .bottom-nav .nav-btn:hover { color: var(--blue); }
:root[data-theme="light"] .footer { color: #94a3b8; }
