/* 服务器状态监控样式 */

.server-status-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin: 20px 0;
    max-width: 400px;
}

.server-status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 16px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
}

.status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 10px #4ade80;
}

.status-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: none;
}

.status-indicator.online .status-text {
    color: #4ade80;
}

.status-indicator.offline .status-text {
    color: #ef4444;
}

.ping-time {
    font-size: 14px;
    opacity: 0.8;
    font-family: 'Courier New', monospace;
}

.server-info {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 500;
    opacity: 0.9;
    font-size: 14px;
}

.info-item .value {
    font-weight: bold;
    font-size: 14px;
    text-align: right;
    max-width: 200px;
    word-break: break-word;
}

.info-item .value.motd {
    font-style: italic;
    opacity: 0.9;
}

.status-message {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.status-message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.status-message.warning {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fde68a;
}

.last-update {
    font-size: 12px;
    opacity: 0.7;
    text-align: center;
    font-style: italic;
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .server-status-card {
        margin: 10px;
        padding: 15px;
    }
    
    .status-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .info-item .value {
        text-align: left;
        max-width: none;
    }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .server-status-card {
        background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
    }
}

/* 加载动画 */
.server-status-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.server-status-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 玩家数量指示器 */
.players-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 12px;
    font-weight: bold;
}

.players-indicator.high {
    background: rgba(34, 197, 94, 0.3);
}

.players-indicator.medium {
    background: rgba(251, 191, 36, 0.3);
}

.players-indicator.low {
    background: rgba(239, 68, 68, 0.3);
}

/* 延迟指示器 */
.ping-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.ping-indicator.excellent {
    background: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.ping-indicator.good {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.ping-indicator.poor {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}