:root {
    --primary: #2196f3;
    --secondary: #1976d2;
    --accent: #03a9f4;
    --dark-text: #1a1a1a;
    --light-text: #424242;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --card-hover: translateY(-5px) scale(1.02);
    --easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-radius: 12px;
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --z-particles: -1;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #ffccbc, #f8bbd9, #e1bee7, #c5cae9);
    color: var(--dark-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 骨架屏样式 */
.skeleton {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffccbc, #f8bbd9, #e1bee7, #c5cae9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: all 0.5s ease;
}

.skeleton.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.skeleton-content {
    text-align: center;
    color: var(--primary);
}

.skeleton-logo {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary);
}

.skeleton-loader {
    width: 200px;
    height: 4px;
    background: rgba(33, 150, 243, 0.2);
    border-radius: 2px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.skeleton-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: loading 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 动态背景 */
.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    z-index: -2;
    background: url('../candy.jpg') center/cover no-repeat;
    transition: transform 0.2s ease-out;
    filter: brightness(0.8) saturate(1.1);
}

.dynamic-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.bg-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(255, 112, 67, 0.2) 0%, 
        rgba(240, 98, 146, 0.15) 30%, 
        rgba(77, 208, 225, 0.1) 60%,
        transparent 80%);
    transition: all 0.3s ease;
}

.bg-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at calc(100% - var(--mouse-x, 50%)) calc(100% - var(--mouse-y, 50%)), 
        rgba(171, 71, 188, 0.15) 0%, 
        rgba(255, 171, 64, 0.1) 40%,
        transparent 70%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    min-height: 60px;
}

.logo {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.logo i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 15px;
}

/* 桌面端导航栏样式 */
@media (min-width: 769px) {
    .nav-links {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        backdrop-filter: none;
        z-index: auto;
        overflow-y: visible;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
}

.nav-links a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.nav-links a:hover {
    background: rgba(0, 134, 195, 0.1);
    transform: translateY(-3px);
}

.nav-links a.active {
    background: rgba(33, 150, 243, 0.15);
    color: var(--primary);
}


.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1700;
    position: relative;
    -webkit-tap-highlight-color: rgba(33, 150, 243, 0.2);
    touch-action: manipulation;
    user-select: none;
    outline: none;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
    background-color: rgba(33, 150, 243, 0.1);
    transform: scale(1.05);
}

.mobile-menu-btn:active {
    background-color: rgba(33, 150, 243, 0.2);
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* 移动端菜单遮罩 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 粒子效果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-particles);
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%;
    opacity: 0.6;
    animation: float 10s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 装饰气泡样式 */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(41, 182, 246, 0.1);
    z-index: 0;
    transition: all 2s ease;
    animation: bubbleFloat 6s ease-in-out infinite;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.bubble:hover {
    transform: scale(1.3);
    opacity: 0.3;
}

/* 滚动动画效果 */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px) rotate(-2deg);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.show {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px) rotate(2deg);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.show {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8) rotate(5deg);
    transition: all 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.show {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* 英雄区域样式 */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(120px, 15vh, 140px) 0 clamp(40px, 8vh, 60px);
    position: relative;
    margin-bottom: clamp(30px, 5vh, 40px);
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    margin-bottom: clamp(20px, 3vh, 25px);
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 800;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    max-width: min(800px, 90vw);
    margin-bottom: clamp(30px, 5vh, 40px);
    color: var(--light-text);
    line-height: 1.6;
    padding: 0 20px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.4s var(--easing);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 8px 25px rgba(0, 134, 195, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--card-shadow);
}

/* 服务器状态区域 */
.status-section {
    margin: 80px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 60px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    border-radius: 2px;
}

.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    padding: 35px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.card:hover {
    transform: var(--card-hover);
    box-shadow: var(--card-shadow);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.server-address {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    background: rgba(0, 134, 195, 0.1);
    color: var(--primary);
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.3rem;
    border: 2px dashed rgba(0, 134, 195, 0.3);
    text-align: center;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    word-break: break-all;
}

.server-address:hover {
    background: rgba(0, 134, 195, 0.2);
    transform: scale(1.05);
    border-color: var(--primary);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(41, 182, 246, 0.1);
}

.status-item:last-child {
    border: none;
}

.status-label {
    font-weight: 600;
    color: var(--light-text);
}

.status-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.online { color: var(--success); }
.offline { color: var(--error); }
.players { color: var(--primary); }
.version { color: #7b1fa2; }

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--light-text);
    padding: 30px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(41, 182, 246, 0.2);
    border-top: 4px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    text-align: center;
    color: var(--error);
    margin-top: 20px;
    font-size: 1rem;
    padding: 20px;
    background: rgba(229, 57, 53, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--error);
}

.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* 特色功能区域 */
.features {
    padding: 80px 0;
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: var(--card-hover);
    box-shadow: var(--card-shadow);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 700;
}

.feature-card p {
    line-height: 1.8;
    color: var(--light-text);
    font-size: 1rem;
}

/* 数据统计区域 */
.stats-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 0;
    margin: 60px 0;
    border-radius: 20px;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--card-shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stat-label {
    color: var(--light-text);
    font-weight: 600;
    margin-top: 5px;
}

/* 页脚样式 */
footer {
    background: rgba(255, 255, 255, 0.98);
    padding: 50px 0 30px;
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.footer-content {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-content span {
    color: var(--primary);
    font-weight: 600;
}

.footer-links {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.footer-links a:hover {
    color: var(--secondary);
    transform: translateY(-2px);
    background: rgba(33, 150, 243, 0.1);
}

/* 复制成功提示 */
.copy-success {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--success);
    color: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 200, 83, 0.3);
    transform: translateX(400px);
    transition: all 0.4s var(--easing);
    z-index: 1001;
    font-weight: 600;
}

.copy-success.show {
    transform: translateX(0);
}

/* 波纹效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

.ripple-mobile {
    animation: ripple-animation 0.4s linear;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.clicked {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* 公告动画效果 */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 8px 32px rgba(255, 152, 0, 0.2);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 12px 40px rgba(255, 152, 0, 0.4);
        transform: scale(1.02);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* 移动端公告优化 */
@media (max-width: 768px) {
    .server-notice {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .server-notice h3 {
        font-size: 1.1rem !important;
    }
    
    .server-notice p {
        font-size: 1rem !important;
    }
}

/* 移动端性能优化 */
@media (max-width: 768px) {
    /* 减少移动端的模糊效果以提升性能 */
    header {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
    
    .card, .feature-card {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
    
    .stats-section {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
    
    footer {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
    
    /* 优化移动端动画性能 */
    .particle {
        will-change: transform;
        transform: translateZ(0);
    }
    
    .bubble {
        will-change: transform;
        transform: translateZ(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: clamp(100px, 12vh, 120px) 0 clamp(40px, 6vh, 50px);
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
        transition: right 0.3s ease;
        z-index: 1001;
        display: flex;
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        padding: 15px 20px;
        border-radius: 12px;
        margin-bottom: 10px;
        justify-content: flex-start;
        font-size: 1.1rem;
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .nav-links a:active {
        background-color: rgba(33, 150, 243, 0.2);
        transform: scale(0.98);
    }
    
    /* 防止移动端菜单打开时页面滚动 */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    
    .server-info {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* 优化移动端长域名显示 */
    .server-address {
        font-size: clamp(0.9rem, 3vw, 1rem);
        padding: 12px 15px;
        word-break: break-all;
    }
    
    /* 移动端减少动画强度 */
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        transform: translateY(15px);
        transition-duration: 0.6s;
    }
    
    .reveal-left {
        transform: translateX(-15px);
    }
    
    .reveal-right {
        transform: translateX(15px);
    }
    
    .reveal-scale {
        transform: scale(0.95);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 25px;
    }
    
    .feature-card {
        padding: 30px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}