/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f3f4f6;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== 登录页 ========== */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.login-card h1 {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .form-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
}

.login-card .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e8e4de;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.login-card .form-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.login-card .form-group input::placeholder {
    color: #aaa;
}

.login-card .btn-login {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    margin-top: 8px;
}

/* 记住我复选框 */
.login-card .remember-group {
    margin-bottom: 8px;
    margin-top: -4px;
}

.login-card .remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.login-card .remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
    flex-shrink: 0;
}

.login-card .remember-label span {
    line-height: 1.4;
}

.login-card .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.login-card .btn-login:active {
    transform: translateY(0);
}

.login-card .error-msg {
    color: #ef4444;
    font-size: 13px;
    text-align: center;
    margin-top: 14px;
    min-height: 20px;
}

/* ========== 主布局 ========== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ========== 左侧导航栏 ========== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 230px;
    background: #1e293b;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-user {
    padding: 32px 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-user .user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.sidebar-user .user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.sidebar-user .user-vip-badge {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 18px;
    letter-spacing: 0.3px;
}

.sidebar-user .user-stats-row {
    display: flex;
    gap: 24px;
    width: 100%;
    justify-content: center;
}

.sidebar-user .user-stats-row .stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sidebar-user .user-stats-row .stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.sidebar-user .user-stats-row .stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* 导航菜单 */
.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.sidebar-nav .nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: #ffffff;
    border-left-color: #3b82f6;
    font-weight: 500;
}

.sidebar-nav .nav-item .nav-icon {
    margin-right: 10px;
    font-size: 16px;
}

/* 导航分组 */
.nav-group {
    margin: 0;
}
.nav-group-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
}
.nav-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s ease;
}
.nav-group.open .nav-arrow {
    transform: rotate(180deg);
}
.nav-group-items {
    display: none;
    padding-left: 16px;
}
.nav-group.open .nav-group-items {
    display: block;
}
.nav-sub-item {
    font-size: 13px;
    padding: 8px 12px;
}

/* 底部退出 */
.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer .logout-link {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

.sidebar-footer .logout-link:hover {
    color: #ef4444;
}

/* ========== 右侧内容区 ========== */
.main-content {
    margin-left: 230px;
    flex: 1;
    min-height: 100vh;
    overflow-y: auto;
    padding: 32px 36px;
    background: #f3f4f6;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
}

/* ========== 信息卡片 ========== */
.info-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8e4de;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 24px 28px;
    margin-bottom: 24px;
    width: 520px;
    max-width: 100%;
}

.info-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 数据网格 */
.data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.data-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 14px;
    border: 1px solid #f0eeea;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.data-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.data-item .data-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-item .data-value {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    word-break: break-all;
}

.data-item .data-value.color-gold {
    color: #d97706;
}

.data-item .data-value.color-purple {
    color: #7c3aed;
}

.data-item .data-value.color-blue {
    color: #2563eb;
}

.data-item .data-value.color-green {
    color: #059669;
}

.data-item .data-value.color-red {
    color: #dc2626;
}

.data-item .data-value.color-cyan {
    color: #0891b2;
}

/* 在线/离线状态 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 20px;
}

.status-badge .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.online {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.status-badge.online .status-dot {
    background-color: #10b981;
}

.status-badge.offline {
    color: #9ca3af;
    background: rgba(156, 163, 175, 0.1);
}

.status-badge.offline .status-dot {
    background-color: #9ca3af;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
        padding: 20px;
    }
    .data-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    .main-content {
        margin-left: 0;
    }
    .layout {
        flex-direction: column;
    }
}

/* ===== 游戏存档页 & 玩家库存页 公共样式 ===== */

/* 恐龙信息卡片 - 数据网格（复用 .data-grid 但支持更多列） */
.dino-card {
    background: #ffffff;
    border: 1px solid #e8e4de;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.dino-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e4de;
}

.dino-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dino-grid .data-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dino-grid .data-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* 操作区 */
.action-area {
    background: #ffffff;
    border: 1px solid #e8e4de;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.action-area .input-group {
    margin-bottom: 16px;
}

.action-area .input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
}

.action-area .input-group input {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    border: 1px solid #e8e4de;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.action-area .input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.btn-store {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-store:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-store:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 无恐龙提示 */
.no-dino-tip {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
    font-size: 15px;
}

/* ===== 统计卡片行 ===== */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e8e4de;
    border-radius: 10px;
    padding: 16px 20px;
    min-width: 160px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.stat-card .stat-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.stat-card .stat-card-count {
    font-size: 22px;
    font-weight: 700;
    color: #3b82f6;
}

.stat-card .stat-card-detail {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ===== 库存表格 ===== */
.inventory-table-wrap {
    background: #ffffff;
    border: 1px solid #e8e4de;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table th {
    background: #f8f9fa;
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid #e8e4de;
}

.inventory-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.inventory-table tr:last-child td {
    border-bottom: none;
}

.inventory-table tr:hover td {
    background: #f8fafc;
}

.btn-take {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    margin-right: 6px;
    transition: background 0.2s;
}

.btn-take:hover {
    background: #059669;
}

/* 空库存提示 */
.empty-inventory {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
    font-size: 15px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

/* 响应式：小屏幕 */
@media (max-width: 768px) {
    .dino-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-row {
        flex-direction: column;
    }
    .inventory-table-wrap {
        overflow-x: auto;
    }
    .checkin-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* ========== 首页双卡片横排布局 ========== */
.home-cards-row {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.home-cards-row .info-card {
    flex: 1;
    min-width: 0;
    width: auto;
    margin-bottom: 0;
}

/* 首页玩家信息：两列五行，在原卡片高度内容纳十项信息。 */
.player-info-card .data-grid {
    gap: 8px 10px;
}

.player-info-card .data-item {
    padding: 9px 12px;
}

.player-info-card .data-item .data-label {
    margin-bottom: 3px;
    font-size: 11px;
}

.player-info-card .data-item .data-value {
    font-size: 14px;
    line-height: 1.25;
}

/* ========== 签到卡片 ========== */
.checkin-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8e4de;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 24px 28px;
    flex: 1;
    min-width: 0;
}

.checkin-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.checkin-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.checkin-icon {
    margin-bottom: 4px;
}

.checkin-action {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-checkin {
    padding: 12px 48px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    letter-spacing: 2px;
}

.btn-checkin:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-checkin:active {
    transform: translateY(0);
}

.btn-checkin.checked {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.checkin-stats {
    display: flex;
    justify-content: center;
    gap: 36px;
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.checkin-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.checkin-stat-item .stat-number {
    font-size: 26px;
    font-weight: 700;
}

.checkin-stat-item .stat-desc {
    font-size: 12px;
    color: #94a3b8;
}

.checkin-rules {
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid #f0eeea;
    width: 100%;
}

.checkin-rules .rules-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.checkin-rules .rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkin-rules .rules-list li {
    font-size: 12px;
    color: #64748b;
    line-height: 1.9;
    padding-left: 14px;
    position: relative;
}

.checkin-rules .rules-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3b82f6;
}

.checkin-rules .rules-list li strong {
    color: #3b82f6;
    font-weight: 600;
}

@media (max-width: 900px) {
    .home-cards-row {
        flex-direction: column;
    }
    .checkin-card {
        width: 100%;
    }
    .perm-card {
        width: 100%;
    }
}

/* ========== 我的权限卡片 ========== */
.perm-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8e4de;
    flex: 1;
    min-width: 0;
}

.perm-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* ========== 权限/属性 Tab 切换 ========== */
.perm-tab-header {
    display: flex;
    margin-bottom: 18px;
}

.perm-tab-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e8e4de;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    outline: none;
}

.perm-tab-btn:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.perm-tab-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.perm-tab-btn:hover {
    background: #eef2ff;
    color: #374151;
}

.perm-tab-btn.active {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
}

.perm-tab-content {
    margin-top: 4px;
}

/* ========== 属性列表布局 ========== */
.attr-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.attr-item-full {
    grid-column: span 2;
}

.attr-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    white-space: nowrap;
}

.attr-name {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 16px;
}

.attr-vals {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.attr-vals em {
    font-style: normal;
    font-weight: 700;
    color: #6c5ce7;
}

.perm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.perm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.perm-name {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.perm-status {
    font-size: 13px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 10px;
}

.perm-on {
    color: #059669;
    background: #ecfdf5;
}

.perm-off {
    color: #dc2626;
    background: #fef2f2;
}

/* ========== 服务器规则卡片 ========== */
.rule-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 28px;
    margin-top: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8e4de;
}

.rule-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.rule-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ========== 首页一级 Tab ========== */
.home-page-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    margin: -8px 0 22px;
    background: linear-gradient(135deg, #edf2fb 0%, #eef0fb 50%, #f3edfb 100%);
    border: 1px solid #dde3f0;
    border-radius: 13px;
}

.home-page-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 20px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .2px;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.home-page-tab:hover {
    color: #4f46e5;
    background: rgba(255, 255, 255, .72);
}

.home-page-tab.active {
    color: #ffffff;
    background: linear-gradient(120deg, #5b7cf5 0%, #675fe9 52%, #8a4ddd 100%);
    box-shadow: 0 7px 18px rgba(99, 83, 224, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
    text-shadow: 0 1px 2px rgba(49, 35, 133, .24);
}

.home-page-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 32px;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 0 8px rgba(255, 255, 255, .5);
    transform: translateX(-50%);
}

.home-page-tab:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .2);
    outline-offset: 2px;
}

.home-page-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 8px;
    background: rgba(100, 116, 139, .1);
    font-size: 15px;
    line-height: 1;
}

.home-page-tab.active .home-page-tab-icon {
    color: #ffffff;
    background: rgba(255, 255, 255, .17);
    border: 1px solid rgba(255, 255, 255, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}

.home-tab-panel[hidden] {
    display: none !important;
}

/* ========== 服务器信息页 ========== */
.server-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(290px, .95fr);
    gap: 18px;
    align-items: stretch;
}

.server-chart-card {
    min-width: 0;
    min-height: 606px;
    padding: 24px 26px 18px;
    border: 1px solid #e5e8ef;
    border-radius: 16px;
    background:
        radial-gradient(circle at 95% 0%, rgba(99, 102, 241, .06), transparent 30%),
        #ffffff;
    box-shadow: 0 8px 24px rgba(30, 41, 59, .055);
}

.server-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.server-section-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: #7c3aed;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
}

.live-pulse {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
}

.server-chart-header h2 {
    margin: 0 0 4px;
    color: #172033;
    font-size: 19px;
    line-height: 1.35;
}

.server-chart-header p {
    margin: 0;
    color: #94a3b8;
    font-size: 12px;
}

.server-date-filter {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding: 8px;
    border: 1px solid #e4e8f0;
    border-radius: 11px;
    background: rgba(248, 250, 252, .9);
}

.server-date-filter label {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.server-date-filter label span {
    padding-left: 2px;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 600;
}

.server-date-filter input {
    width: 126px;
    height: 30px;
    padding: 0 7px;
    border: 1px solid #dfe4ec;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #475569;
    font: inherit;
    font-size: 11px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.server-date-filter input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.date-range-arrow {
    padding-bottom: 5px;
    color: #a8b1c0;
    font-size: 14px;
}

#serverDateApply {
    height: 30px;
    padding: 0 13px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #ffffff;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(99, 102, 241, .2);
    transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}

#serverDateApply:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, .28);
}

#serverDateApply:disabled {
    opacity: .55;
    cursor: wait;
}

.server-chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 22px 0 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 550;
}

.server-chart-legend span,
.server-chart-footnote span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
}

.legend-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.legend-dot.registrations { color: #10b981; background: #10b981; }
.legend-dot.sessions { color: #6366f1; background: #6366f1; }

.server-chart-shell {
    position: relative;
    width: 100%;
    height: 430px;
    min-height: 330px;
}

#serverTrendChart {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.server-chart-state {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .82);
    color: #7b879a;
    font-size: 13px;
    backdrop-filter: blur(2px);
}

.server-chart-state[hidden],
.server-chart-tooltip[hidden] {
    display: none !important;
}

.server-chart-state.error { color: #dc2626; }
.server-chart-state.empty { color: #64748b; }

.server-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #fef2f2;
    font-weight: 800;
}

.server-loading-ring {
    width: 22px;
    height: 22px;
    border: 2px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: server-spin .8s linear infinite;
}

@keyframes server-spin { to { transform: rotate(360deg); } }

.server-chart-tooltip {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 158px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 9px;
    background: rgba(23, 32, 51, .94);
    color: #e5e7eb;
    font-size: 11px;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .2);
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.server-chart-tooltip strong {
    margin-bottom: 2px;
    color: #ffffff;
    font-size: 12px;
}

.server-chart-tooltip span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.server-chart-tooltip span b { margin-left: auto; color: #ffffff; }
.server-chart-tooltip i { width: 7px; height: 7px; border-radius: 50%; }
.server-chart-tooltip i.registrations { background: #10b981; }
.server-chart-tooltip i.sessions { background: #818cf8; }

.server-chart-footnote {
    display: flex;
    justify-content: space-between;
    padding: 2px 7px 0;
    color: #a0a9b8;
    font-size: 10px;
}

.axis-chip {
    width: 7px;
    height: 7px;
    border-radius: 2px;
}

.axis-chip.registrations { background: #10b981; }
.axis-chip.sessions { background: #6366f1; }

.server-metrics-list {
    display: grid;
    grid-template-rows: repeat(4, minmax(125px, 1fr));
    gap: 14px;
}

.server-metric-card {
    --metric-color: #6366f1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    overflow: hidden;
    padding: 20px 22px;
    border: 1px solid #e6e9f0;
    border-left: 4px solid var(--metric-color);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(30, 41, 59, .055);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.server-metric-card::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    top: -72px;
    right: -58px;
    border-radius: 50%;
    background: var(--metric-color);
    opacity: .045;
}

.server-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(30, 41, 59, .09);
}

.metric-purple { --metric-color: #7c3aed; }
.metric-orange { --metric-color: #f59e0b; }
.metric-blue { --metric-color: #6366f1; }
.metric-green { --metric-color: #10b981; }

.metric-copy { position: relative; z-index: 1; min-width: 0; }

.metric-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8591a3;
    font-size: 12px;
    font-weight: 650;
}

.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--metric-color) 12%, white);
    color: var(--metric-color);
    font-size: 11px;
    font-weight: 800;
}

.metric-value {
    margin-top: 6px;
    color: #172033;
    font-size: clamp(28px, 2.3vw, 39px);
    font-weight: 780;
    line-height: 1;
    letter-spacing: -1.4px;
}

.metric-hint {
    margin-top: 8px;
    overflow: hidden;
    color: #a1aaba;
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.metric-ring {
    --ring-angle: 0deg;
    position: relative;
    z-index: 1;
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    border-radius: 50%;
    background: conic-gradient(var(--metric-color) 0 var(--ring-angle), #edf0f4 var(--ring-angle) 360deg);
    transform: rotate(-90deg);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .015);
}

.metric-ring span {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .025);
}

.server-stat-explainer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 17px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
    color: #64748b;
}

.explainer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    background: #eef2ff;
    color: #6366f1;
    font-size: 12px;
    font-weight: 800;
}

.server-stat-explainer strong {
    display: block;
    margin-bottom: 2px;
    color: #475569;
    font-size: 12px;
}

.server-stat-explainer p {
    margin: 0;
    font-size: 11px;
    line-height: 1.65;
}

.server-stat-explainer b { color: #4f46e5; }

@media (max-width: 1280px) {
    .server-dashboard-grid {
        grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
    }
    .server-chart-header { flex-direction: column; gap: 14px; }
    .server-date-filter { align-self: stretch; }
    .server-date-filter label { flex: 1; }
    .server-date-filter input { width: 100%; }
    .server-chart-card { min-height: 650px; }
}

@media (max-width: 980px) {
    .server-dashboard-grid { grid-template-columns: 1fr; }
    .server-metrics-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(135px, 1fr));
    }
    .server-chart-card { min-height: auto; }
}

@media (max-width: 700px) {
    .home-page-tabs { margin-top: 0; }
    .server-chart-card { padding: 18px 14px 14px; }
    .server-date-filter { flex-wrap: wrap; }
    .server-date-filter label { min-width: 120px; }
    .date-range-arrow { display: none; }
    #serverDateApply { flex: 1 0 100%; }
    .server-chart-shell { height: 360px; }
    .server-metrics-list { grid-template-columns: 1fr; grid-template-rows: none; }
    .server-metric-card { min-height: 130px; }
}

@media (max-width: 430px) {
    .home-page-tab { padding: 10px 8px; font-size: 13px; }
    .home-page-tab-icon { display: none; }
    .server-chart-header h2 { font-size: 17px; }
    .metric-ring { width: 72px; height: 72px; flex-basis: 72px; }
}
