/* Vim Commands Reference Styles */

:root {
    --primary-color: #2d5a2d;
    --secondary-color: #4a8f4a;
    --accent-color: #7bc97b;
    --background-color: #1a1a1a;
    --surface-color: #2a2a2a;
    --text-color: #e0e0e0;
    --text-muted: #b0b0b0;
    --border-color: #404040;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --border-radius: 8px;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--background-color) 0%, #1f1f1f 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--surface-color) 0%, #333 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.icon {
    font-size: 3.5rem;
    color: var(--accent-color);
    filter: drop-shadow(0 2px 4px rgba(123, 201, 123, 0.3));
}

header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.search-section {
    margin-bottom: 2rem;
    position: relative;
}

#search {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    transition: all 0.3s ease;
}

#search:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(123, 201, 123, 0.1);
}

#search::placeholder {
    color: var(--text-muted);
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.category-btn:hover {
    border-color: var(--accent-color);
    background: rgba(123, 201, 123, 0.1);
    transform: translateY(-2px);
}

.category-btn.active {
    background: var(--primary-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: var(--shadow);
}

#commands-container {
    display: grid;
    gap: 2rem;
}

.command-group {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.command-group:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.command-group h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.command-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    gap: 1rem;
}

.command-item:hover {
    background: rgba(123, 201, 123, 0.05);
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.command-item:last-child {
    margin-bottom: 0;
}

.command-keys {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    flex-shrink: 0;
}

.key {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    color: var(--accent-color);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.command-description {
    flex: 1;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
}

.hidden {
    display: none !important;
}

footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

footer p {
    color: var(--text-muted);
    font-style: italic;
    font-family: var(--font-mono);
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0a0a0a;
        --surface-color: #1a1a1a;
        --border-color: #333;
    }
}

/* Light mode support */
@media (prefers-color-scheme: light) {
    :root {
        --primary-color: #1b5e20;
        --secondary-color: #388e3c;
        --accent-color: #4caf50;
        --background-color: #f5f5f5;
        --surface-color: #ffffff;
        --text-color: #212121;
        --text-muted: #666666;
        --border-color: #e0e0e0;
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    body {
        background: linear-gradient(135deg, var(--background-color) 0%, #e8f5e8 100%);
    }

    .key {
        background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
        color: var(--primary-color);
        border-color: var(--border-color);
    }

    .command-item {
        background: rgba(255, 255, 255, 0.5);
    }

    .command-item:hover {
        background: rgba(76, 175, 80, 0.1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .icon {
        font-size: 2.5rem;
    }

    .categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .category-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .command-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        text-align: left;
    }

    .command-keys {
        min-width: auto;
        width: 100%;
        justify-content: flex-start;
    }

    .key {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .command-group {
        padding: 1.5rem;
    }
}

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

    header p {
        font-size: 1rem;
    }

    .command-group h3 {
        font-size: 1.3rem;
    }

    .command-description {
        font-size: 0.9rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .search-section,
    .categories {
        display: none;
    }

    .command-group {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }

    .key {
        background: #f0f0f0;
        color: #333;
        border: 1px solid #ccc;
    }
}