/* 全局CSS变量 全新明亮MC原生主题 */
:root {
    --mc-primary: #3C8527;
    --mc-primary-light: #54B435;
    --mc-primary-dark: #2E7D32;
    --mc-secondary: #2196F3;
    --mc-secondary-light: #64B5F6;
    --mc-offline: #E53935;
    --mc-warning: #FB8C00;
    --bg-main: #f0f7f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8faf8;
    --bg-bar: #e8f5e9;
    --text-main: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}
/* 动态像素漂浮背景 MC风格 */
.pixel-float {
    position: fixed;
    width: 16px;
    height: 16px;
    background: var(--mc-primary-light);
    opacity: 0.12;
    border-radius: 2px;
    z-index: -1;
    animation: floatUp 18s infinite ease-in-out;
}
@keyframes floatUp {
    0% {
        transform: translateY(110vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-20vh) rotate(360deg);
        opacity: 0;
    }
}
/* 主容器 3D入场动画 */
.container {
    width: 100%;
    max-width: 800px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 45px 35px;
    box-shadow: 0 10px 40px rgba(60, 133, 39, 0.15);
    border: 1px solid rgba(60, 133, 39, 0.1);
    animation: containerFadeIn 0.8s ease-out;
    position: relative;
    z-index: 1;
}
@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* 标题 循环渐变动画 */
h2 {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--mc-primary), var(--mc-primary-light), var(--mc-secondary), var(--mc-primary));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    animation: gradientShift 4s infinite linear;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
.title-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 服务器地址展示 高亮效果 */
.server-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}
.server-address {
    color: var(--mc-primary);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    position: relative;
}
.server-address::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mc-primary-light);
    transition: var(--transition);
}
.server-info:hover .server-address::after {
    width: 100%;
}
/* 状态提示区 动态指示灯 */
.status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-radius: 10px;
    margin-bottom: 24px;
    background: var(--bg-bar);
    border: 1px solid rgba(60, 133, 39, 0.15);
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}
.status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--mc-warning);
    flex-shrink: 0;
    animation: pulse 1.2s infinite ease-in-out;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}
.status-indicator.online {
    background: var(--mc-primary-light);
    animation: breathe 2s infinite ease-in-out;
}
@keyframes breathe {
    0%, 100% {
        box-shadow: 0 0 6px var(--mc-primary-light);
        opacity: 1;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px var(--mc-primary-light);
        opacity: 0.8;
        transform: scale(1.1);
    }
}
.status-indicator.offline {
    background: var(--mc-offline);
    animation: shake 0.6s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
.status-text {
    font-size: 1.15rem;
    font-weight: 600;
    flex: 1;
}
.status-text.offline {
    color: var(--mc-offline);
}
.status-text.online {
    color: var(--mc-primary-dark);
}
/* 数据卡片网格 3D hover特效 */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}
.data-grid.show {
    opacity: 1;
    max-height: 250px;
}
.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 26px 20px;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out 0.5s both;
}
.data-card:hover {
    transform: translateY(-8px) rotateX(5deg);
    border-color: var(--mc-primary-light);
    box-shadow: 0 12px 24px rgba(60, 133, 39, 0.18);
    background: var(--bg-card-hover);
}
.data-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}
.data-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--mc-primary);
    line-height: 1;
}
.data-value.small {
    font-size: 1.8rem;
}
/* MOTD与玩家列表 升级动画 */
.detail-card {
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 18px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.detail-card.show {
    opacity: 1;
    max-height: 350px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}
.detail-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.detail-content {
    color: var(--text-main);
    line-height: 1.6;
    word-break: break-all;
    font-size: 1rem;
}
.players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.player-badge {
    padding: 8px 14px;
    background: rgba(33, 150, 243, 0.08);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 24px;
    font-size: 0.9rem;
    color: var(--mc-secondary);
    font-weight: 500;
    animation: badgeFadeIn 0.4s ease-out both;
}
@keyframes badgeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* 响应式适配 */
@media (max-width: 576px) {
    .container {
        padding: 35px 25px;
    }
    h2 {
        font-size: 2rem;
    }
    .data-grid {
        grid-template-columns: 1fr 1fr;
    }
    .data-value {
        font-size: 1.8rem;
    }
    .data-value.small {
        font-size: 1.5rem;
    }
}