/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    padding: 20px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header h1 i {
    font-size: 2rem;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* 主卡片样式 */
.status-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

/* 状态指示器 */
.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #999;
}

.status-dot.online {
    background: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.status-dot.offline {
    background: #f44336;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.4);
}

.status-text {
    font-size: 1.3rem;
    font-weight: 600;
}

.status-time {
    font-size: 0.9rem;
    color: #666;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.info-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
}

.info-label i {
    color: #667eea;
    width: 18px;
}

.info-value {
    font-weight: 600;
    color: #222;
}

/* 卡片样式 */
.compatibility-card,
.players-card,
.motd-card {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.compatibility-header,
.players-header,
.motd-header {
    background: #f8f9fa;
    color: #333;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.compatibility-content,
.motd-content {
    padding: 15px 20px;
    background: white;
    min-height: 50px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 玩家列表 */
.players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.players-count {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
}

.players-list {
    padding: 15px;
    background: white;
    max-height: 200px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.player-item {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    border: 1px solid #eee;
}

.player-item i {
    color: #667eea;
}

.empty-players {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 15px;
}

/* 控制按钮 */
.controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 130px;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-warning {
    background: #FF9800;
    color: white;
}

.btn-info {
    background: #9C27B0;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.monitor-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
}

.monitor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f44336;
}

.monitor-dot.active {
    background: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

/* 日志区域 */
.logs-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    font-weight: 600;
    color: #333;
}

.logs-header i {
    color: #667eea;
    margin-right: 8px;
}

.logs-content {
    max-height: 150px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
}

.log-entry {
    padding: 6px 10px;
    margin-bottom: 5px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid #667eea;
    font-size: 0.8rem;
}

.log-entry:last-child {
    margin-bottom: 0;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-body h4 {
    color: #667eea;
    margin: 15px 0 10px 0;
    font-size: 1.1rem;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin-bottom: 6px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* 页脚 */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header h1 {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .status-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .monitor-status {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .players-list {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 加载动画 */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* 添加在原有CSS中 */

/* 性能卡片 */
.performance-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    border: 2px solid #2196F3;
}

.performance-header {
    background: #2196F3;
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px 10px 0 0;
    margin: -20px -20px 15px -20px;
}

.performance-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.performance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.performance-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.performance-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2196F3;
}

/* 实时更新动画 */
@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.realtime {
    animation: pulse 1s infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .performance-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}