/* ============================================================
   PureMC 服务器官网 · style.css（首页）
   视觉体系：暗色像素风 · MC蓝 #3FA9F5 核心 · 硬边框 · 克制动效
   ============================================================ */

/* ---------- 视觉 token ---------- */
:root {
    --bg: #0f1214;            /* 页面深底（蓝黑，有层次） */
    --bg-elev: #171b20;       /* 卡片 */
    --bg-elev2: #1e242c;      /* 悬停 */
    --primary: #3FA9F5;       /* MC 绿（核心强调） */
    --gold: #FFAA00;          /* 次级强调 */
    --red: #FF5555;           /* 离线 / 危险 */
    --blue: #55FFFF;
    --text: #e8e8e8;
    --text-sub: #98a2ad;
    --border: #2a3038;        /* 细边框 */
    --border-strong: #3a4350;
    --shadow-hard: 4px 4px 0 rgba(0,0,0,.45);   /* MC 硬阴影 */
    --radius: 3px;            /* 微圆角，保留方块感 */
}

/* ---------- 重置与全局 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    background-color: var(--bg);
    min-height: 100vh;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    text-align: center;
    overflow-x: hidden;
    background-image:
        radial-gradient(rgba(63,169,245,.03) 1px, transparent 1px),
        radial-gradient(rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 26px 26px;
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15,18,20,.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 2px solid var(--border);
    box-shadow: 0 2px 0 rgba(0,0,0,.4);
    transition: all .3s ease;
}
.nav-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 #000;
    cursor: default;
    user-select: none;
}
.nav-logo-icon {
    width: 26px;
    height: 26px;
    image-rendering: pixelated;
    flex-shrink: 0;
}
.nav-logo::after {
    content: "PureMC, Tikeds旗下的MINECRAFT服务器";
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;
    padding: 8px 12px;
    background: #0d1117;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
    border: 2px solid var(--primary);
    box-shadow: 4px 4px 0 rgba(0,0,0,.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 60;
    pointer-events: none;
}
.nav-logo:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 26px; list-style: none; align-items: center; }
.nav-links a {
    color: #c7cdd3;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 6px 4px;
    border-bottom: 2px solid transparent;
    transition: color .25s, border-color .25s, text-shadow .25s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-shadow: 0 0 10px rgba(63,169,245,.5);
}

/* ---------- 汉堡菜单（移动端） ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px; height: 44px;
    background: var(--bg-elev);
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 10px;
    transition: background .2s, border-color .2s;
}
.hamburger:hover { background: var(--bg-elev2); border-color: var(--primary); }
.hamburger span { display: block; height: 2px; background: var(--primary); border-radius: 1px; transition: all .3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero 区 ---------- */
.header {
    position: relative;
    background-image: linear-gradient(180deg, rgba(10,12,14,.72), rgba(10,12,14,.88)), url('download.jpg');
    background-size: cover;
    background-position: center;
    padding: 170px 20px 190px;
}
/* MC 像素地面线 */
.header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0; height: 14px;
    background: repeating-linear-gradient(90deg, var(--bg) 0 42px, #0a2e4d 42px 45px, var(--bg) 45px 92px);
    opacity: .9;
}
.title-container { position: relative; display: inline-block; margin-bottom: 12px; }
h1 {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 0 0 12px rgba(255,255,255,.7), 0 0 28px rgba(255,255,255,.45), 4px 4px 0 #000;
    margin: 0;
    animation: float 3.2s ease-in-out infinite;
}
.splash-text {
    position: absolute;
    bottom: -12px; right: -64px;
    color: #FFFF55;
    font-weight: bold;
    font-size: 24px;
    text-shadow: 2px 2px 0 #3f3f00;
    transform: rotate(-18deg);
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    animation: pulse .6s infinite alternate;
}
.subtitle {
    font-size: 20px;
    margin-top: 12px;
    color: #d5dce2;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: .5px;
}

/* ---------- IP 复制框 ---------- */
.ip-box {
    margin-top: 42px;
    background: rgba(10,12,14,.72);
    display: inline-block;
    padding: 16px 44px;
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard), 0 0 0 1px rgba(63,169,245,.2) inset;
    cursor: pointer;
    transition: all .3s ease;
    animation: ipGlow 2.2s ease-in-out infinite alternate;
}
.ip-box:hover { background: var(--primary); transform: translate(-2px,-2px); box-shadow: 6px 6px 0 rgba(0,0,0,.5), 0 0 24px rgba(63,169,245,.8); }
.ip-box p { font-size: 14px; color: #c7cdd3; transition: .25s; }
.ip-box:hover p { color: #052a40; }
.ip-box h2 { color: #000; font-family: "Courier New", monospace; font-size: 26px; letter-spacing: 1px; transition: .25s; }
.status-bar { margin-top: 22px; font-size: 16px; text-shadow: 1px 1px 0 #000; }
.status-bar b { font-weight: 700; }

/* ---------- 特性卡片 ---------- */
.features {
    max-width: 1000px;
    margin: -70px auto 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}
.feature-item {
    flex: 1;
    min-width: 270px;
    background: var(--bg-elev);
    padding: 30px 26px 34px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
}
.feature-item:hover { transform: translate(-3px,-3px); box-shadow: 7px 7px 0 rgba(0,0,0,.5); background: var(--bg-elev2); }
.feature-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.feature-item h3 { margin: 14px 0 10px; font-size: 22px; font-weight: 800; }
.feature-item p { color: var(--text-sub); font-size: 14px; line-height: 1.75; }

/* ---------- 底部与音乐按钮 ---------- */
.footer {
    background: #0a0c0e;
    border-top: 2px solid var(--border);
    padding: 22px;
    margin-top: 40px;
    color: #6b7480;
    font-size: 12px;
}
#musicBtn {
    position: fixed;
    bottom: 22px; right: 22px;
    z-index: 999;
    padding: 11px 16px;
    background: rgba(10,12,14,.85);
    color: var(--text);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: 3px 3px 0 rgba(0,0,0,.4);
    cursor: pointer;
    transition: .25s;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#musicBtn:hover { background: var(--primary); color: #052a40; transform: translate(-1px,-1px); }

/* ---------- 在线玩家指示器 ---------- */
.player-indicator {
    display: flex; align-items: center; gap: 8px;
    background: rgba(63,169,245,.08); border: 1px solid rgba(63,169,245,.25);
    border-radius: 20px; padding: 4px 14px 4px 10px;
    font-size: .8rem; color: var(--primary); cursor: default;
    position: relative; transition: all .3s; white-space: nowrap;
}
.player-indicator:hover { background: rgba(63,169,245,.16); border-color: rgba(63,169,245,.45); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #555; flex-shrink: 0; transition: background .3s; }
.status-dot.online { background: var(--primary); box-shadow: 0 0 7px rgba(63,169,245,.7); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 7px rgba(255,85,85,.7); }
.player-text strong { color: var(--primary); font-weight: 800; }
.player-tooltip {
    display: none; position: absolute; top: calc(100% + 10px); right: 0;
    background: rgba(13,16,19,.98); border: 1px solid rgba(63,169,245,.25);
    border-radius: 6px; padding: 12px 16px; min-width: 190px; max-width: 300px;
    z-index: 1001; box-shadow: 4px 4px 0 rgba(0,0,0,.5);
    text-align: left;
}
.player-indicator:hover .player-tooltip { display: block; }
.tooltip-title { font-size: .72rem; color: var(--text-sub); margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.06); padding-bottom: 6px; }
.tooltip-names { display: flex; flex-wrap: wrap; gap: 6px; }
.tooltip-name {
    display: flex; align-items: center; gap: 5px; font-size: .8rem; color: #d9dfe5;
    background: rgba(255,255,255,.05); border-radius: 4px; padding: 3px 8px;
}
.tooltip-name img { width: 16px; height: 16px; border-radius: 2px; image-rendering: pixelated; }
.tooltip-empty { color: #6b7480; font-size: .8rem; font-style: italic; }
.tooltip-error { color: var(--red); font-size: .8rem; }

/* ---------- 动画关键帧 ---------- */
@keyframes pulse { from { transform: rotate(-18deg) scale(1); } to { transform: rotate(-18deg) scale(1.12); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ipGlow { from { box-shadow: 4px 4px 0 rgba(0,0,0,.45), 0 0 6px rgba(63,169,245,.35); } to { box-shadow: 4px 4px 0 rgba(0,0,0,.45), 0 0 18px rgba(63,169,245,.8); } }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .navbar { padding: 12px 18px; }
    .hamburger { display: flex; }
    /* 移动端导航下拉面板 */
    .nav-links {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch;
        gap: 0;
        background: rgba(15,18,20,.98);
        border-bottom: 2px solid var(--border);
        max-height: 0; overflow: hidden;
        transition: max-height .35s ease;
    }
    .nav-links.open { max-height: 320px; }
    .nav-links a { display: block; padding: 14px 24px; border-bottom: 1px solid var(--border); border-bottom-color: var(--border); }
    .header { padding: 128px 16px 150px; }
    h1 { font-size: 38px; letter-spacing: 2px; }
    .splash-text { font-size: 16px; right: -26px; bottom: -6px; }
    .subtitle { font-size: 16px; }
    .ip-box { padding: 12px 22px; }
    .ip-box h2 { font-size: 19px; }
    .feature-item { min-width: 100%; }
    .nav-right { gap: 12px; }
    .player-indicator { padding: 3px 10px 3px 8px; font-size: .7rem; }
    .player-tooltip { min-width: 150px; right: -10px; }
    .hamburger { order: 3; }
}

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
a:focus-visible, .ip-box:focus-visible, #musicBtn:focus-visible, .hamburger:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px;
}
