/* 所有服务器状态显示样式 */
/* 独立的CSS文件避免与其他样式冲突 */

/* 所有服务器区域基础样式 */
.all-servers {
    background: linear-gradient(135deg, #1a2e1a 0%, #2d4a2d 100%);
    padding: 4rem 0;
    margin: 2rem 0;
    position: relative;
    border-top: 4px solid #4a7c59;
    border-bottom: 4px solid #4a7c59;
}

.all-servers .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.all-servers h2 {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.8rem;
    color: #90ee90;
    margin-bottom: 3rem;
    text-shadow: 
        2px 2px 0 #1a3a0e,
        4px 4px 0 rgba(0,0,0,0.5);
    letter-spacing: 2px;
    animation: allServersGlow 2s ease-in-out infinite alternate;
}

@keyframes allServersGlow {
    0% {
        text-shadow: 
            2px 2px 0 #1a3a0e,
            4px 4px 0 rgba(0,0,0,0.5),
            0 0 10px rgba(144, 238, 144, 0.3);
    }
    100% {
        text-shadow: 
            2px 2px 0 #1a3a0e,
            4px 4px 0 rgba(0,0,0,0.5),
            0 0 20px rgba(144, 238, 144, 0.6);
    }
}

/* 服务器列表容器 */
.servers-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 单个服务器项目 */
.server-item {
    background: linear-gradient(145deg, #2d5016 0%, #4a7c59 100%);
    border: 4px solid #8fbc8f;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 
        8px 8px 0 #1a3a0e,
        16px 16px 0 rgba(0,0,0,0.3),
        inset 4px 4px 0 rgba(255,255,255,0.1);
    /* 我的世界方块纹理背景 */
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,255,255,0.02) 8px, rgba(255,255,255,0.02) 16px),
        repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(0,0,0,0.02) 8px, rgba(0,0,0,0.02) 16px);
    animation: serverItemFadeIn 0.6s ease-out;
}

@keyframes serverItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.server-item:hover {
    transform: translateY(-5px);
    box-shadow: 
        12px 12px 0 #1a3a0e,
        20px 20px 0 rgba(0,0,0,0.4),
        inset 4px 4px 0 rgba(255,255,255,0.2),
        0 0 30px rgba(144, 238, 144, 0.3);
    border-color: #90ee90;
}

/* 在线状态的服务器 */
.server-item.online {
    border-color: #4CAF50;
    background: linear-gradient(145deg, #1b5e20 0%, #2e7d32 100%);
}

.server-item.online:hover {
    border-color: #66bb6a;
    box-shadow: 
        12px 12px 0 #0d3e0d,
        20px 20px 0 rgba(0,0,0,0.4),
        inset 4px 4px 0 rgba(255,255,255,0.2),
        0 0 30px rgba(76, 175, 80, 0.4);
}

/* 离线状态的服务器 */
.server-item.offline {
    border-color: #f44336;
    background: linear-gradient(145deg, #b71c1c 0%, #d32f2f 100%);
}

.server-item.offline:hover {
    border-color: #ef5350;
    box-shadow: 
        12px 12px 0 #8e0000,
        20px 20px 0 rgba(0,0,0,0.4),
        inset 4px 4px 0 rgba(255,255,255,0.1),
        0 0 30px rgba(244, 67, 54, 0.4);
}

/* 服务器信息布局 */
.server-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.server-info-left {
    flex: 1;
}

.server-info-left h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.1rem;
    color: #90ee90;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0 #1a3a0e;
    letter-spacing: 1px;
}

.server-item.online .server-info-left h3 {
    color: #c8e6c9;
}

.server-item.offline .server-info-left h3 {
    color: #ffcccb;
}

.server-info-left p {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 0 #1a3a0e;
    line-height: 1.4;
}

.server-info-right {
    text-align: center;
    min-width: 120px;
}

/* 状态徽章 */
.server-status-badge {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
    box-shadow: 
        3px 3px 0 rgba(0,0,0,0.3),
        inset 1px 1px 0 rgba(255,255,255,0.2);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.server-status-badge.online {
    background: linear-gradient(145deg, #4CAF50 0%, #2e7d32 100%);
    color: white;
    border: 2px solid #66bb6a;
}

.server-status-badge.offline {
    background: linear-gradient(145deg, #f44336 0%, #c62828 100%);
    color: white;
    border: 2px solid #ef5350;
}

/* 在线玩家数显示 */
.server-info-right div[style*="font-weight: bold"] {
    font-family: 'Press Start 2P', monospace !important;
    font-size: 1rem !important;
    color: #FFD700 !important;
    text-shadow: 2px 2px 0 #B8860B !important;
    background: rgba(0,0,0,0.3) !important;
    padding: 0.8rem !important;
    border-radius: 4px !important;
    border: 2px solid rgba(255, 215, 0, 0.3) !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5) !important;
}

/* 加载状态样式 */
.servers-list:empty::after {
    content: '🔍 正在查询所有服务器状态...';
    display: block;
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: #90ee90;
    padding: 3rem;
    background: rgba(0,0,0,0.3);
    border: 2px solid #4a7c59;
    border-radius: 8px;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 错误状态样式 */
.servers-list.error {
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    color: #ffcccb;
    padding: 3rem;
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
    border-radius: 8px;
    text-shadow: 1px 1px 0 #8e0000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .servers-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .server-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .server-info-right {
        margin-top: 1rem;
        min-width: auto;
    }
    
    .all-servers h2 {
        font-size: 1.2rem;
    }
    
    .server-info-left h3 {
        font-size: 0.9rem;
    }
    
    .server-info-left p {
        font-size: 0.8rem;
    }
}

/* 装饰性效果 */
.server-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent 30%, rgba(144, 238, 144, 0.1) 50%, transparent 70%);
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.server-item:hover::before {
    opacity: 1;
}

/* 滚动动画 */
.all-servers.visible {
    animation: slideInFromBottom 0.8s ease-out;
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
