/* NetworkPanel PHP版本 - 主样式表 */

/* ========== CSS变量与主题 ========== */
:root {
    --primary-color: #5668EE;
    --primary-gradient: linear-gradient(145deg, #485bed, #6576ff);
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #344357;
    --text-secondary: #6071ee;
    --text-info: #909399;
    --border-color: #dbdfea;
    --icon-color: rgb(96, 98, 102);
    --icon-main: rgb(9, 194, 222);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --radius-round: 20px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #111111;
        --card-bg: rgb(18, 18, 18);
        --text-primary: rgb(193, 206, 230);
        --text-secondary: rgb(152, 167, 202);
        --text-info: rgb(165, 167, 172);
        --border-color: rgb(61, 63, 66);
        --icon-color: rgb(165, 167, 172);
        --icon-main: rgb(30, 105, 131);
    }
}

/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== 头部导航 ========== */
.header {
    background-color: var(--card-bg);
    padding: 0 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: sticky;
    top: 0; z-index: 100;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.logo-section {
    display: flex; align-items: center; gap: 10px;
}
.logo-icon {
    width: 34px; height: 34px; background-color: var(--primary-color); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.logo-icon svg { width: 22px; height: 22px; }
.title { font-size: 18px; font-weight: bold; color: var(--text-primary); }

/* 导航链接 */
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
    background: none; border: none; color: var(--text-info); font-size: 14px;
    padding: 7px 16px; cursor: pointer; border-radius: 8px; transition: all .2s;
    text-decoration: none; white-space: nowrap;
}
.nav-btn {
    background: var(--primary-color); color: #fff;
    border-radius: 20px; padding: 6px 18px; font-size: 13px; font-weight: 500;
}
.nav-btn:hover, .nav-btn.active {
    background: #4a5ad0; transform: translateY(-1px);
}
.btn-center {
    background: var(--primary-color); color: #fff !important;
    border-radius: 20px; padding: 6px 18px; font-size: 13px; font-weight: 500;
}
.btn-center:hover { background: #4a5ad0; }
.nav-link-divider {
    width: 1px; height: 20px; background: var(--border-color); margin: 0 6px;
}
.nav-user { gap: 4px !important; }
.nav-user-center { color: var(--primary-color); font-weight: 500; text-decoration: none; transition: opacity .2s; }
.nav-user-center:hover { opacity: .8; text-decoration: none; }

.header-actions { display: flex; gap: 8px; }

.btn-link {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    padding: 4px 14px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========== 主内容区 ========== */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
}

/* ========== 信息面板（NetArt风格） ========== */
.info-panel {
    max-width: 960px;
    margin: 12px auto 0;
    padding: 0 16px; /* 与主内容区 padding 统一 */
}
.info-panel-inner {
    background: var(--card-bg);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow);
    padding: 24px;
}

/* IP + 用户状态顶栏 */
.info-top-bar {
    display: flex; align-items: center; gap: 14px;
    background: #f5f6ff; border-radius: 14px; padding: 10px 20px; margin-bottom: 18px;
}
@media (prefers-color-scheme: dark) {
    .info-top-bar { background: rgba(86,104,238,.08); }
}
.ip-display-area {
    flex: 1; display: flex; align-items: center; gap: 8px;
    min-width: 0;
}
.globe-icon { font-size: 22px; flex-shrink: 0; }
.heartbeat-icon {
    font-size: 18px; flex-shrink: 0; color: #67c23a;
    transition: color .3s;
}
.heartbeat-icon.hb-ok { color: #67c23a; }
.heartbeat-icon.hb-error { color: #f56c6c; }
@keyframes hbBeat {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.3); }
}
.heartbeat-icon {
    animation: hbBeat 1s ease-in-out infinite;
}
.current-ip {
    font-size: 15px; color: #a0aec0; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; letter-spacing: .3px;
}

.icon-btn-search {
    width: 38px; height: 38px; border: none; border-radius: 10px;
    background: var(--primary-color); color: #fff; cursor: pointer;
    font-size: 17px; display: flex; align-items: center; justify-content: center;
    transition: filter .2s; flex-shrink: 0;
}
.icon-btn-search:hover { filter: brightness(1.1); }

.user-status-area {
    display: flex; align-items: center; gap: 6px; padding: 6px 14px;
    border-radius: 8px; background: #f0f2f5; flex-shrink: 0;
    font-size: 13px; color: var(--text-info);
}
.status-icon-user { font-size: 15px; }
.online-dot {
    width: 8px; height: 8px; border-radius: 50%;
    animation: pulse-dot 2s infinite;
}
.online-dot-offline { background: #c0c4cc; animation: none; }
.online-dot-online { background: #67c23a; }

/* 登录/注册按钮组 */
.auth-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.auth-btn {
    display: inline-block;
    padding: 4px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    letter-spacing: .5px;
}
.auth-login {
    background: var(--primary-color);
    color: #fff;
}
.auth-login:hover { filter: brightness(1.1); transform: translateY(-1px); }
.auth-register {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.auth-register:hover { background: var(--primary-color); color: #fff; }

/* 已登录状态 */
.user-logged-name {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.member-link {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
    font-weight: 500;
}
.member-link:hover { text-decoration: underline; }

/* ========== 公告/广告位（滚动） ========== */
.notice-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f6ff 0%, #fff5f5 100%);
    border: 1px solid #e8e0ff;
}
.notice-icon { font-size: 15px; flex-shrink: 0; }
.notice-scroll-wrap {
    flex: 1;
    overflow: hidden;
    height: 22px;
    position: relative;
}
.notice-scroll-inner {
    display: flex;
    flex-direction: column;
    transition: transform .5s ease;
}
.notice-item {
    font-size: 13px;
    color: #5b4fc7;
    line-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}
.notice-item a {
    color: #485bed;
    text-decoration: none;
}
.notice-item a:hover { text-decoration: underline; }

@keyframes pulse-dot {
    0%,100%{opacity:1} 50%{opacity:.4}
}

/* 信息卡片行 */
.info-cards-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    margin-bottom: 18px;
}
.info-cards-row-lg { margin-bottom: 0; }

.info-card {
    background: #fafbfc; border-radius: 14px; padding: 18px 20px;
    min-height: 90px; transition: transform .2s, box-shadow .2s;
}
@media (prefers-color-scheme: dark) {
    .info-card { background: #161722; }
}
.info-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.info-card-label {
    font-size: 13px; color: #8b95a5; margin-bottom: 8px; letter-spacing: .3px;
}
.info-card-value {
    font-size: 19px; font-weight: 600; color: var(--text-primary);
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 浏览器/系统/设备图标 */
.browser-icon, .os-icon, .device-icon { font-size: 18px; flex-shrink: 0; }
.browser-icon { filter: grayscale(0.2); }
.os-icon { font-size: 16px; }
.device-icon { font-size: 17px; }

/* 圆形进度卡片 */
.info-card-circle { text-align: center; display: flex; flex-direction: column; align-items: center; min-height: auto; }
.circle-card-header {
    font-size: 13.5px; color: #6b7aa1; margin-bottom: 12px;
    display: flex; align-items: center; gap: 5px;
}
.circle-icon { font-size: 16px; }

.circle-progress-wrapper {
    position: relative; width: 110px; height: 110px; margin: 0 auto 8px;
}
.circle-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.circle-bg {
    fill: none; stroke: #eef0f5; stroke-width: 7; stroke-linecap: round;
}
.circle-bar {
    fill: none; stroke: #e74c3c; stroke-width: 7; stroke-linecap: round;
    stroke-dasharray: 314; stroke-dashoffset: 314;
    transition: stroke-dashoffset 1s ease;
}
.circle-bar-blue { stroke: #5668EE !important; }
.circle-text {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 26px; font-weight: 700; color: var(--text-primary);
}
.circle-subtext {
    position: absolute; top: 64%; left: 50%; transform: translateX(-50%);
    font-size: 11px; color: #b0b5c0; white-space: nowrap;
}
.circle-footer-text {
    font-size: 15px; font-weight: 600; color: var(--text-primary); margin-top: 4px;
}

/* 硬件信息卡片 */
.info-card-hardware { min-height: auto; }
.hardware-content { text-align: center; }
.ecg-line { width: 160px; height: 36px; margin: 0 auto 10px; }
.ecg-line svg { width: 100%; height: 100%; overflow: visible; }
.ecg-polyline {
    fill: none; stroke: #5668EE; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 600; animation: ecg-flow 3s linear infinite;
}
@keyframes ecg-flow {
    to { stroke-dashoffset: -600; }
}
.run-status-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: #e8fdf0; color: #27ae60; padding: 5px 16px;
    border-radius: 20px; font-size: 13px; font-weight: 500;
}
.run-ok { background: #e8fdf0; color: #27ae60; }
.run-warn { background: #fef6e7; color: #d48806; }
.run-err { background: #fef0f0; color: #cf2828; }
.run-dot {
    width: 7px; height: 7px; border-radius: 50%; background: currentColor;
    animation: run-blink 1.5s infinite;
}
@keyframes run-blink {
    0%,100%{opacity:1} 50%{opacity:.25}
}
.hardware-detail {
    font-size: 13px; color: var(--text-info); line-height: 1.6; margin-top: 8px;
}

/* ========== 卡片 ========== */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-round);
    padding: 2%;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

.main-panel .panel-body {
    padding: 20px 10px;
}

/* ========== 控制行 ========== */
.control-row {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.label {
    font-size: 16px;
    color: var(--text-primary);
    white-space: nowrap;
    font-weight: bold;
    background: linear-gradient(to right, #37CAC6, #3D95F4 80px);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 限额管理的label也要大 */
.limit-row .label {
    font-size: 15px;
}

.btn-copy-url {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px; font-size: 13px; font-weight: 500;
    background: linear-gradient(135deg, #5668EE, #6576ff);
    color: #fff; border: none; border-radius: 8px;
    cursor: pointer; transition: all .25s; box-shadow: 0 2px 8px rgba(86,104,238,.3);
}
.btn-copy-url:hover {
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(86,104,238,.45);
    filter: brightness(1.08);
}
.btn-copy-url:active { transform: translateY(0); }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    padding: 6px 10px;   /* 加大内边距 */
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border-radius: 4px;
}

.icon-btn:hover {
    opacity: 1;
}

.url-select {
    width: 100%;
    padding: 8px 30px 8px 32px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23909399'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* ========== 滑块 ========== */
.slider-row {
    margin-top: 20px;
}

.slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--primary-color) calc((var(--val) - 1) / 31 * 100%), var(--border-color) calc((var(--val) - 1) / 31 * 100%));
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ========== 限额管理 ========== */
.limit-row {
    margin-top: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.limit-input-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.limit-input {
    width: 80px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: var(--card-bg);
    color: var(--text-primary);
}
.limit-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(72,91,237,.15);
}

.limit-unit-select {
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 6px;
    font-size: 13px;
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
}
.limit-unit-select:focus {
    border-color: var(--primary-color);
}

.limit-hint {
    font-size: 12px;
    color: var(--text-hint);
    margin-left: 8px;
    white-space: nowrap;
}

/* ========== 开关 ========== */
.switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    height: 32px;
}

.switch-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.switch {
    position: relative;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-switch {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    border-radius: 20px;
    transition: 0.3s;
}

.slider-switch:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .slider-switch {
    background-color: var(--primary-color);
}

/* 后台保活开关用橙色 */
.slider-switch-orange { background-color: #ccc; }
.switch input:checked + .slider-switch-orange {
    background-color: #ff9800;
}

.switch input:checked + .slider-switch:before,
.switch input:checked + .slider-switch-orange:before {
    transform: translateX(16px);
}

/* 开关行：多个开关并排 */
.switch-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ========== 数据卡片 ========== */
.data-cards {
    column-count: 3;
    column-gap: 10px;
    margin-top: 15px;
}

@media (maxwidth: 800px) {
    .data-cards { column-count: 1; }
}

.data-card {
    break-inside: avoid;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    padding: 20px 15px 15px 25px;
    position: relative;
    margin-bottom: 10px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
}

.card-label {
    font-size: 17px;
    font-weight: bold;
    background: linear-gradient(to right, #37CAC6, #3D95F4 80px);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-max {
    font-size: 11px;
    color: var(--text-info);
}

.edit-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 13px;
    height: 15px;
    line-height: 1;
    padding: 0 2px;
}

.state-icon {
    display: block;
    text-align: right;
    margin-right: 10px;
    margin-left: auto;
    margin-top: -10px;
    width: 40px;
    height: 20px;
    color: var(--icon-color);
}

.state-icon svg {
    width: 32px;
    height: 32px;
}

.state-icon-main {
    color: var(--icon-main);
}

.predict-btn {
    vertical-align: -2px;
}

.card-value {
    font-weight: 700;
    font-size: 28px;
    line-height: 2.5rem;
    white-space: nowrap;
}

.state-value-main {
    /* 特殊样式由主色控制 */
}

/* ========== 开始/停止按钮（长方形） ========== */
.play-btn-container {
    text-align: center;
    margin: 32px auto 12px;
}

.play-btn-rect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 220px;
    height: 56px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    background-image: var(--primary-gradient);
    background-color: #485bed;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2px;
    box-shadow: 0 4px 16px rgba(72,91,237,.35), inset 0 1px 0 rgba(255,255,255,.15);
    transition: all .25s ease;
}

.play-btn-rect:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(72,91,237,.45), inset 0 1px 0 rgba(255,255,255,.15);
    filter: brightness(1.06);
}

.play-btn-rect:active {
    transform: translateY(0) scale(.98);
    box-shadow: 0 2px 8px rgba(72,91,237,.3);
}

/* 停止按钮（红色系） */
.play-btn-rect.btn-stop {
    background-image: linear-gradient(145deg, #e85555, #ff6b6b);
    background-color: #e85555;
    box-shadow: 0 4px 16px rgba(232,85,85,.35), inset 0 1px 0 rgba(255,255,255,.15);
}
.play-btn-rect.btn-stop:hover {
    box-shadow: 0 8px 24px rgba(232,85,85,.45), inset 0 1px 0 rgba(255,255,255,.15);
    filter: brightness(1.06);
}
.play-btn-rect.btn-stop:active {
    box-shadow: 0 2px 8px rgba(232,85,85,.3);
}

.btn-icon-play { fill: white; width: 22px; height: 22px; margin-left: -4px; }
.btn-icon-stop { fill: white; width: 18px; height: 18px; }

.loading-spinner { display: inline-block; }

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    top: 42px;
    left: 42px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 工具栏 ========== */
.toolbar {
    display: flex;
    justify-content: space-between;
    margin-top: -15px;
}

.toolbar-left, .toolbar-right {
    display: flex;
    gap: 8px;
}

.tool-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tool-btn:hover {
    opacity: 1;
}

/* ========== 图表 ========== */
.chart-divider {
    display: flex;
    align-items: center;
    margin: 28px 0 16px;
}
.chart-divider::before {
    content: none;
}
.chart-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 16px;
}
.chart-divider-title {
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 1px;
}
.chart-container {
    width: 100%;
    height: 300px;
    margin-top: 16px;
    border-radius: 12px;
    background: #fff;
    padding: 8px 0;
}

/* ========== IP面板 ========== */
.ip-panel {
    text-align: center;
    padding: 15px 2%;
}

.ip-loading {
    color: var(--text-primary);
    font-size: 14px;
}

.ip-entry {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: default;
    margin: 3px 0;
    transition: opacity 0.2s;
}

.ip-entry:hover {
    opacity: 0.8;
}

.ip-tag {
    width: 50px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    background-color: #67c23a;
    display: inline-block;
}

.ip-text {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    vertical-align: -1px;
}

/* ========== 页脚（新版公共底部） ========== */
.footer-public {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}
.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
    text-align: center;
}
.footer-custom-text {
    font-size: 14px; color: var(--text-secondary); line-height: 1.8;
    margin-bottom: 8px;
}
.friend-links-footer {
    margin-bottom: 10px;
    display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap;
}
.friend-links-footer .friend-link-item {
    color: var(--text-info); text-decoration: none; font-size: 13px;
}
.friend-links-footer .friend-link-item:hover { color: var(--primary-color); }
.fl-sep { color: #ccc; font-size: 12px; }
.footer-bottom-row {
    display: flex; justify-content: center; align-items: center; gap: 6px;
    flex-wrap: wrap; font-size: 13px;
}
.footer-copyright { color: var(--text-info); }
.footer-divider { color: #ddd; }
.footer-icp { color: var(--text-info); text-decoration: none; }
.footer-icp:hover { color: var(--primary-color); }
.footer-html-area {
    margin-top: 10px; font-size: 13px; color: var(--text-info);
}

/* ========== 底部区域：排行榜 + 友情链接（在footer上方） ========== */
.bottom-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 20px;
}

/* ========== 中间区块：排行榜 + 友情链接 ========== */
.mid-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 16px;
}
.mid-card {
    border-radius: var(--radius-round);
    padding: 22px 26px;
    margin-bottom: 16px;
}
.mid-card-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.mid-card-title-bar {
    width: 4px; height: 20px; background: var(--primary-color);
    border-radius: 2px; flex-shrink: 0;
}
.mid-card-title {
    font-size: 17px; font-weight: 700; color: var(--text-primary);
}
.mid-card-title small {
    font-weight: 400; font-size: 12px; color: #bbb; margin-left: 4px;
}

/* 今日排行列表 */
.rank-list-today { min-height: 60px; }
.rank-loading {
    text-align: center; padding: 30px 0; color: var(--text-info); font-size: 14px;
}
.rank-today-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 10px; margin-bottom: 6px;
    transition: background .2s;
}
.rank-today-item:last-child { margin-bottom: 0; }
.rank-today-item:hover { background: rgba(86,104,238,.04); }
.rank-medal {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0; font-style: normal;
}
.medal-gold   { background: linear-gradient(135deg,#ffd700,#ffaa00); }
.medal-silver { background: linear-gradient(135deg,#c0c0c0,#a0a0a0); }
.medal-bronze { background: linear-gradient(135deg,#cd7f32,#a0522d); }
.medal-num { background: #f0f2f5; color: #999; font-size: 12px; font-weight: 600; }

.rank-avatar-sm {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
    border: 2px solid #eee; flex-shrink: 0;
}
.rank-noavatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--primary-color); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: bold; flex-shrink: 0;
}
.rank-user-name { font-weight: 500; color: var(--text-primary); font-size: 15px; min-width: 0;}
.rank-user-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bytes-val {
    margin-left: auto; font-weight: 600; color: var(--text-secondary);
    font-size: 14px; flex-shrink: 0;
}

/* 友情链接卡片 */
.friend-links-body {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.friend-link-item {
    display: inline-block; padding: 7px 18px; border-radius: 8px;
    background: #f5f7fa; color: var(--text-primary);
    text-decoration: none; font-size: 14px; transition: all .2s;
    border: 1px solid transparent;
}
@media (prefers-color-scheme: dark) {
    .friend-link-item { background: #1e1e2e; }
}
.friend-link-item:hover {
    border-color: var(--primary-color); color: var(--primary-color);
    transform: translateY(-1px);
}
.fl-sep { color: #ccc; font-size: 14px; }

/* ========== 独立排行榜页面 ========== */
.rank-page-content { padding-top: 20px; }
.rank-page-section { padding: 30px 3%; }
.rank-page-title { text-align: center; font-size: 22px; margin-bottom: 24px; color: var(--text-primary); }

.rank-period-tabs {
    display: flex; justify-content: center; gap: 4px; margin-bottom: 28px;
}
.rank-tab {
    padding: 10px 28px; border: none; border-radius: 10px;
    background: #f0f2f5; color: var(--text-info); cursor: pointer;
    font-size: 15px; font-weight: 500; transition: all .25s;
}
.rank-tab.active {
    background: var(--primary-color); color: #fff;
    box-shadow: 0 4px 12px rgba(86,104,238,.35);
}
.rank-tab:hover:not(.active) { background: #e8eaef; color: var(--text-primary); }

/* 领奖台 */
.rank-podium {
    display: flex; justify-content: center; align-items: flex-end; gap: 20px;
    margin-bottom: 36px; padding: 0 10px;
}
.podium-item {
    display: flex; flex-direction: column; align-items: center; width: 110px;
    position: relative;
}
/* 领奖台从上到下顺序：名字 → 头像 → 数值 → 柱子 */
.podium-name { font-weight: 600; font-size: 14px; color: var(--text-primary); white-space: nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; order: 1; margin-bottom: 6px;}
.podium-avatar-wrap { position: relative; margin-bottom: 8px; order: 2; }
.podium-value { font-size: 13px; color: var(--secondary); font-weight: 600; margin-top: 2px; order: 3; }
.podium-bar {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 70%; min-height: 40px; border-radius: 6px 6px 0 0;
    transition: height .8s ease; order: 4;
}
.podium-1st .podium-bar { background: linear-gradient(to top, #ffd700, #ffe066); }
.podium-2nd .podium-bar { background: linear-gradient(to top, #c0c0c0, #e0e0e0); }
.podium-3rd .podium-bar { background: linear-gradient(to top, #cd7f32, #daa06d); }

.podium-avatar {
    width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
    border: 3px solid #eee; box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.podium-1st .podium-avatar { width: 68px; height: 68px; border-width: 3px; border-color: #ffd700; }
.podium-badge {
    position: absolute; bottom: -4px; right: -4px;
    font-size: 18px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
}

/* 完整排行表格 */
.rank-table-full {
    width: 100%; border-collapse: collapse; border-radius: 12px; overflow: hidden;
}
.rank-table-full th {
    padding: 14px 16px; text-align: left; font-size: 13px;
    background: rgba(86,104,238,.05); color: var(--text-secondary);
    font-weight: 600; border: none;
}
.rank-table-full td {
    padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px;
}
@media (prefers-color-scheme: dark) {
    .rank-table-full td { border-bottom-color: #222; }
}
.rank-num { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%; font-size:12px; font-weight:700; background:#f0f2f5; color:#888; }
.rank-gold { background:linear-gradient(135deg,#ffd700,#ffaa00)!important; color:#fff!important; }
.rank-silver { background:linear-gradient(135deg,#c0c0c0,#a0a0a0)!important; color:#fff!important; }
.rank-bronze { background:linear-gradient(135deg,#cd7f32,#a0522d)!important; color:#fff!important; }

.rank-user-cell { display:flex; align-items:center; gap:10px; }
.rank-list-avatar { width:32px; height:32px; border-radius:50%; object-fit:cover; }
.rank-list-noavatar { 
    width:32px; height:32px; border-radius:50%; background:var(--primary-color);
    color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:bold;
}

/* ========== 弹窗 ========== */
.modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 90vw;
    background-color: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.modal-sm {
    max-width: 400px;
}

.modal-lg {
    max-width: 700px;
    width: 90vw;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-info);
    line-height: 1;
    padding: 0 4px;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    width: 50px;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.input-group select {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

/* 按钮 */
.btn-default {
    padding: 8px 18px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-default:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-primary {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

/* 警告框 */
.alert {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 10px;
    line-height: 1.6;
}

.alert-warning {
    background-color: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #faecd8;
}

.alert-error {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fde2e2;
}

/* ========== 排行榜 ========== */
.rank-filters {
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-height: 300px;
}

.rank-table th,
.rank-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.rank-table th {
    font-weight: 600;
    background-color: rgba(86, 104, 238, 0.05);
}

.rank-user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.tag-isp {
    display: inline-block;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.tag-isp.isp-mobile { background-color: rgba(103,194,58,0.1); color: #67c23a; }
.tag-isp.isp-unicom { background-color: rgba(230,162,60,0.1); color: #e6a23c; }
.tag-isp.isp-telecom { background-color: rgba(245,108,108,0.1); color: #f56c6c; }
.tag-isp.isp-broadband { background-color: rgba(144,147,153,0.1); color: #909399; }
.tag-isp.isp-other { background-color: rgba(86,104,238,0.1); color: #5668ee; }

/* ========== 关于弹窗 ========== */
.about-body h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.about-body p {
    font-size: 14px;
    margin-bottom: 5px;
}

.about-body a {
    color: var(--primary-color);
    text-decoration: none;
}

.about-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

.qa-item {
    margin-top: 12px;
}

.ask {
    color: var(--text-secondary);
    font-weight: 500;
}

.answer {
    color: var(--text-primary);
    margin-left: 10px;
}

.predict-body p {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--border-color);
}

.predict-body p:last-child {
    border-bottom: none;
}

/* ========== 全屏模式 ========== */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0, 0, 0);
    color: white;
    z-index: 999999;
    cursor: pointer;
}

.fullscreen-content {
    position: absolute;
    width: 96%;
    max-width: 600px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: fsStandby 60s infinite alternate ease-in-out;
}

@keyframes fsStandby {
    0%   { top: 50%; left: 50%; }
    49%  { top: 50%; left: 50%; }
    51%  { top: 55%; left: 51%; }
    100% { top: 55%; left: 51%; }
}

.fs-title {
    font-size: 30px;
    margin-top: 3vh;
}

.fs-time {
    font-size: 60px;
    font-weight: 300;
    letter-spacing: 2px;
}

.fs-date {
    font-size: 20px;
    margin-top: -5px;
}

@media (min-width: 500px) {
    .fullscreen-content {
        column-count: 2;
    }
    .fs-right {
        margin-top: -1vh;
    }
}

.fs-des {
    font-size: 15px;
    font-weight: 900;
}

.fs-value {
    font-size: 20px;
}

/* 自定义节点列表 */
.node-list-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-info);
    font-size: 14px;
}

.node-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.node-list-item:last-child {
    border-bottom: none;
}

.node-name {
    font-weight: 500;
    width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.node-url {
    flex: 1;
    color: var(--text-info);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-node-btn {
    background: none;
    border: none;
    color: #f56c6c;
    cursor: pointer;
    font-size: 18px;
}

/* ========== 认证/登录相关 ========== */
.auth-tab {
    flex: 1; padding: 10px; background: none; border: none; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid transparent;
    transition: all .2s;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-tab:hover:not(.active) { color: var(--text-primary); }
.auth-msg {
    margin-top: 10px; padding: 8px 12px; border-radius: 6px; font-size: 13px;
    display: none; text-align: center;
}
.msg-success { background: rgba(103,194,58,.08); color: #67c23a; display: block; }
.msg-error { background: rgba(245,108,108,.08); color: #f56c6c; display: block; }

/* 用户徽标 */
.user-avatar-sm {
    width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 99999;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ========== 信息面板响应式 ========== */
@media (max-width: 768px) {
    .info-cards-row { grid-template-columns: 1fr !important; gap: 10px !important; }
    .info-cards-row-lg { grid-template-columns: 1fr !important; }
    .info-card-circle { padding: 14px !important; }
    .circle-progress-wrapper { width: 90px; height: 90px; }
    .circle-text { font-size: 22px; }
    .info-top-bar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
    .nav-links { gap: 2px; }
    .nav-link { padding: 6px 10px; font-size: 13px; }
    .nav-link-divider { display: none; }
}
@media (max-width: 480px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 8px 0; }
    .nav-links { width: 100%; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
    .user-status-area { font-size: 11px; padding: 4px 8px; }
}
