/**
 * AQ11 用户中心视觉增强 - QRuser模板
 * 功能：骨架屏 / 数字动画 / 资源监控（方框布局）
 * 此文件由模板直接引入，不依赖插件
 */

/* ==================== 骨架屏 ==================== */
.aq11-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: aq11-skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes aq11-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.aq11-skeleton-line {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* ==================== 数字滚动动画 ==================== */
.aq11-num-animate {
    display: inline-block;
    transition: transform .3s ease;
}

/* ==================== 悬浮球 ==================== */
.aq11-float-ball {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0052d9, #00a4f7);
    box-shadow: 0 4px 16px rgba(0,82,217,.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    transition: all .3s;
}
.aq11-float-ball:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 24px rgba(0,82,217,.5);
}
.aq11-float-menu {
    position: fixed;
    right: 20px;
    bottom: 140px;
    z-index: 999;
    display: none;
    flex-direction: column;
    gap: 8px;
}
.aq11-float-menu.active {
    display: flex;
}
.aq11-float-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    white-space: nowrap;
    transition: all .2s;
}
.aq11-float-menu-item:hover {
    background: #f0f7ff;
    color: #0052d9;
}
.aq11-float-menu-item i {
    margin-right: 8px;
    font-size: 16px;
    color: #0052d9;
}

/* ==================== 服务列表资源占用（方框布局） ==================== */
.aq11-res-cell {
    min-width: 120px;
}
/* 方框容器：两行布局，每行两个 */
.aq11-res-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
}
.aq11-res-row {
    display: flex;
    gap: 4px;
}
.aq11-res-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f7f8fa;
    min-width: 0;
    gap: 6px;
}
.aq11-res-label {
    font-size: 10px;
    color: #86909c;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}
.aq11-res-value {
    font-size: 12px;
    font-weight: 700;
    font-family: 'SF Mono', 'Consolas', monospace;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aq11-res-value.low { color: #3fbf70; }
.aq11-res-value.mid { color: #fa8c16; }
.aq11-res-value.high { color: #e31519; }
.aq11-res-text {
    font-size: 11px;
    color: #86909c;
    white-space: nowrap;
}
.aq11-res-placeholder {
    color: #ccc;
    font-size: 12px;
}
.aq11-res-loading {
    color: #ccc;
    font-size: 12px;
    display: inline-block;
}
.aq11-res-loading .bx-spin {
    animation: aq11-bx-spin 1s linear infinite;
}
@keyframes aq11-bx-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== 多IP展示 ==================== */
.aq11-ip-main {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
}
.aq11-ip-more-btn {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    font-size: 11px;
    color: #0052d9;
    background: #e8f3ff;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}
.aq11-ip-more-btn:hover {
    background: #0052d9;
    color: #fff;
}
.aq11-ip-all-list {
    display: none;
}

/* 多IP弹窗 */
.aq11-ip-modal-body {
    padding: 10px 0;
    max-height: 400px;
    overflow-y: auto;
}
.aq11-ip-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #f2f3f5;
    gap: 10px;
}
.aq11-ip-modal-item:last-child {
    border-bottom: none;
}
.aq11-ip-modal-text {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
    color: #1d2129;
    flex: 1;
    word-break: break-all;
}
.aq11-ip-copy {
    flex-shrink: 0;
    padding: 2px 10px !important;
    font-size: 12px;
}
.aq11-ip-copy i {
    font-size: 14px;
}

/* ==================== 服务列表卡片布局 ==================== */
.aq11-svc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px;
    padding: 4px 0;
}
.aq11-svc-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
}
.aq11-svc-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    border-color: #d0d0d0;
}
/* 卡片头部 */
.aq11-svc-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.aq11-svc-card-check {
    flex-shrink: 0;
}
.aq11-svc-card-power {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aq11-svc-card-status {
    flex-shrink: 0;
}
.aq11-svc-card-name {
    flex: 1;
    min-width: 120px;
    overflow: hidden;
}
.aq11-svc-card-name strong {
    font-size: 14px;
    color: #1d2129;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aq11-svc-card-name small {
    font-size: 12px;
    color: #86909c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.aq11-svc-card-action {
    flex-shrink: 0;
}
/* 卡片信息区 */
.aq11-svc-card-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #f0f0f0;
    padding: 1px;
}
.aq11-svc-info-item {
    background: #fff;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.aq11-svc-info-label {
    font-size: 11px;
    color: #86909c;
    font-weight: 500;
}
.aq11-svc-info-value {
    font-size: 13px;
    color: #1d2129;
    word-break: break-all;
    overflow: hidden;
}
.aq11-svc-info-value img {
    vertical-align: middle;
}

/* ==================== 手机端适配 ==================== */
@media (max-width: 768px) {
    .aq11-svc-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .aq11-svc-card-top {
        padding: 10px 12px;
        gap: 8px;
    }
    .aq11-svc-card-name strong {
        font-size: 13px;
    }
    .aq11-svc-card-info {
        grid-template-columns: repeat(2, 1fr);
    }
    .aq11-svc-info-item {
        padding: 8px 10px;
    }
    .aq11-svc-info-label {
        font-size: 10px;
    }
    .aq11-svc-info-value {
        font-size: 12px;
    }
    /* 资源占用手机端 */
    .aq11-res-cell {
        min-width: auto;
    }
    .aq11-res-item {
        padding: 2px 4px;
        min-width: 0;
    }
    .aq11-res-label {
        font-size: 9px;
    }
    .aq11-res-value {
        font-size: 11px;
    }
    .aq11-res-box {
        gap: 2px;
    }
    .aq11-res-row {
        gap: 2px;
    }
    /* 多IP手机端 */
    .aq11-ip-more-btn {
        font-size: 10px;
        padding: 1px 6px;
    }
}
