:root {
    --primary-color: #4dabf7;
    --secondary-color: #339af0;
    --card-padding: 1.2rem;
    --transition-speed: 0.2s;
    --shadow-color: rgba(0,0,0,0.5);
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin: 2rem 0;
    font-size: 2.5rem;
}

/* 搜索框 */
.search-container {
    margin: 1.5rem 0;
    position: sticky;
    top: 0;
    background: #1a1a1a;
    z-index: 100;
}

.search-bar {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    background: #2d2d2d;
    color: #e0e0e0;
}

/* 分类导航 */
.category-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    margin-bottom: 1rem;
    position: sticky;
    top: 60px;
    background: #1a1a1a;
    z-index: 99;
}

.category-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #2d2d2d;
    transition: all var(--transition-speed);
}

.category-nav a:hover {
    background: var(--primary-color);
    color: #1a1a1a;
}

/* 命令卡片 */
.category {
    margin-bottom: 2.5rem;
}

.category-title {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
    margin: 1.5rem 0;
    font-size: 1.8rem;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
}

.command-card {
    background: #2d2d2d;
    border-radius: 8px;
    padding: var(--card-padding);
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    cursor: pointer;
}

.command-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.7);
}

.command-desc {
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.command-code {
    font-family: 'Fira Code', 'Courier New', monospace;
    background: #1e1e1e;
    padding: 0.8rem;
    border-radius: 6px;
    position: relative;
    z-index: 1;
    word-break: break-all;
    color: #f0f0f0;
}

/* 多行命令样式 */
.multi-command-card .command-code-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.command-code-line {
    font-family: 'Fira Code', 'Courier New', monospace;
    background: #1e1e1e;
    padding: 0.6rem;
    border-radius: 6px;
    position: relative;
    z-index: 1;
    word-break: break-all;
    transition: background-color 0.2s;
    color: #f0f0f0;
}

.command-code-line:hover {
    background-color: #333333;
}

.line-number {
    color: #a0a0a0;
    margin-right: 8px;
    font-size: 0.85em;
}

.param {
    color: #ff9eb5;
    font-style: italic;
    font-weight: 500;
}

/* 复制反馈 */
.copied-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(40, 120, 40, 0.95);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copied-effect {
    animation: pulse 0.8s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

/* 复制提示框 */
.copy-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #4caf50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    pointer-events: none;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .commands-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .commands-grid {
        grid-template-columns: 1fr;
    }
    
    .command-code {
        font-size: 0.9rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
}

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

/* 在CSS中添加以下样式增强反馈 */
.copied-effect {
    animation: pulse 0.8s;
    background-color: rgba(40, 120, 40, 0.3);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}