* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --primary-color: #4caf50;
    --primary-dark: #2e7d32;
    --primary-light: #c8e6c9;
    --accent-color: #7cb342;
    --background-color: #f0f4f8;
    --card-bg: rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-radius: 12px;
    --box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    background-image: url('./img/background.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    min-height: calc(100vh - 180px); /* 减去页脚高度，防止页面过短时页脚上浮 */
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 30px;
    padding: 20px;
}

.sidebar {
    width: 280px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 20px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    height: fit-content;
    position: sticky;
    top: 20px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--primary-dark);
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#category-list {
    list-style-type: none;
}

#category-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    z-index: 1; /* 确保内容在伪元素上方 */
}

/* 从中间扩散的悬浮效果 */
#category-list li::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    height: 0;
    width: 0;
    background-color: var(--primary-color);
    opacity: 0.2;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: all 0.4s ease-out;
    z-index: -1; /* 确保在内容下方 */
}

#category-list li:hover::before {
    width: 300px; /* 足够大的值确保覆盖整个按钮 */
    height: 300px;
    opacity: 0.3;
}

#category-list li.active {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px) scale(1.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 激活状态下不显示悬浮效果 */
#category-list li.active::before {
    display: none;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#category-list li:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.content {
    flex-grow: 1;
    padding: 30px;
    margin-left: 20px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--glass-border);
    animation: fadeInRight 0.8s ease;
    position: relative;
    overflow: hidden;
    height: fit-content; /* 确保内容区不会无限延伸 */
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

#content-title {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--primary-dark);
    font-size: 2rem;
    position: relative;
}

#content-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

#content-body {
    line-height: 1.8;
    animation: fadeIn 0.5s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#content-body h3 {
    margin: 25px 0 15px;
    color: var(--primary-dark);
    font-size: 1.4rem;
    position: relative;
    padding-left: 15px;
}

#content-body h3 i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* 添加指令列表下方的提示样式 */
.command-tip {
    margin: -5px 0 20px 0;
    padding: 8px 15px;
    font-size: 0.95rem;
    color: #ffffff;
    background-color: rgba(76, 175, 80, 0.25);
    border-radius: 6px;
    display: inline-block;
    animation: fadeInUp 0.5s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.command-tip i {
    margin-right: 6px;
    color: #a5d6a7;
}

#content-body h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

#content-body p {
    margin-bottom: 20px;
    color: var(--text-primary);
}

pre {
    background-color: rgba(240, 244, 248, 0.7);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    overflow-x: auto;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 命令表格样式改进 */
.commands-table {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(240, 244, 248, 0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(0);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移除复制按钮，整行可点击 */
.command-row {
    display: flex;
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: left center;
    animation: slideInRight 0.3s ease forwards;
    opacity: 0;
    cursor: pointer; /* 添加指针样式表示可点击 */
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.command-row:last-child {
    border-bottom: none;
}

.command-row:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateX(4px) scale(1.01);
}

.command-name {
    width: 40%;
    padding: 15px;
    font-weight: bold;
    position: relative;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
}

.command-name::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: rgba(76, 175, 80, 0.2);
}

.command-desc {
    width: 60%;
    padding: 15px;
    position: relative;
    line-height: 1.5;
}

/* 隐藏复制按钮 */
.copy-btn {
    display: none;
}

/* 添加中央弹窗样式 */
.copy-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(46, 125, 50, 0.9);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none; /* 初始状态隐藏 */
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
}

.copy-popup i {
    font-size: 1.1rem;
}

@keyframes popupFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    25% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--primary-dark);
}

.loading i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.error-message {
    background-color: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* 优化移动端适配 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
        max-width: 100%;
        min-height: auto; /* 移动端不需要控制最小高度 */
    }

    .sidebar {
        width: 100%;
        margin-bottom: 15px;
        position: static;
        padding: 15px;
        height: auto;
    }

    #category-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
    }

    #category-list li {
        flex: 0 0 auto;
        margin-bottom: 0;
        text-align: center;
        padding: 8px 15px;
    }

    .content {
        margin-left: 0;
        padding: 20px;
        width: 100%;
    }

    #content-title {
        font-size: 1.5rem;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

    .command-row {
        flex-direction: column;
    }

    .command-name {
        width: 100%;
        padding: 10px 15px;
        border-bottom: 1px dashed rgba(76, 175, 80, 0.2);
    }

    .command-desc {
        width: 100%;
        padding-left: 0;
        padding-top: 5px;
        font-size: 0.9rem;
    }
    
    .command-tip {
        margin: -5px 0 15px 0;
        padding: 6px 12px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    /* 增强触摸反馈 */
    .command-row:active {
        background-color: rgba(76, 175, 80, 0.15);
    }
    
    /* 移动端弹窗样式微调 */
    .copy-popup {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

/* 更小屏幕的优化 */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .sidebar, .content {
        padding: 12px;
        border-radius: 8px;
    }

    .sidebar h2, #content-title {
        font-size: 1.2rem;
    }

    #content-body h3 {
        font-size: 1.1rem;
        padding-left: 10px;
    }

    #content-body h3::before {
        width: 3px;
    }

    #content-body p {
        margin-bottom: 15px;
        font-size: 0.95rem;
    }

    pre {
        padding: 12px;
        font-size: 0.85rem;
        margin: 10px 0;
    }

    #category-list li {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .commands-table {
        margin: 10px 0;
    }

    .command-name, .command-desc {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* 页脚样式已移至footer-complete.css */

    /* 小屏幕弹窗样式微调 */
    .copy-popup {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 120px;
        text-align: center;
    }
}

.loading-categories, .error-categories, .no-files-message {
    padding: 15px;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    font-size: 0.9rem;
    animation: fadeIn 0.5s ease;
}

.loading-categories {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.loading-categories i {
    margin-right: 8px;
    color: var(--primary-color);
}

.error-categories {
    background-color: rgba(255, 87, 87, 0.1);
    color: #d32f2f;
}

.error-categories i {
    margin-right: 8px;
    color: #d32f2f;
}

.no-files-message {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ff8f00;
}

.no-files-message i {
    margin-right: 8px;
    color: #ff8f00;
} 