/* 列表容器 */
.list-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 列表头部 */
.list-header {
    display: grid;
    grid-template-columns: 60px minmax(200px, 1fr) 120px 100px 180px;
    gap: 16px;
    padding: 16px;
    background: #f5f5f7;
    border-bottom: 1px solid #e5e5e5;
}

.header-cell {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

.cell-version,
.cell-region,
.cell-action {
    text-align: center;
}

/* 列表主体 */
.list-body {
    display: flex;
    flex-direction: column;
}

/* 列表项 */
.list-item {
    display: grid;
    grid-template-columns: 60px minmax(200px, 1fr) 120px 100px 180px;
    gap: 16px;
    padding: 12px 16px;
    align-items: center;
    border-bottom: 1px solid #f5f5f7;
    transition: background-color 0.2s;
}

.list-item:hover {
    background-color: #f8f8f8;
}

/* 应用图标 */
.cell-icon img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

/* 应用信息 */
.cell-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-name {
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
}

.app-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #86868b;
}

.app-bundle {
    font-size: 13px;
    color: #86868b;
}

/* 版本信息 */
.cell-version {
    font-size: 14px;
    color: #1d1d1f;
    text-align: center;
}

/* 区域信息 */
.cell-region {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: #1d1d1f;
}

.region-flag {
    font-size: 16px;
}

/* 操作按钮 */
.cell-action {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.monitor-actions {
    display: flex;
    gap: 8px;
    animation: scaleIn 0.3s ease-out;
}

.monitor-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

/* 按钮点击波纹效果 */
.monitor-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.monitor-btn:active::after {
    width: 150%;
    height: 150%;
}

/* 按钮状态样式 */
.monitor-btn.add {
    background-color: #0071e3;
    color: #fff;
    animation: scaleIn 0.3s ease-out;
}

.monitor-btn.monitored {
    background-color: #86868b;
    color: #fff;
    animation: successPop 0.3s ease-out;
}

.monitor-btn.remove {
    background-color: #ff3b30;
    color: #fff;
}

.monitor-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.monitor-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.monitor-btn:not(:disabled):active {
    transform: scale(0.98);
    animation: buttonPress 0.2s ease-out;
}

/* 状态图标样式 */
.status-icon {
    font-size: 14px;
    line-height: 1;
    opacity: 0.9;
}

/* 加载状态 */
.monitor-btn.loading {
    pointer-events: none;
    position: relative;
    transform: none !important;
    min-width: 80px;
    padding: 0 12px;
    background-color: #0071e3;
}

/* 隐藏加载状态下的文本和图标 */
.monitor-btn.loading .status-icon,
.monitor-btn.loading .btn-text {
    visibility: hidden;
}

/* 加载动画样式 */
.monitor-btn .btn-loading {
    display: none;
}

.monitor-btn.loading .btn-loading {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 确保按钮在所有状态下保持一致的大小和样式 */
.monitor-btn,
.monitor-btn.add,
.monitor-btn.monitored,
.monitor-btn.remove {
    height: 32px;
    min-width: 80px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .list-header {
        display: none;
    }

    .list-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
        text-align: center;
    }

    .cell-icon {
        justify-self: center;
    }

    .cell-info {
        align-items: center;
    }

    .app-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cell-version,
    .cell-region {
        justify-self: center;
    }

    .cell-action {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .monitor-actions {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }

    .monitor-btn {
        flex: 1;
        max-width: 140px;
    }
} 