/**
 * 服务器状态模块样式
 */

/* 状态卡片 */
.status-card {
    position: relative;
}

/* 刷新按钮 */
.refresh-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-button:hover {
    background-color: rgba(var(--primary-rgb, 33, 150, 243), 0.1);
}

.refresh-button:active {
    transform: scale(0.95);
}

/* 刷新按钮加载状态 */
.refresh-button.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 上次更新时间 */
.last-update {
    font-size: 0.8rem;
    color: var(--light-text);
    text-align: center;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.last-update i {
    font-size: 0.9rem;
    color: var(--primary);
}

/* 直接连接按钮 */
.direct-connect {
    margin-top: 10px;
    text-align: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
}

/* 状态项动画 */
.status-item {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 错误状态 */
.error {
    animation: fadeIn 0.5s ease;
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(var(--primary-rgb, 33, 150, 243), 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .refresh-button {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }
    
    .last-update {
        font-size: 0.75rem;
    }
}