/* ============================================
   style.css - 欢乐苦力怕服务器官网样式
   使用微软雅黑字体
   ============================================ */

/* === 基础重置与字体 === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: rgba(20, 22, 30, 0.85);
    --bg-card-hover: rgba(26, 28, 38, 0.92);
    --text-primary: #e8e8ed;
    --text-secondary: #b0b0bc;
    --text-muted: #6b6b7a;
    --accent-green: #4ade80;
    --accent-green-dark: #22c55e;
    --accent-green-glow: rgba(74, 222, 128, 0.35);
    --accent-green-subtle: rgba(74, 222, 128, 0.1);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-card: rgba(255, 255, 255, 0.06);
    --danger-red: #ef4444;
    --warning-yellow: #f59e0b;
    --navbar-bg: rgba(10, 10, 15, 0.78);
    --navbar-blur: blur(18px);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px var(--accent-green-glow);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', 'Segoe UI', sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', 'Microsoft YaHei', monospace;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Canvas粒子背景 === */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === 导航栏 === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: var(--navbar-blur);
    -webkit-backdrop-filter: var(--navbar-blur);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}
.navbar.scrolled {
    background: rgba(10, 10, 15, 0.92);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.15rem;
    transition: opacity var(--transition-fast);
    flex-shrink: 0;
}
.nav-logo:hover {
    opacity: 0.85;
}
.nav-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
}
.nav-brand {
    letter-spacing: 0.02em;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 6px;
    align-items: center;
}
.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    position: relative;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.nav-link.active {
    color: var(--accent-green);
    background: var(--accent-green-subtle);
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-fast);
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === Hero区域 === */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 80px;
    text-align: center;
}
.hero-content {
    max-width: 720px;
    width: 100%;
    position: relative;
    z-index: 2;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}
.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 var(--accent-green-glow);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(74, 222, 128, 0);
    }
}
.hero-title {
    margin-bottom: 18px;
}
.title-line {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #ffffff 0%, #c0e8c8 40%, #4ade80 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}
.title-sub {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--accent-green);
    margin-top: 4px;
}
.hero-desc {
    font-size: 1.08rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}
.highlight {
    color: var(--accent-green);
    font-weight: 700;
}
.hero-ip-box {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    margin-bottom: 28px;
    position: relative;
}
.ip-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}
.ip-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ip-address {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
    background: rgba(74, 222, 128, 0.06);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.03em;
    user-select: all;
}
.btn-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-green-dark);
    color: #000;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.btn-copy:hover {
    background: #3ccf6e;
    transform: translateY(-1px);
}
.btn-copy:active {
    transform: scale(0.96);
}
.copy-toast {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
}
.copy-toast.show {
    opacity: 1;
}
.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-family: var(--font-primary);
    border: none;
}
.btn-primary {
    background: var(--accent-green-dark);
    color: #000;
    box-shadow: 0 4px 20px var(--accent-green-glow);
}
.btn-primary:hover {
    background: #3ccf6e;
    box-shadow: 0 6px 30px rgba(74, 222, 128, 0.5);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.btn-outline:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: var(--accent-green-subtle);
}
.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
}
/* Hero统计 */
.hero-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    min-width: 140px;
}
.stat-icon {
    color: var(--accent-green);
    flex-shrink: 0;
}
.stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}
.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.status-indicator.online {
    color: var(--accent-green);
}
.status-indicator.offline {
    color: var(--danger-red);
}
/* Hero装饰 */
.hero-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.floating-creeper {
    position: absolute;
    top: 15%;
    right: 10%;
    font-size: 3.5rem;
    opacity: 0.6;
    animation: floatY 6s ease-in-out infinite;
}
.floating-block {
    position: absolute;
    font-size: 2rem;
    opacity: 0.4;
    animation: floatY 8s ease-in-out infinite;
}
.block-1 {
    top: 25%;
    left: 8%;
    animation-delay: 1s;
}
.block-2 {
    bottom: 20%;
    right: 12%;
    animation-delay: 2.5s;
}
.block-3 {
    bottom: 30%;
    left: 10%;
    animation-delay: 4s;
}
@keyframes floatY {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-18px) rotate(5deg);
    }
    50% {
        transform: translateY(-8px) rotate(-3deg);
    }
    75% {
        transform: translateY(-22px) rotate(4deg);
    }
}

/* === 通用section === */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.section-header {
    text-align: center;
    margin-bottom: 56px;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* === 玩法介绍 === */
.gameplay-section {
    position: relative;
    z-index: 1;
    padding: 80px 0 100px;
}
.gameplay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}
.game-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(74, 222, 128, 0.25);
    transform: translateY(-6px);
    box-shadow: var(--shadow-card), 0 0 30px rgba(74, 222, 128, 0.08);
}
.game-card:hover::before {
    opacity: 1;
}
.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.card-desc {
    font-size: 0.93rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 18px;
}
.tag {
    display: inline-block;
    background: var(--accent-green-subtle);
    color: var(--accent-green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid rgba(74, 222, 128, 0.15);
}

/* === 服务器状态 === */
.status-section {
    position: relative;
    z-index: 1;
    padding: 80px 0 100px;
    background: rgba(0, 0, 0, 0.2);
}
.status-panel {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-card);
}
.status-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.status-server-icon .server-icon-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.status-server-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
}
.status-server-ip {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-green);
    background: rgba(74, 222, 128, 0.06);
    padding: 3px 10px;
    border-radius: 6px;
}
.status-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}
.status-badge.online {
    background: rgba(74, 222, 128, 0.12);
    color: var(--accent-green);
}
.status-badge.offline {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-red);
}
.status-badge.loading {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-yellow);
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.status-badge.online .status-dot {
    background: var(--accent-green);
    animation: pulse 2s infinite;
}
.status-badge.offline .status-dot {
    background: var(--danger-red);
}
.status-badge.loading .status-dot {
    background: var(--warning-yellow);
    animation: pulse 1.5s infinite;
}
.status-motd {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
}
.motd-placeholder {
    color: var(--text-muted);
    font-style: italic;
}
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-card);
}
.status-card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}
.status-card-content {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}
.status-card-value {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}
.status-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.status-card-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.status-refresh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.refresh-text {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.88rem;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
}
.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
/* 玩家列表 */
.status-players-panel {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-card);
}
.players-panel-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 36px;
    align-items: center;
}
.players-loading {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-style: italic;
}
.player-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent-green);
    font-weight: 500;
}
.player-tag::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
}
.no-players {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* === 加入我们 === */
.join-section {
    position: relative;
    z-index: 1;
    padding: 80px 0 100px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
}
.step-card:hover {
    border-color: rgba(74, 222, 128, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}
.step-number {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(74, 222, 128, 0.08);
    pointer-events: none;
}
.step-icon {
    font-size: 2.8rem;
    margin-bottom: 14px;
}
.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.step-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.step-ip-highlight {
    margin-top: 12px;
    display: inline-block;
}
.step-ip-highlight code {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-green);
    background: rgba(74, 222, 128, 0.08);
    padding: 8px 18px;
    border-radius: 8px;
}
.join-cta {
    text-align: center;
}
.join-cta p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}
.join-cta .btn {
    margin-bottom: 10px;
}
.join-cta .copy-toast {
    position: static;
    display: block;
    margin-top: 8px;
    transform: none;
}

/* === 页脚 === */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.35);
    padding: 36px 24px 24px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}
.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}
.footer-brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}
.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}
.footer-links a:hover {
    color: var(--accent-green);
}
.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-card);
}
.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.footer-mc {
    font-size: 0.75rem !important;
}

/* === 响应式设计 === */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        background: rgba(15, 15, 22, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 90px 30px 30px;
        gap: 12px;
        transition: right var(--transition-smooth);
        border-left: 1px solid var(--border-color);
    }
    .nav-links.active {
        right: 0;
    }
    .nav-link {
        font-size: 1.1rem;
        padding: 12px 16px;
        width: 100%;
    }
    .hamburger {
        display: flex;
    }
    .hero-stats {
        gap: 12px;
    }
    .stat-item {
        min-width: 120px;
        padding: 10px 14px;
    }
    .gameplay-grid {
        grid-template-columns: 1fr;
    }
    .status-grid {
        grid-template-columns: 1fr 1fr;
    }
    .status-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .status-badge {
        margin-left: 0;
    }
    .steps-grid {
        grid-template-columns: 1fr;
    }
    .hero-ip-box {
        padding: 16px 20px;
    }
    .ip-address {
        font-size: 1.15rem;
        padding: 8px 14px;
    }
    .btn-copy span {
        display: none;
    }
    .btn-copy {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    .ip-input-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    .btn-copy {
        width: 100%;
        justify-content: center;
    }
}