* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", "Inter", Arial, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 页面加载动画 */
@keyframes loading {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%);
    background-image: 
        radial-gradient(rgba(52, 152, 219, 0.05) 1px, transparent 1px),
        radial-gradient(rgba(52, 152, 219, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    padding: 20px;
    line-height: 1.75;
    padding-top: 80px;
    color: #2d3748;
    min-height: 100vh;
    animation: loading 0.6s ease-out forwards;
}

/* 全局导航栏美化 - 滚动时加深背景 */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #2c3e50 0%, #1a2533 100%);
    padding: 16px 20px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    z-index: 9999;
    border-bottom: 3px solid #3498db;
    backdrop-filter: blur(8px);
    background-color: rgba(44, 62, 80, 0.95);
}

/* 滚动时导航栏样式变化 */
.global-nav.scrolled {
    background: linear-gradient(90deg, #233142 0%, #151e29 100%);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    padding: 14px 20px;
}

.global-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.global-nav-btn {
    color: #f8f9fa;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 8px;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.global-nav-btn i {
    font-size: 16px;
    opacity: 0.8;
}

.global-nav-btn:hover {
    background-color: rgba(52, 152, 219, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.global-nav-btn.active {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.45);
}

/* 模块容器美化 - 更精致的卡片效果 */
.module-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    background: #ffffff;
    padding: 45px;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.06);
    border: 1px solid #f0f4f8;
    position: relative;
    overflow: hidden;
}

/* 模块容器顶部装饰条 */
.module-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #8e44ad);
}

/* 标题样式美化 - 增加图标和更精致的装饰 */
h1 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 45px;
    color: #2c3e50;
    border-bottom: 3px solid #e3f2fd;
    padding-bottom: 20px;
    scroll-margin-top: 90px;
    font-weight: 700;
    letter-spacing: 1.2px;
    position: relative;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

h1 i {
    color: #3498db;
    margin-right: 12px;
    font-size: 32px;
}

h2 {
    font-size: 26px;
    margin-top: 45px;
    margin-bottom: 28px;
    color: #2c3e50;
    border-bottom: 2px solid #f0f4f8;
    padding-bottom: 14px;
    scroll-margin-top: 90px;
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    color: #3498db;
    font-size: 20px;
    opacity: 0.9;
}

h2::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 70px;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #6bb9f0);
}

/* 服务器信息卡片美化 - 更精致的渐变和阴影 */
.server-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 45px;
    border: 1px solid #d1e7fd;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.08);
    position: relative;
    overflow: hidden;
}

/* 服务器卡片装饰元素 */
.server-info::after {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: rgba(52, 152, 219, 0.08);
    border-radius: 50%;
}

.server-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.server-info-header h2 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 28px;
    color: #2c3e50;
}

.server-info-header h2::before,
.server-info-header h2::after {
    display: none;
}

/* 跳转按钮美化 - 更精致的渐变和交互 */
.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.25);
    position: relative;
    overflow: hidden;
}

.link-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.link-btn:hover {
    background: linear-gradient(90deg, #2980b9 0%, #1f618d 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.35);
}

.link-btn:hover::after {
    left: 100%;
}

.link-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.link-btn i {
    font-size: 16px;
}

/* 次要按钮样式 */
.link-btn.secondary {
    background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
}

.link-btn.secondary:hover {
    background: linear-gradient(90deg, #8e44ad 0%, #7d3c98 100%);
    box-shadow: 0 8px 24px rgba(142, 68, 173, 0.35);
}

/* 表格美化 - 更精致的样式和交互 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f4f8;
}

th {
    padding: 18px 20px;
    border: none;
    text-align: left;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    position: relative;
}

th i {
    margin-right: 8px;
    font-size: 14px;
}

td {
    padding: 16px 20px;
    border: 1px solid #f0f4f8;
    text-align: left;
    font-size: 14px;
    color: #2d3748;
}

tr:nth-child(even) {
    background-color: #f8fafc;
}

tr:hover {
    background-color: #f0f8ff;
    transform: scale(1.003);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* 提示框美化 - 多种类型提示框 */
.note {
    background: linear-gradient(135deg, #fff3cd 0%, #fff8e1 100%);
    padding: 22px;
    border-left: 5px solid #ffc107;
    margin: 30px 0;
    color: #856404;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.12);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.note.success {
    background: linear-gradient(135deg, #d4edda 0%, #e8f5e9 100%);
    border-left-color: #28a745;
    color: #155724;
}

.note.success i { color: #28a745; }
.note.success strong { color: #0f401b; }

.note.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fff8e1 100%);
    border-left-color: #ffc107;
    color: #856404;
}

.note.danger {
    background: linear-gradient(135deg, #f8d7da 0%, #ffebee 100%);
    border-left-color: #dc3545;
    color: #721c24;
}

.note.danger i { color: #dc3545; }
.note.danger strong { color: #5a161e; }

.note i {
    color: #ffc107;
    font-size: 20px;
    margin-top: 2px;
}

.note strong {
    color: #744c02;
    font-weight: 600;
}

/* 模块卡片美化 */
.module {
    margin: 30px 0;
    padding: 25px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f8ff 0%, #f8fafc 100%);
    border-left: 5px solid #3498db;
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.07);
    border-top: 1px solid #e3f2fd;
    transition: all 0.3s ease;
}

.module:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.1);
}

.module-title {
    font-size: 19px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-title::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 20px;
    background: linear-gradient(180deg, #3498db, #8e44ad);
    border-radius: 3px;
}

.module-title i {
    color: #3498db;
    font-size: 18px;
}

/* 统一的代码展示容器样式 */
.code-display {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin: 25px 0;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    overflow: hidden;
}

/* 文件标题栏 */
.code-display::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 8px 20px;
    background: linear-gradient(90deg, #2d3748 0%, #4a5568 100%);
    color: #f8f9fa;
    font-size: 14px;
    font-weight: 500;
    z-index: 1;
}

/* 不同类型代码的标题 */
.code-display.start-sh::before {
    content: "start.sh";
}

.code-display.command::before {
    content: "命令行指令";
}

.code-display.install-core::before {
    content: "安装核心命令";
}

.code-display.start-command::before {
    content: "启动命令";
}

.code-display.java-config::before {
    content: "Java环境配置";
}

.code-display pre {
    font-family: "Consolas", "Monaco", "JetBrains Mono", monospace;
    line-height: 1.8;
    overflow-x: auto;
    padding: 40px 20px 20px;
    margin: 0;
    font-size: 14px;
    color: #2d3748;
    background: #f8f9fa;
}

/* 复制按钮样式 - 适配新的代码容器 */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    padding: 8px 16px;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.95;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.25);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 指令卡片内的复制按钮样式 */
.cmd-copy-btn {
    padding: 6px 12px;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.95;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.cmd-copy-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.35);
}

.cmd-copy-btn.copied {
    background: linear-gradient(90deg, #27ae60 0%, #219a52 100%);
}

.copy-btn i {
    font-size: 12px;
}

.cmd-copy-btn i {
    font-size: 11px;
}

.copy-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35);
}

.copy-btn.copied {
    background: linear-gradient(90deg, #27ae60 0%, #219a52 100%);
}

/* 代码高亮样式 */
.sh-variable {
    color: #2980b9;
    font-weight: 600;
}

.sh-value {
    color: #d35400;
}

.sh-comment {
    color: #7f8c8d;
    font-style: italic;
}

.cmd-keyword {
    color: #38b2ac;
    font-weight: 600;
}

.cmd-params {
    color: #f6ad55;
}

.cmd-variable {
    color: #9f7aea;
    font-weight: 500;
}

.cmd-highlight-red {
    color: #f56565;
    font-weight: bold;
}

.cmd-comment {
    color: #718096;
    font-style: italic;
}

/* 常用指令卡片美化 */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.command-card {
    background: linear-gradient(135deg, #f5f9ff 0%, #eaf6ff 100%);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #d1e7fd;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.08);
    transition: all 0.3s ease;
}

.command-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.12);
}

.command-card h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.command-card h3 i {
    color: #3498db;
    font-size: 16px;
}

.command-card .cmd-code {
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 15px;
    border-radius: 6px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 14px;
    color: #2d3748;
    border-left: 3px solid #3498db;
    position: relative;
}

.command-card .cmd-desc {
    font-size: 13px;
    color: #4a5568;
    margin-top: 8px;
    line-height: 1.5;
}

/* 相关资源卡片样式 */
.resource-card {
    background: linear-gradient(135deg, #f5f9ff 0%, #eaf6ff 100%);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #d1e7fd;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.12);
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 100%);
}

.resource-card h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-card h3 i {
    color: #9b59b6;
    font-size: 16px;
}

.resource-card .resource-desc {
    font-size: 13px;
    color: #4a5568;
    margin-top: 8px;
    line-height: 1.5;
}

.resource-card .resource-link-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 12px;
    color: #3498db;
    font-weight: 500;
}

/* 复制成功提示美化 */
.copy-toast {
    position: fixed;
    top: 25px;
    right: 25px;
    padding: 14px 28px;
    background: linear-gradient(90deg, #27ae60 0%, #219a52 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.25);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    z-index: 99999;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-toast.error {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 回到顶部按钮 - 优化样式和交互 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px) scale(0.98);
}

.back-to-top i {
    font-size: 20px;
}

/* 响应式优化 - 更细致的适配，优化移动端体验 */
@media (max-width: 768px) {
    .module-container {
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 28px;
        margin-bottom: 35px;
    }
    
    h2 {
        font-size: 22px;
        margin-top: 35px;
    }
    
    .global-nav-container {
        justify-content: center;
        gap: 10px;
    }
    
    .server-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .server-info {
        padding: 20px;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 14px 15px;
    }
    
    .code-display pre {
        font-size: 13px;
    }
    
    .link-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    /* 移动端导航栏优化 */
    .global-nav {
        padding: 12px 10px;
    }
    
    .global-nav-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .copy-btn {
        padding: 6px 12px;
        font-size: 12px;
        right: 10px;
    }
    
    /* 移动端指令卡片适配 */
    .commands-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .command-card, .resource-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .global-nav-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .module {
        padding: 20px 15px;
    }
    
    .note {
        padding: 18px 15px;
        font-size: 13px;
    }
    
    /* 移动端代码容器优化 */
    .code-display {
        padding: 20px 15px;
    }
    
    .code-display pre {
        padding: 40px 10px 10px;
    }
}