@charset "UTF-8";

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --warning-color: #e67e22;
    --nav-height: 60px;
    --container-width: 1200px;
}

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
}

/* 导航栏样式 */
nav {
    background: var(--primary-color);
    height: var(--nav-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow-x: hidden;
}

.nav-container {
    height: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 0 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link.active,
.nav-link:hover {
    background: var(--secondary-color);
}

/* 页面容器 */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: calc(40px + var(--nav-height)) 20px 40px;
}

/* 页面切换动画 */
.page-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease forwards;
    padding-top: var(--nav-height); /* 防止被导航栏遮挡 */
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 首页特定样式 */
#home header {
    padding: 80px 0 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-bottom: 40px;
}

#home h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--primary-color);
}

#home h2 {
    font-size: 1.8rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.4;
    font-weight: 400;
}

/* 命令框样式 */
.command-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    font-family: Monaco, Consolas, monospace;
    position: relative;
    border-left: 4px solid var(--secondary-color);
    overflow-x: auto;
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #2980b9;
}

/* 功能卡片 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-card {
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: var(--primary-color);
    color: white;
}

/* 常见问题 */
.faq-item {
    margin: 25px 0;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    background: white;
}

/* 折叠内容 */
.toggle-content {
    display: none;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 10px 0;
}

.toggle-btn {
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
}

.toggle-btn::after {
    content: "▶";
    font-size: 0.8em;
    transition: transform 0.3s;
}

.toggle-btn.active::after {
    transform: rotate(90deg);
}

/* 警告框 */
.warning-box {
    background: #fff3e0;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* 页脚 */
footer {
    background: var(--primary-color);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
    line-height: 1.6;
    font-family: Arial, sans-serif;
    font-size: 1rem;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        height: auto;
    }

    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px 0;
        font-size: 1rem;
    }

    #home header {
        padding: 60px 0 30px;
    }

    #home h1 {
        font-size: 2rem;
    }

    #home h2 {
        font-size: 1.4rem;
    }

    .container {
        padding: calc(30px + var(--nav-height)) 15px 30px;
    }

    .copy-btn {
        position: static;
        margin-top: 10px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }

    h2, h3 {
        font-size: 1.2rem;
    }

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

    .command-box {
        padding: 10px;
        font-size: 0.9rem;
        border-left-width: 3px;
    }

    .copy-btn {
        margin-top: 10px;
        width: 100%;
        font-size: 0.9rem;
        position: static;
        transform: none;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .advanced-table th, .advanced-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    footer {
        font-size: 0.9rem;
        padding: 20px 10px;
    }

    .nav-container {
        gap: 10px;
    }
}
