/* ============================================================
   我们的生存服 · Minecraft 国际版风格
   方块硬边 · 粗描边 · 斜面阴影 · 像素感
   4 种布局：center / left / magazine / compact
   ============================================================ */

/* ---------------- 基础 ---------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

.hero,
.section {
    scroll-margin-top: 84px;
}

:root {
    --font-ui: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    --font-mono: "Consolas", "Courier New", monospace;

    --accent: #5a8f29;
    --accent-rgb: 90, 143, 41;
    --accent-dark: #3d6b1e;
    --accent-light: #7ec043;
    --accent-2: #9c7342;
    --on-accent: #ffffff;

    --bg-1: #1a1a1a;
    --bg-2: #222222;
    --panel-1: #2a2a2a;
    --panel-2: #111111;
    --nav-bg: rgba(20, 20, 18, 0.94);
    --nav-bg-strong: rgba(20, 20, 18, 0.99);

    --card-bg: rgba(60, 60, 55, 0.35);
    --text-muted: #a8a89a;

    --card-border-width: 3px;
    --card-border-color: rgba(var(--accent-rgb), 0.5);
    --card-radius: 0;
    --card-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    --card-top-bar: none;
    --card-bevel: inset 2px 2px 0 rgba(255, 255, 255, 0.08),
                  inset -2px -2px 0 rgba(0, 0, 0, 0.35);
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-1);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 32px 32px;
    color: #e0e0d8;
    overflow-x: hidden;
    line-height: 1.65;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-btn,
.copy-btn,
.btn-primary,
.btn-secondary:hover,
.rule-number {
    color: var(--on-accent);
}

/* ---------------- 导航 ---------------- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg);
    background-image: var(--nav-texture, none);
    background-size: 16px 16px;
    background-repeat: repeat;
    background-blend-mode: multiply;
    z-index: 1000;
    padding: 0.85rem 0;
    border-bottom: 4px solid var(--accent);
    image-rendering: pixelated;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: #f0f0e8;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.7);
    letter-spacing: 0.02em;
}

.nav-logo img {
    width: 34px;
    height: 34px;
    margin-right: 10px;
    image-rendering: pixelated;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.8rem;
}

.nav-menu a {
    color: #d0d0c8;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.15s ease;
}

.nav-menu a:hover {
    color: var(--accent-light);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 36px;
    padding: 0 9px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid var(--accent);
    border-radius: 0;
}

.hamburger .bar {
    display: block;
    width: 100%;
    height: 3px;
    background: #e0e0d8;
}

.hamburger:hover .bar {
    background: var(--accent-light);
}

/* ---------------- 首屏 ---------------- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6.5rem 2rem 3rem;
    background-color: rgba(10, 14, 8, 0.88);
    background-image:
        var(--hero-texture, none),
        linear-gradient(rgba(10, 14, 8, 0.85), rgba(10, 14, 8, 0.92));
    background-size: 16px 16px, 100% 100%;
    background-repeat: repeat, no-repeat;
    background-blend-mode: multiply;
    border-bottom: 4px solid var(--accent);
    image-rendering: pixelated;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #f4f4e8;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.7), 6px 6px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.server-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.7rem 1.2rem;
    border: 3px solid var(--accent);
    border-radius: 0;
    font-weight: 700;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #d6a545;
    border: 2px solid rgba(0, 0, 0, 0.5);
    animation: blink 1.4s steps(2, end) infinite;
}

.status-dot.online { background: #4ec94e; }
.status-dot.offline { background: #d64545; }

@keyframes blink {
    50% { opacity: 0.35; }
}

.player-count {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(var(--accent-rgb), 0.18);
    padding: 0.7rem 1.3rem;
    border: 3px solid var(--accent);
    border-radius: 0;
    font-weight: 700;
}

.player-count i {
    color: var(--accent-light);
}

.player-count-number {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-light);
}

.server-ip {
    margin-bottom: 2rem;
}

.ip-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.35);
    padding: 1rem 1.6rem;
    border: 3px solid var(--accent);
    border-radius: 0;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.08), 4px 4px 0 rgba(0, 0, 0, 0.4);
}

.ip-label {
    color: var(--text-muted);
    font-weight: 600;
}

.ip-address {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-light);
}

.copy-btn {
    background: var(--accent);
    border: 3px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.25),
                inset -2px -2px 0 rgba(0, 0, 0, 0.35);
    padding: 0.55rem 0.85rem;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 36px;
    position: relative;
    overflow: hidden;
}

.copy-btn:hover {
    background: var(--accent-light);
}

.server-details {
    margin-top: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.detail-item {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border: 3px solid rgba(var(--accent-rgb), 0.5);
    border-radius: 0;
}

.detail-label {
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.detail-value {
    color: var(--accent-light);
    font-family: var(--font-mono);
    font-weight: 700;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    text-decoration: none;
    border-radius: 0;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background 0.15s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    border: 3px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.25),
                inset -2px -2px 0 rgba(0, 0, 0, 0.35),
                4px 4px 0 rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
    background: var(--accent-light);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-light);
    border: 3px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
}

/* ---------------- 板块 ---------------- */
.section {
    padding: 4rem 0;
}

.section + .section {
    padding-top: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #f0f0e8;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.section-title i {
    color: var(--accent-light);
}

/* Server Stats */
.server-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.2rem;
}

.stat-icon {
    font-size: 2.4rem;
    color: var(--accent-light);
    margin-bottom: 0.75rem;
}

.stat-info h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
    color: #f0f0e8;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.stat-info p {
    color: var(--text-muted);
    font-weight: 600;
}

/* Rules */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.2rem;
}

.rule-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin-bottom: 1.1rem;
}

.rule-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--accent);
    border: 3px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.25),
                inset -2px -2px 0 rgba(0, 0, 0, 0.35);
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
}

.rule-icon {
    font-size: 1.4rem;
    color: var(--accent-light);
}

.rule-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #f0f0e8;
    font-weight: 800;
}

.rule-content p {
    color: var(--text-muted);
}

/* Contact */
.contact-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.2rem;
}

.contact-card {
    max-width: 320px;
    width: 100%;
}

.contact-card i {
    font-size: 2.4rem;
    color: var(--accent-light);
    margin-bottom: 0.75rem;
}

.contact-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #f0f0e8;
    font-weight: 800;
}

.contact-card p {
    color: var(--text-muted);
    word-break: break-all;
    font-weight: 600;
}

.contact-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.7rem 1.3rem;
    background: var(--accent);
    border: 3px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.25),
                inset -2px -2px 0 rgba(0, 0, 0, 0.35);
    border-radius: 0;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: background 0.15s ease;
    position: relative;
    overflow: hidden;
}

.contact-btn:hover {
    background: var(--accent-light);
}

/* ---------------- 页脚 ---------------- */
.footer {
    background: rgba(0, 0, 0, 0.5);
    padding: 3rem 0 1.5rem;
    border-top: 4px solid var(--accent);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #f0f0e8;
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.footer-section p {
    color: var(--text-muted);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.4rem;
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   4 种布局 — 结构性差异
   ============================================================ */

/* -------- 1. CENTER 居中经典 -------- */
html[data-layout="center"] .container,
html[data-layout="center"] .nav-container {
    max-width: 1200px;
}

html[data-layout="center"] .section-title {
    justify-content: center;
    text-align: center;
}

html[data-layout="center"] .stat-card,
html[data-layout="center"] .rule-card,
html[data-layout="center"] .contact-card {
    text-align: center;
}

html[data-layout="center"] .rule-header {
    justify-content: center;
}

/* -------- 2. LEFT 左对齐 + 双列网格 -------- */
html[data-layout="left"] .container,
html[data-layout="left"] .nav-container {
    max-width: 1200px;
}

html[data-layout="left"] .hero {
    justify-content: flex-start;
}

html[data-layout="left"] .hero-content {
    text-align: left;
    max-width: 800px;
    padding-left: 2rem;
}

html[data-layout="left"] .server-status,
html[data-layout="left"] .ip-container {
    justify-content: flex-start;
}

html[data-layout="left"] .section-title {
    justify-content: flex-start;
    text-align: left;
    padding-left: 0.5rem;
}

html[data-layout="left"] .server-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

html[data-layout="left"] .stat-card {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
}

html[data-layout="left"] .stat-icon {
    font-size: 2rem;
    margin-bottom: 0;
    flex-shrink: 0;
}

html[data-layout="left"] .stat-info h3 {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

html[data-layout="left"] .stat-info p {
    font-size: 1.05rem;
    color: var(--accent-light);
    font-weight: 700;
}

html[data-layout="left"] .contact-card {
    text-align: left;
}

html[data-layout="left"] .rule-header {
    justify-content: flex-start;
}

/* -------- 3. MAGAZINE 杂志风 -------- */
html[data-layout="magazine"] .container,
html[data-layout="magazine"] .nav-container {
    max-width: 1300px;
}

html[data-layout="magazine"] .section {
    padding: 4rem 0;
}

html[data-layout="magazine"] .section-title {
    justify-content: flex-start;
    text-align: left;
    font-size: 2.2rem;
    border-left: 6px solid var(--accent);
    padding-left: 1rem;
}

html[data-layout="magazine"] .hero {
    min-height: 75vh;
}

html[data-layout="magazine"] .server-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

html[data-layout="magazine"] .stat-card {
    text-align: center;
    padding: 1.4rem 1rem;
}

html[data-layout="magazine"] .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

html[data-layout="magazine"] .stat-info h3 {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

html[data-layout="magazine"] .stat-info p {
    font-size: 1.15rem;
    color: var(--accent-light);
    font-weight: 800;
    margin-top: 0.2rem;
}

html[data-layout="magazine"] .rules-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

html[data-layout="magazine"] .contact-grid {
    justify-content: center;
}

html[data-layout="magazine"] .stat-card,
html[data-layout="magazine"] .rule-card,
html[data-layout="magazine"] .contact-card {
    text-align: left;
}

html[data-layout="magazine"] .rule-header {
    justify-content: flex-start;
}

/* -------- 4. COMPACT 紧凑多列 -------- */
html[data-layout="compact"] .container,
html[data-layout="compact"] .nav-container {
    max-width: 1000px;
}

html[data-layout="compact"] .section {
    padding: 2rem 0;
}

html[data-layout="compact"] .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    gap: 0.5rem;
}

html[data-layout="compact"] .hero {
    min-height: 70vh;
    padding: 5rem 1.5rem 2rem;
}

html[data-layout="compact"] .server-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
}

html[data-layout="compact"] .rules-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
}

html[data-layout="compact"] .contact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
}

html[data-layout="compact"] .stat-card,
html[data-layout="compact"] .rule-card,
html[data-layout="compact"] .contact-card {
    padding: 1rem;
    text-align: center;
}

html[data-layout="compact"] .stat-icon,
html[data-layout="compact"] .contact-card i {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

html[data-layout="compact"] .stat-info h3,
html[data-layout="compact"] .contact-card h3,
html[data-layout="compact"] .rule-content h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

html[data-layout="compact"] .rule-header {
    justify-content: center;
    margin-bottom: 0.7rem;
}

html[data-layout="compact"] .rule-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

html[data-layout="compact"] .contact-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
}

/* ============================================================
   卡片样式系统
   ============================================================ */

/* 1. 玻璃拟态 → 半透明石板 */
html[data-cards="glass"] {
    --card-border-width: 3px;
    --card-border-color: rgba(var(--accent-rgb), 0.45);
    --card-radius: 0;
    --card-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    --card-bg: rgba(255, 255, 255, 0.08);
}

/* 2. 极简描边 */
html[data-cards="outline"] {
    --card-border-width: 4px;
    --card-border-color: var(--accent);
    --card-radius: 0;
    --card-shadow: none;
    --card-bg: rgba(0, 0, 0, 0.35);
}

/* 3. 主题色块 */
html[data-cards="neon"] {
    --card-border-width: 3px;
    --card-border-color: var(--accent-light);
    --card-radius: 0;
    --card-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    --card-bg: rgba(var(--accent-rgb), 0.12);
}

/* 4. 实心深色 + 顶部色条 */
html[data-cards="stripe"] {
    --card-border-width: 3px;
    --card-border-color: rgba(var(--accent-rgb), 0.35);
    --card-radius: 0;
    --card-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    --card-bg: rgba(0, 0, 0, 0.4);
    --card-top-bar: var(--accent);
}

/* 板块样式统一落地 */
.stat-card,
.rule-card,
.contact-card {
    position: relative;
    overflow: hidden;
    padding: 1.6rem;
    background-color: var(--card-bg);
    background-image: var(--card-texture, none);
    background-size: 16px 16px;
    background-repeat: repeat;
    background-blend-mode: multiply;
    border: var(--card-border-width) solid var(--card-border-color);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow), var(--card-bevel);
    transition: border-color 0.15s ease, transform 0.15s ease;
    image-rendering: pixelated;
}

.stat-card::before,
.rule-card::before,
.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--card-top-bar, none);
    pointer-events: none;
}

.stat-card:hover,
.rule-card:hover,
.contact-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-light);
}

html[data-cards="outline"] .stat-card:hover,
html[data-cards="outline"] .rule-card:hover,
html[data-cards="outline"] .contact-card:hover {
    background-color: rgba(var(--accent-rgb), 0.12);
}

.navbar.scrolled {
    background-color: var(--nav-bg-strong);
}

/* ============================================================
   主题系统
   ============================================================ */

html[data-theme="dirt"] {
    --accent: #7a5636;
    --accent-rgb: 122, 86, 54;
    --accent-dark: #5c4027;
    --accent-light: #a07850;
    --accent-2: #5c4027;
    --on-accent: #ffffff;
    --bg-1: #17120d;
    --bg-2: #1e1710;
    --panel-1: #2c2318;
    --panel-2: #120d09;
    --nav-bg: rgba(20, 15, 10, 0.94);
    --nav-bg-strong: rgba(20, 15, 10, 0.99);
    --card-bg: rgba(122, 86, 54, 0.12);
    --text-muted: #b3a696;
}

html[data-theme="grass"] {
    --accent: #5a8f29;
    --accent-rgb: 90, 143, 41;
    --accent-dark: #3d6b1e;
    --accent-light: #7ec043;
    --accent-2: #3d6b1e;
    --on-accent: #ffffff;
    --bg-1: #10160c;
    --bg-2: #141d0f;
    --panel-1: #1f2c16;
    --panel-2: #0b1108;
    --nav-bg: rgba(14, 20, 10, 0.94);
    --nav-bg-strong: rgba(14, 20, 10, 0.99);
    --card-bg: rgba(90, 143, 41, 0.10);
    --text-muted: #a4b596;
}

html[data-theme="stone"] {
    --accent: #8d8d8d;
    --accent-rgb: 141, 141, 141;
    --accent-dark: #6f6f6f;
    --accent-light: #adadad;
    --accent-2: #6f6f6f;
    --on-accent: #141414;
    --bg-1: #131313;
    --bg-2: #1a1a1a;
    --panel-1: #2a2a2a;
    --panel-2: #0e0e0e;
    --nav-bg: rgba(17, 17, 17, 0.94);
    --nav-bg-strong: rgba(17, 17, 17, 0.99);
    --card-bg: rgba(255, 255, 255, 0.06);
    --text-muted: #b0b0b0;
}

html[data-theme="oak"] {
    --accent: #a2703f;
    --accent-rgb: 162, 112, 63;
    --accent-dark: #82572f;
    --accent-light: #c08f57;
    --accent-2: #82572f;
    --on-accent: #ffffff;
    --bg-1: #171208;
    --bg-2: #1e1810;
    --panel-1: #2d2418;
    --panel-2: #120d08;
    --nav-bg: rgba(21, 16, 10, 0.94);
    --nav-bg-strong: rgba(21, 16, 10, 0.99);
    --card-bg: rgba(162, 112, 63, 0.10);
    --text-muted: #b8a893;
}

html[data-theme="sand"] {
    --accent: #d5c07a;
    --accent-rgb: 213, 192, 122;
    --accent-dark: #b8a35c;
    --accent-light: #e8d494;
    --accent-2: #b8a35c;
    --on-accent: #201a06;
    --bg-1: #17150f;
    --bg-2: #1e1c14;
    --panel-1: #2d2a1c;
    --panel-2: #12100a;
    --nav-bg: rgba(21, 19, 13, 0.94);
    --nav-bg-strong: rgba(21, 19, 13, 0.99);
    --card-bg: rgba(213, 192, 122, 0.08);
    --text-muted: #bdb49a;
}

html[data-theme="nether"] {
    --accent: #9c3a2e;
    --accent-rgb: 156, 58, 46;
    --accent-dark: #7a2b22;
    --accent-light: #c05a4b;
    --accent-2: #7a2b22;
    --on-accent: #ffffff;
    --bg-1: #180d0d;
    --bg-2: #201111;
    --panel-1: #301918;
    --panel-2: #130a0a;
    --nav-bg: rgba(22, 11, 11, 0.94);
    --nav-bg-strong: rgba(22, 11, 11, 0.99);
    --card-bg: rgba(156, 58, 46, 0.10);
    --text-muted: #bda29c;
}

html[data-theme="diamond"] {
    --accent: #3fc9b8;
    --accent-rgb: 63, 201, 184;
    --accent-dark: #2ea294;
    --accent-light: #6fe0d1;
    --accent-2: #2ea294;
    --on-accent: #04201c;
    --bg-1: #0d1514;
    --bg-2: #111d1b;
    --panel-1: #1a2c29;
    --panel-2: #0a1211;
    --nav-bg: rgba(12, 20, 19, 0.94);
    --nav-bg-strong: rgba(12, 20, 19, 0.99);
    --card-bg: rgba(63, 201, 184, 0.08);
    --text-muted: #9db8b3;
}

/* ============================================================
   入场动画
   ============================================================ */

.intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    overflow: hidden;
    animation: introHide 0.01s linear 2.95s forwards;
}

@keyframes introHide {
    to { visibility: hidden; pointer-events: none; }
}

.intro-panel {
    position: absolute;
    top: 0;
    z-index: 1;
    width: 50.5%;
    height: 100%;
    background-color: #6b4a2f;
    background-image:
        linear-gradient(45deg, rgba(0, 0, 0, 0.18) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.18) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.07) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.07) 75%);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.55);
    will-change: transform;
}

.intro-panel-l {
    left: 0;
    animation: panelOutL 1s cubic-bezier(0.85, 0, 0.15, 1) 1.9s forwards;
}

.intro-panel-r {
    right: 0;
    animation: panelOutR 1s cubic-bezier(0.85, 0, 0.15, 1) 1.9s forwards;
}

@keyframes panelOutL { to { transform: translateX(-101%); } }
@keyframes panelOutR { to { transform: translateX(101%); } }
@keyframes fadeIn { to { opacity: 1; } }

.intro-core {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2.4vw, 18px);
    padding: 0 7vw;
    text-align: center;
    will-change: transform, opacity;
    animation: coreIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both,
               coreOut 0.5s ease-in 1.6s forwards;
}

@keyframes coreIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: none; }
}

@keyframes coreOut {
    to { opacity: 0; transform: scale(1.08); }
}

.intro-logo {
    width: clamp(60px, 13vw, 112px);
    image-rendering: pixelated;
    animation: logoPop 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

@keyframes logoPop {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: none; }
}

.intro-title {
    font-size: clamp(1.5rem, 6.4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #f4f4e8;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.7);
    animation: titleIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
    text-transform: uppercase;
}

@keyframes titleIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.intro-sub {
    font-size: clamp(0.65rem, 2.4vw, 0.8rem);
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.7);
    animation: fadeIn 0.6s ease 0.6s both;
}

.intro-bar {
    width: min(72vw, 320px);
    height: 18px;
    padding: 3px;
    background: #1b1b1b;
    border: 3px solid #000;
    border-radius: 0;
    overflow: hidden;
    animation: fadeIn 0.4s ease 0.75s both;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.05);
}

.intro-bar-fill {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    background: var(--accent);
    animation: barFill 0.85s cubic-bezier(0.4, 0, 0.2, 1) 0.75s forwards;
}

@keyframes barFill {
    to { transform: scaleX(1); }
}

.intro-percent {
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, 2.4vw, 0.75rem);
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.6);
    animation: fadeIn 0.4s ease 0.75s both;
}

.intro-hint {
    position: absolute;
    left: 50%;
    bottom: clamp(16px, 4.5vh, 40px);
    z-index: 5;
    transform: translateX(-50%);
    font-size: clamp(0.6rem, 2.4vw, 0.74rem);
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    animation: fadeIn 0.6s ease 0.9s both;
}

.navbar {
    animation: navDrop 0.7s cubic-bezier(0.16, 1, 0.3, 1) 2.5s both;
}

@keyframes navDrop {
    from { opacity: 0; transform: translateY(-110%); }
    to { opacity: 1; transform: none; }
}

.hero-content > * {
    animation: introRise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content > .hero-title { animation-delay: 2.4s; }
.hero-content > .hero-subtitle { animation-delay: 2.55s; }
.hero-content > .server-status { animation-delay: 2.7s; }
.hero-content > .server-ip { animation-delay: 2.85s; }

@keyframes introRise {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
}

html.skip-intro .intro { display: none; }

html.skip-intro .navbar,
html.skip-intro .hero-content > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .intro { display: none !important; }

    .navbar,
    .hero-content > * {
        opacity: 1 !important;
        animation: none !important;
    }

    .status-dot { animation: none !important; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 0.4rem 0;
        background: var(--nav-bg-strong);
        border-bottom: 4px solid var(--accent);
    }

    .navbar.menu-open .nav-menu {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 0.85rem 20px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .server-status {
        flex-direction: column;
        gap: 0.8rem;
    }

    .ip-container {
        flex-direction: column;
        text-align: center;
    }

    .section-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 0.4rem;
    }

    /* 手机上 4 种布局统一收为单列，差异缩小 */
    .server-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    html[data-layout="left"] .server-stats {
        grid-template-columns: 1fr;
    }

    html[data-layout="magazine"] .server-stats,
    html[data-layout="magazine"] .rules-grid,
    html[data-layout="magazine"] .contact-grid {
        grid-template-columns: 1fr;
    }

    html[data-layout="compact"] .server-stats,
    html[data-layout="compact"] .rules-grid,
    html[data-layout="compact"] .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .rule-header {
        justify-content: flex-start;
    }
}

@media (max-width: 400px) {
    .intro-sub { letter-spacing: 0.28em; }
    .intro-bar { width: 80vw; }
}

/* ============================================================
   外观切换面板
   ============================================================ */

.skin-switcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 8000;
    font-family: var(--font-ui);
}

.skin-toggle {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--on-accent);
    border: 3px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.25),
                inset -2px -2px 0 rgba(0, 0, 0, 0.35),
                4px 4px 0 rgba(0, 0, 0, 0.5);
    border-radius: 0;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.skin-toggle:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.skin-toggle.active {
    background: var(--accent-dark);
}

.skin-panel {
    position: absolute;
    bottom: 62px;
    right: 0;
    width: 260px;
    background: rgba(18, 18, 16, 0.97);
    border: 3px solid var(--accent);
    border-radius: 0;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6), inset 2px 2px 0 rgba(255, 255, 255, 0.05);
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.9rem;
}

.skin-panel.open {
    display: flex;
}

.skin-group h4 {
    color: var(--accent-light);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.skin-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skin-opt {
    padding: 0.35rem 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    color: #c8c8c0;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s ease;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.skin-opt:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--accent);
    color: #f0f0e8;
}

.skin-opt.active {
    background: var(--accent);
    border-color: var(--accent-light);
    color: var(--on-accent);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.2), inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}

.skin-theme-dot {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.12s ease;
    position: relative;
    background-size: 100% 100%;
    image-rendering: pixelated;
}

.skin-theme-dot:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.skin-theme-dot.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--accent), 3px 3px 0 rgba(0, 0, 0, 0.5);
}

/* 主题纹理由 JS Canvas 动态生成，不设纯色背景 */

@media (max-width: 768px) {
    .skin-switcher {
        bottom: 16px;
        right: 16px;
    }

    .skin-panel {
        width: 230px;
        right: -8px;
    }
}

/* ============================================================
   Minecraft Java Edition 1.26.2 主界面 — 完全仿制
   ============================================================ */

.title-screen {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background: #000;
}

/* 全景背景 — 模拟 MC 的 360° 旋转全景 */
.title-bg {
    position: absolute;
    inset: -100%;
    width: 300%;
    height: 300%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    animation: panoramaRotate 360s linear infinite;
    transform-origin: center center;
}

@keyframes panoramaRotate {
    from { transform: rotate(0deg) scale(1.5); }
    to   { transform: rotate(360deg) scale(1.5); }
}

/* 全景暗角 */
.title-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 30%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
}

/* 内容区 */
.title-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding-top: 8vh;
}

/* Logo 区域 */
.title-logo-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

/* MINECRAFT 标志 */
.title-logo {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #fff;
    text-shadow:
        3px 3px 0 #3a3a3a,
        -1px -1px 0 #3a3a3a,
        1px -1px 0 #3a3a3a,
        -1px 1px 0 #3a3a3a,
        5px 5px 0 rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    font-family: var(--font-mono);
    line-height: 1;
    margin: 0;
}

/* Java Edition 副标题 */
.title-edition {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.15em;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
    margin-top: 8px;
    font-family: var(--font-mono);
}

/* Splash 黄色文字 */
.title-splash {
    position: absolute;
    top: 60%;
    right: -40%;
    transform: rotate(-20deg);
    color: #ffff00;
    font-size: clamp(0.8rem, 2.5vw, 1.1rem);
    font-weight: 800;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7);
    animation: splashPulse 0.8s ease-in-out infinite alternate;
    white-space: nowrap;
    pointer-events: none;
    font-family: var(--font-ui);
}

@keyframes splashPulse {
    from { transform: rotate(-20deg) scale(1); }
    to   { transform: rotate(-20deg) scale(1.15); }
}

/* 菜单按钮区 */
.title-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 320px;
    max-width: 90vw;
}

.title-menu-row {
    display: flex;
    gap: 4px;
    width: 100%;
}

.title-menu-row .mc-btn {
    flex: 1;
}

/* MC Java 按钮 — 像素级还原 */
.mc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    padding: 0 8px;
    background-color: #7a7a7a;
    background-image: var(--mc-btn-texture, none);
    background-size: 16px 16px;
    background-repeat: repeat;
    border: 2px solid #000;
    border-top-color: #c6c6c6;
    border-left-color: #c6c6c6;
    border-right-color: #3a3a3a;
    border-bottom-color: #3a3a3a;
    border-radius: 0;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
    cursor: pointer;
    text-align: center;
    image-rendering: pixelated;
    outline: none;
    box-shadow: none;
    transition: none;
}

.mc-btn:hover {
    background-color: #6a9a3a;
    border-top-color: #a6d46a;
    border-left-color: #a6d46a;
    border-right-color: #3a5a2a;
    border-bottom-color: #3a5a2a;
    color: #ffffa0;
}

.mc-btn:active {
    background-color: #5a8a2a;
    border-top-color: #3a5a2a;
    border-left-color: #3a5a2a;
    border-right-color: #a6d46a;
    border-bottom-color: #a6d46a;
}

/* 多人游戏按钮高亮 */
.mc-btn-primary {
    background-color: #5a8f29;
    border-top-color: #a6d46a;
    border-left-color: #a6d46a;
    border-right-color: #3a5a2a;
    border-bottom-color: #3a5a2a;
}

.mc-btn-primary:hover {
    background-color: #6aaf39;
    border-top-color: #b6e47a;
    border-left-color: #b6e47a;
    border-right-color: #4a6a3a;
    border-bottom-color: #4a6a3a;
}

/* 底部信息栏 */
.title-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 8px 12px;
    pointer-events: none;
}

.title-version {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: var(--font-mono);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.title-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: var(--font-mono);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
    text-align: center;
    flex: 1;
}

.title-footer-right {
    display: flex;
    gap: 4px;
    pointer-events: auto;
}

.title-footer-btn {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    cursor: pointer;
}

.title-footer-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 返回标题画面按钮 */
.back-to-title {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 7000;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background-color: #7a7a7a;
    background-image: var(--mc-btn-texture, none);
    background-size: 16px 16px;
    background-repeat: repeat;
    border: 2px solid #000;
    border-top-color: #c6c6c6;
    border-left-color: #c6c6c6;
    border-right-color: #3a3a3a;
    border-bottom-color: #3a3a3a;
    border-radius: 0;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
    image-rendering: pixelated;
}

.back-to-title:hover {
    background-color: #6a9a3a;
    border-top-color: #a6d46a;
    border-left-color: #a6d46a;
    border-right-color: #3a5a2a;
    border-bottom-color: #3a5a2a;
}

@media (max-width: 768px) {
    .title-content {
        padding-top: 40px;
    }

    .title-logo {
        font-size: 2.5rem;
    }

    .title-splash {
        right: -20%;
        font-size: 0.75rem;
    }

    .title-menu {
        width: 280px;
    }

    .mc-btn {
        height: 28px;
        font-size: 13px;
    }

    .back-to-title {
        top: 70px;
        right: 16px;
        width: 28px;
        height: 28px;
    }
}

/* ============ 单人游戏：跑酷小游戏 ============ */
.mc-game {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: #87ceeb;
    overflow: hidden;
    font-family: 'Courier New', monospace;
}

.mc-game canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.mc-game-hud {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 0 #3a3a3a, -1px -1px 0 #3a3a3a, 1px -1px 0 #3a3a3a, -1px 1px 0 #3a3a3a;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 2;
}

.mc-game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 3;
    transition: opacity 0.3s;
}

.mc-game-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.mc-game-overlay-title {
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    text-shadow: 3px 3px 0 #3a3a3a, -2px -2px 0 #3a3a3a, 2px -2px 0 #3a3a3a, -2px 2px 0 #3a3a3a;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.mc-game-overlay-sub {
    font-size: 20px;
    color: #ffff55;
    text-shadow: 2px 2px 0 #3a3a3a;
    letter-spacing: 2px;
    animation: mc-game-blink 1s infinite;
}

@keyframes mc-game-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.mc-game-back {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    background: #8a8a8a;
    border: 2px solid;
    border-color: #c6c6c6 #3a3a3a #3a3a3a #c6c6c6;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #3a3a3a;
    cursor: pointer;
    z-index: 4;
    image-rendering: pixelated;
}

.mc-game-back:hover {
    background: #5aaf5a;
    color: #ffff55;
}

.mc-game-back:active {
    border-color: #3a3a3a #c6c6c6 #c6c6c6 #3a3a3a;
}

@media (max-width: 768px) {
    .mc-game-hud {
        font-size: 16px;
        gap: 1rem;
    }

    .mc-game-overlay-title {
        font-size: 32px;
    }

    .mc-game-overlay-sub {
        font-size: 16px;
    }

    .mc-game-back {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
}
