:root {
    --primary: #00ff9f;
    --secondary: #00b8ff;
    --background: #0a0a0a;
    --text: #ffffff;
    --glow: 0 0 10px var(--primary);
}

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

/* 基础布局 */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--background);
    color: var(--text);
    font-family: 'Orbitron', sans-serif;
}

body {
    min-height: 100vh;
    position: relative;
}

/* 背景层 */
#upper-particles {
    position: fixed;
    top: -50vh; /* 向上移动半个视口高度 */
    left: 0;
    width: 100%;
    height: 100vh; /* 增加高度确保覆盖 */
    z-index: 1;
    pointer-events: none;
}

#lower-particles {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    z-index: 1;
    pointer-events: none;
    transform: translateY(-20vh); /* 向上偏移 */
}

#particles-js {
    width: 100%;
    height: 100%;
    background: transparent;
}

#particle-canvas {
    width: 100%;
    height: 100%;
    background: transparent;
}

/* 主容器 */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px 20px;
    padding-bottom: 140px;  /* 增加底部内边距，为页脚留出空间 */
    min-height: 100vh;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* 头部样式 */
.cyber-header {
    text-align: center;
    padding: 35px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    margin: 0;
    margin-bottom: -10px;
    gap: 25px;  /* 增加标题和副标题的间距 */
}

/* 标题动画效果 */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 #ff0040, -0.05em -0.025em 0 #0040ff,
            -0.025em 0.05em 0 #00ffff;
    }
    14% {
        text-shadow: 0.05em 0 0 #ff0040, -0.05em -0.025em 0 #0040ff,
            -0.025em 0.05em 0 #00ffff;
    }
    15% {
        text-shadow: -0.05em -0.025em 0 #ff0040, 0.025em 0.025em 0 #0040ff,
            -0.05em -0.05em 0 #00ffff;
    }
    49% {
        text-shadow: -0.05em -0.025em 0 #ff0040, 0.025em 0.025em 0 #0040ff,
            -0.05em -0.05em 0 #00ffff;
    }
    50% {
        text-shadow: 0.025em 0.05em 0 #ff0040, 0.05em 0 0 #0040ff,
            0 -0.05em 0 #00ffff;
    }
    99% {
        text-shadow: 0.025em 0.05em 0 #ff0040, 0.05em 0 0 #0040ff,
            0 -0.05em 0 #00ffff;
    }
    100% {
        text-shadow: -0.025em 0 0 #ff0040, -0.025em -0.025em 0 #0040ff,
            -0.025em -0.05em 0 #00ffff;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 15px var(--secondary);
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        text-shadow: 0 0 25px var(--secondary);
        transform: scale(1.01);
    }
}

.glitch-text {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    animation: glitch 2s infinite;
    margin: 0;
    padding: 0;
    line-height: 1;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    animation: glitch-anim 4s infinite linear alternate-reverse;
}

.glitch-text::before {
    left: -2px;
    text-shadow: 2px 0 #ff0040;
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: 2px;
    text-shadow: -2px 0 #0040ff;
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip-path: inset(71% 0 10% 0);
        transform: translate(-0.15em);
    }
    20% {
        clip-path: inset(29% 0 71% 0);
        transform: translate(0.15em);
    }
    40% {
        clip-path: inset(57% 0 43% 0);
        transform: translate(-0.15em);
    }
    60% {
        clip-path: inset(14% 0 86% 0);
        transform: translate(0.15em);
    }
    80% {
        clip-path: inset(86% 0 14% 0);
        transform: translate(-0.15em);
    }
    100% {
        clip-path: inset(43% 0 57% 0);
        transform: translate(0.15em);
    }
}

/* 副标题样式优化 */
.cyber-subtitle {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    margin: 0;
    line-height: 1;
    padding: 0;
    position: relative;
    text-transform: uppercase;
    animation: subtitle-breath 4s ease-in-out infinite;
    white-space: nowrap;  /* 确保单行显示 */
    background: linear-gradient(90deg, 
        #00ffcc,
        #00ff88,
        #00ffcc
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 2px rgba(0, 255, 204, 0.4));
}

@keyframes subtitle-breath {
    0% {
        opacity: 0.7;
        transform: scale(1);
        background-position: 0% 50%;
        filter: drop-shadow(0 0 2px rgba(0, 255, 204, 0.4));
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
        background-position: 100% 50%;
        filter: drop-shadow(0 0 4px rgba(0, 255, 204, 0.6));
    }
    100% {
        opacity: 0.7;
        transform: scale(1);
        background-position: 0% 50%;
        filter: drop-shadow(0 0 2px rgba(0, 255, 204, 0.4));
    }
}

/* 球体容器 */
.sphere-wrapper {
    width: 100%;
    max-width: 500px;
    height: 180px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
    background: none;
    border-radius: 10px;
    overflow: hidden;
}

.sphere-wrapper::before {
    display: none; /* 移除before伪元素 */
}

#three-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    background: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#three-background canvas {
    opacity: 0;
    transition: opacity 0.5s ease;
}

#three-background.loaded {
    opacity: 1;
}

#three-background.loaded canvas {
    opacity: 1;
}

/* 加载动画 */
.sphere-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: sphere-loading 1s linear infinite;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 4;
}

.sphere-wrapper.loaded::after {
    opacity: 0;
}

@keyframes sphere-loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 描述文本 */
.cyber-description {
    font-size: 1.2rem;
    line-height: 1.5;  /* 增加行高 */
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.1em;
    text-shadow: 0 0 5px rgba(0, 255, 159, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;  /* 添加文本居中 */
    background: rgba(10, 10, 10, 0.6);
    padding: 0.8rem 1.2rem;  /* 增加内边距 */
    border-radius: 4px;
    backdrop-filter: blur(5px);
    margin: -2rem auto 3.5rem auto;
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
    white-space: pre-line;  /* 允许换行 */
    word-wrap: break-word;  /* 允许长单词换行 */
    overflow-wrap: break-word;  /* 现代浏览器的长单词换行 */
}

/* 导航区域 */
.cyber-nav {
    width: 100%;
    padding: 2rem 0 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 10;  /* 提高整个导航区域的层级 */
}

/* 导航网格布局优化 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 380px); /* 固定宽度，自动换行 */
    gap: 3rem 4rem; /* 增加行间距和列间距 */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: inherit;
}

@media (min-width: 1200px) {
    .nav-grid {
        grid-template-columns: repeat(auto-fit, 380px); /* 固定宽度，自动换行 */
        gap: 3rem 4rem; /* 增加行间距和列间距 */
        padding: 0 1rem;
        max-width: 1400px;
        margin: 0 auto;
        justify-content: center;
    }
}

/* 导航项样式 */
.nav-item {
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
    z-index: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 1200px) {
    .nav-item {
        max-height: none;
        min-width: 380px; /* 恢复最小宽度 */
    }
}

/* 卡片内容样式 */
.item-content {
    background: rgba(0, 255, 159, 0.02);
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    position: relative;
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 48px;
    display: flex;
    flex-direction: row;
    justify-content: center; /* 内容居中 */
    align-items: center;
    border: none;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    will-change: transform, box-shadow;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-shadow: 0 0 0 1px rgba(0, 255, 159, 0.1);
    transition: all 0.3s ease;
}

@media (min-width: 1200px) {
    .item-content {
        height: 64px;
        padding: 0.8rem 1.5rem;
        border-radius: 12px;
        min-width: 380px; /* 恢复最小宽度 */
    }
}

.content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    width: auto;
    min-width: 0;
}

@media (min-width: 1200px) {
    .content-wrapper {
        gap: 1.5em;
    }
}

/* 发光边框效果 */
.item-content::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        var(--primary),
        #00ffff,
        var(--secondary),
        #ff2f95,
        var(--primary)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 500% 100%;
    animation: moveGradient 25s linear infinite;
    opacity: 0.6;
}

.item-content::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--secondary),
        #00ffff,
        var(--primary)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 400% 100%;
    animation: moveGradient 20s linear infinite reverse;
    opacity: 0.4;
    filter: blur(4px);
}

/* 边框动画 */
@keyframes moveGradient {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 500% 0%;
    }
}

/* 悬停效果 */
.nav-item:hover {
    transform: scale(1.02);  /* 改用缩放效果 */
}

.nav-item:active {
    transform: scale(0.98);
}

/* 图标和文字样式 */
.cyber-icon {
    font-size: 1.6rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

@media (min-width: 1200px) {
    .cyber-icon {
        font-size: 2rem;
        width: 42px;
        height: 42px;
    }
}

.item-title {
    font-size: 1.15rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 10px rgba(0, 255, 159, 0.3);
    letter-spacing: 0.5px;
    line-height: 32px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 1px;
}

@media (min-width: 1200px) {
    .item-title {
        font-size: 1.3rem;
        line-height: 42px;
        max-width: 300px; /* 调整文字最大宽度 */
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding-bottom: 120px;  /* 移动端稍微减小底部内边距 */
    }

    .cyber-nav {
        padding: 0 0 20px;  /* 移动端保持原有内边距 */
    }

    .cyber-footer {
        padding: 10px 0;  /* 移动端减小页脚内边距 */
    }

    .cyber-header {
        padding: 25px 0 0;  /* 移动端减小顶部内边距 */
        gap: 20px;  /* 移动端稍微减小间距 */
    }

    .glitch-text {
        font-size: 2.8rem;
        line-height: 0.9;
    }
    
    .cyber-subtitle {
        font-size: 1.1rem;
        letter-spacing: 0.15em;
    }

    .sphere-wrapper {
        height: 150px;
    }
    
    .cyber-description {
        margin: -1.2rem auto 1.5rem auto;  /* 保持移动端原有间距 */
        font-size: 1.1rem;
    }

    .nav-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;  /* 增加间距 */
        padding: 0 1rem;
        max-width: 360px;  /* 增加最大宽度 */
        margin: 0 auto;
    }
    
    .item-content {
        height: 44px;  /* 增加高度 */
        padding: 0.35rem 0.45rem;  /* 调整内边距 */
        max-width: 100%;
    }
    
    .content-wrapper {
        gap: 0.9em;  /* 增加图标和文字的间距 */
    }
    
    .cyber-icon {
        width: 24px;  /* 增加图标尺寸 */
        height: 24px;
        font-size: 1.2rem;
    }
    
    .item-title {
        font-size: 0.95rem;  /* 增加文字大小 */
        line-height: 24px;
    }

    .contact-icons {
        padding: 0;
        gap: 20px;
        justify-content: center;
    }

    .contact-item {
        min-width: 40px;
    }

    .contact-link {
        width: 38px;
        height: 38px;
    }

    .contact-icon {
        font-size: 20px;
    }

    .contact-icon.qq,
    .contact-icon.wechat,
    .contact-icon.telegram {
        width: 22px;
        height: 22px;
    }

    .contact-label {
        font-size: 11px;
        height: 55px;
    }

    #runtime-container,
    #copyright-container {
        font-size: 0.85em;
        padding: 0 15px;
    }

    .sphere-wrapper::after {
        width: 30px;
        height: 30px;
        margin: -15px 0 0 -15px;
        border-width: 1.5px;
    }
}

/* 小屏幕适配 */
@media (max-width: 480px) {
    .container {
        padding-bottom: 100px;  /* 小屏幕进一步减小底部内边距 */
    }

    .cyber-nav {
        padding: 0 0 15px;  /* 小屏幕减小导航区域的底部内边距 */
    }

    .cyber-footer {
        padding: 8px 0;  /* 小屏幕减小页脚内边距 */
    }

    .cyber-header {
        padding: 20px 0 0;  /* 小屏幕进一步减小顶部内边距 */
        gap: 15px;  /* 小屏幕进一步减小间距 */
    }

    .glitch-text {
        font-size: 2.2rem;
        line-height: 0.9;
    }

    .cyber-subtitle {
        font-size: 1rem;
        letter-spacing: 0.1em;
    }

    .sphere-wrapper {
        height: 120px;
    }

    .cyber-description {
        margin: -1rem auto 1.2rem auto;  /* 调整小屏幕间距 */
        font-size: 1rem;
    }

    .nav-grid {
        max-width: 320px;  /* 增加小屏幕最大宽度 */
        padding: 0 0.8rem;
        gap: 0.7rem;  /* 增加间距 */
    }
    
    .item-content {
        height: 42px;  /* 增加高度 */
        padding: 0.3rem 0.4rem;
    }
    
    .content-wrapper {
        gap: 0.8em;
    }
    
    .cyber-icon {
        width: 22px;
        height: 22px;
        font-size: 1.1rem;
    }
    
    .item-title {
        font-size: 0.9rem;
        line-height: 22px;
    }

    .contact-icons {
        gap: 15px;
    }

    .contact-item {
        min-width: 36px;
    }

    .contact-link {
        width: 34px;
        height: 34px;
    }

    .contact-icon {
        font-size: 18px;
    }

    .contact-icon.qq,
    .contact-icon.wechat,
    .contact-icon.telegram {
        width: 20px;
        height: 20px;
    }

    .contact-label {
        font-size: 10px;
        height: 45px;
        line-height: 10px;
    }

    #runtime-container,
    #copyright-container {
        font-size: 0.8em;
        padding: 0 10px;
    }

    .sphere-wrapper::after {
        width: 30px;
        height: 30px;
        margin: -15px 0 0 -15px;
        border-width: 1.5px;
    }
}

/* Safari 特定优化 */
@supports (-webkit-touch-callout: none) {
    html, body {
        height: -webkit-fill-available;
    }
    
    body {
        min-height: -webkit-fill-available;
    }
    
    .container {
        min-height: -webkit-fill-available;
    }

    .cyber-footer {
        padding-bottom: max(env(safe-area-inset-bottom), 15px);
    }
}

/* 确保页脚内容可见性 */
.cyber-footer,
.contact-icons,
.footer-info,
#runtime-container,
#copyright-container,
#runtime {
    visibility: visible !important;
    opacity: 1 !important;
}

/* 弹窗样式优化 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, rgba(10, 10, 10, 0.95), rgba(20, 20, 20, 0.95));
    border-radius: 20px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    position: relative;
    border: 1px solid rgba(0, 255, 159, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.1),
                inset 0 0 20px rgba(0, 255, 159, 0.05);
    transform: scale(0.95);
    transition: all 0.3s ease;
    animation: modalAppear 0.3s ease forwards;
}

@keyframes modalAppear {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 255, 159, 0.2);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

.modal-title {
    color: var(--primary);
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
    letter-spacing: 1px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-close::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 159, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.modal-close:hover::before {
    transform: scale(1);
}

.modal-body {
    text-align: center;
    padding: 0 10px;
}

.contact-value {
    font-size: 1.3em;
    margin: 25px 0;
    word-break: break-all;
    color: var(--text);
    background: rgba(0, 255, 159, 0.05);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 159, 0.2);
    position: relative;
    overflow: hidden;
}

.contact-value::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 159, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.qr-code {
    max-width: 200px;  /* 调整最大宽度 */
    width: 100%;
    height: auto;
    margin: 25px auto;
    border-radius: 12px;  /* 圆角更柔和 */
    padding: 12px;  /* 增加内边距 */
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.2);
    display: none;
    opacity: 1;
    border: none;  /* 移除原有边框 */
    position: relative;
}

.qr-code::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;  /* 与父元素相同的圆角 */
    box-shadow: inset 0 0 0 1px rgba(0, 255, 159, 0.3);  /* 内阴影作为边框 */
    pointer-events: none;
}

.qr-code.visible {
    display: block;
    animation: qrCodeAppear 0.3s ease forwards;
}

@keyframes qrCodeAppear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.copy-btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--background);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1em;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    height: 48px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 159, 0.3);
}

.copy-btn:hover::before {
    transform: translateX(100%);
}

.copy-btn.copied {
    background: var(--primary);
}

.copy-btn.error {
    background: #ff4444;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
        width: 85%;
    }

    .modal-title {
        font-size: 1.2em;
    }

    .contact-value {
        font-size: 1.1em;
        padding: 12px;
        margin: 20px 0;
    }

    .qr-code {
        max-width: 180px;
        margin: 20px auto;
        padding: 8px;
    }

    .copy-btn {
        padding: 10px 20px;
        font-size: 1em;
        min-width: 160px;
        height: 44px;
    }
}

/* 性能优化 */
.nav-item, .item-content, .cyber-icon, .item-title {
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* 触摸设备优化 */
@media (hover: hover) and (pointer: fine) {
    .nav-item:hover .item-content {
        transform: none;  /* 移除之前的transform效果 */
    }
}

@media (hover: none) {
    .nav-item:active .item-content {
        transform: scale(0.98);
        background: rgba(0, 255, 159, 0.08);
    }
}

/* 加载优化 */
.nav-grid {
    content-visibility: auto;
    contain: layout style paint;
}

/* 页脚样式 */
.cyber-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: transparent;
    border-top: 1px solid rgba(0, 255, 159, 0.2);
    padding: 12px 0;  /* 稍微减小页脚的内边距 */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-icons {
    display: flex !important;
    gap: 25px;
    padding: 0;  /* 移除内边距 */
    justify-content: center;  /* 水平居中 */
    align-items: center;
    position: relative;
    z-index: 10000;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 45px;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);  /* 更透明的背景 */
    border: 1.5px solid rgba(0, 255, 159, 0.3);  /* 调整边框透明度 */
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 0 8px rgba(0, 255, 159, 0.1);  /* 调整阴影透明度 */
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.contact-icon {
    font-size: 20px;
    color: var(--primary);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(0, 255, 159, 0.3));
    line-height: 1;  /* 重置行高 */
}

/* 图片类型的图标（QQ、微信、Telegram）*/
.contact-icon.qq,
.contact-icon.wechat,
.contact-icon.telegram {
    width: 20px;  /* 调小尺寸 */
    height: 20px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    margin: 0;  /* 重置外边距 */
    padding: 0;  /* 重置内边距 */
    vertical-align: middle;  /* 垂直对齐 */
}

/* 字体类型的图标（邮件、GitHub等）*/
.contact-icon.fa,
.contact-icon.fab,
.contact-icon.fas {
    font-size: 20px;  /* 统一字体图标大小 */
    display: block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;  /* 确保垂直居中 */
}

/* 悬停效果 */
.contact-link:hover {
    background: rgba(0, 255, 159, 0.05);  /* 更透明的悬停背景 */
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 
        0 0 15px rgba(0, 255, 159, 0.2),
        0 0 30px rgba(0, 255, 159, 0.1);
}

.contact-link:hover .contact-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgb(255, 255, 255));
}

.contact-label {
    font-size: 12px;
    color: var(--text);
    opacity: 0.9;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(0, 255, 159, 0.3);
    writing-mode: vertical-lr;
    letter-spacing: 1px;
    height: 60px;  /* 调整高度 */
    line-height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;  /* 居中对齐 */
}

.footer-info {
    width: 100%;  /* 设置宽度 */
    padding: 10px 20px 0;  /* 添加上边距 */
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    z-index: 10000;
}

#runtime-container,
#copyright-container {
    width: 100%;
    text-align: center;
    display: flex !important;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9em;
    line-height: 1.4;
    padding: 0 20px;
    background: linear-gradient(90deg, 
        rgba(0, 255, 204, 0) 0%,
        rgba(0, 255, 204, 0.05) 25%,
        rgba(0, 255, 204, 0.05) 75%,
        rgba(0, 255, 204, 0) 100%
    );
    backdrop-filter: blur(5px);
    border-radius: 15px;
    margin: 2px 0;
}

#runtime {
    color: #00ffcc;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.6);
    margin: 0 5px;
    display: inline-block !important;
    position: relative;
    padding: 0 5px;
}

#runtime::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(0, 255, 204, 0) 0%,
        rgba(0, 255, 204, 0.3) 50%,
        rgba(0, 255, 204, 0) 100%
    );
    transform: translateY(8px);
}

/* 响应式优化 */
@media (min-width: 1200px) {
    .nav-grid {
        grid-template-columns: repeat(auto-fit, 380px); /* 固定宽度，自动换行 */
        gap: 3rem 4rem; /* 增加行间距和列间距 */
        padding: 0 1rem;
        max-width: 1400px;
        margin: 0 auto;
        justify-content: center;
    }

    .sphere-wrapper {
        height: 200px;
        max-width: 600px;
    }
}

/* 性能优化相关样式 */
/* 减少动画效果 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.reduce-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* 优化图片加载 */
img {
    content-visibility: auto;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 优化渲染性能 */
.nav-grid {
    content-visibility: auto;
    contain: layout style paint;
    will-change: transform;
}

.nav-item {
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

/* 优化滚动性能 */
.container {
    overflow-anchor: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* 优化动画性能 */
.modal-overlay,
.modal-content,
.contact-link,
.cyber-icon,
.item-content {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* 优化触摸响应 */
.touch-element {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 优化字体渲染 */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 优化阴影渲染 */
.modal-content,
.nav-item,
.contact-link {
    filter: drop-shadow(0 0 10px rgba(0, 255, 159, 0.2));
}

/* 优化背景渲染 */
#particles-js,
#three-background {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 优化移动端性能 */
@media (max-width: 768px) {
    .nav-grid {
        content-visibility: auto;
        contain: layout style paint;
    }

    .modal-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 0, 0, 0.9);
    }

    .contact-icons {
        contain: layout style;
    }
}

/* 优化低端设备性能 */
@media (prefers-reduced-data: reduce) {
    #particles-js,
    #three-background {
        display: none;
    }

    .modal-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-item,
    .contact-link {
        filter: none;
    }
} 