/* Modern Commands Page Styles - Inspired by bleed.bot */

/* Page Layout */
.commands-page {
    min-height: 100vh;
    background: transparent; /* Let body background show through */
    position: relative;
    overflow-x: hidden;
    padding-top: 80px; /* Add space for navbar */
}

.commands-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent; /* Remove the grain effect to let the animated background show */
    opacity: 0;
}

.commands-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    position: relative;
    z-index: 1;
}

/* Header Section */
.commands-header {
    text-align: center;
    margin-bottom: 5rem;
    padding-top: 3rem;
    position: relative;
}

.commands-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.commands-header h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #d946ef);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.commands-header p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    margin-top: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Command Categories */
.command-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    max-width: 100%;
    overflow: visible;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: #a1a1aa;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.9rem;
    min-width: fit-content;
    flex-shrink: 0;
}

.category-btn:hover,
.category-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: rgba(102, 126, 234, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.category-btn i {
    width: 16px;
    height: 16px;
}

/* Search Bar */
.commands-search {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
    padding: 1rem 1.5rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: #f8fafc;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
}

.search-input::placeholder {
    color: #a1a1aa;
}

.search-input:focus {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Search Button */
.search-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: #a1a1aa;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
    max-width: 500px;
    width: 100%;
}

.search-button:hover {
    border-color: rgba(102, 126, 234, 0.4);
    color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.search-button i {
    width: 18px;
    height: 18px;
}

.search-kbd {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-family: system-ui;
    color: rgba(255, 255, 255, 0.7);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    padding-top: 8vh;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-modal-content {
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.search-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 1rem;
    color: #a1a1aa;
    z-index: 2;
}

.search-modal-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #f8fafc;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-modal-input:focus {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-modal-input::placeholder {
    color: #6b7280;
}

.search-close {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.search-close:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.1);
}

.search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0;
}

.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: #6b7280;
    text-align: center;
}

.search-empty i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-category-section {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-category-icon {
    width: 16px;
    height: 16px;
}

.search-command-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.search-command-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
}

.search-command-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.search-command-icon i {
    width: 20px;
    height: 20px;
}

.search-command-content {
    flex: 1;
    min-width: 0;
}

.search-command-name {
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.25rem;
}

.search-command-usage {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.search-command-description {
    color: #a1a1aa;
    font-size: 0.875rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-command-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.search-command-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-command-badge.permission {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.search-command-badge.admin {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.search-command-badge.elevated {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.search-command-badge.parent {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

/* Command Grouping */
.search-command-group {
    margin-bottom: 0.5rem;
}

.parent-command {
    border-left: 3px solid #667eea !important;
    background: rgba(102, 126, 234, 0.05);
}

.sub-command-count {
    font-size: 0.7rem;
    color: #a1a1aa;
    font-weight: normal;
    margin-left: 0.5rem;
}

.sub-commands-list {
    margin-left: 1rem;
    border-left: 2px solid rgba(102, 126, 234, 0.2);
    padding-left: 1rem;
}

.sub-command {
    margin-bottom: 0.25rem;
    background: rgba(255, 255, 255, 0.02);
}

.sub-command .search-command-icon.sub {
    width: 32px;
    height: 32px;
    background: rgba(102, 126, 234, 0.3);
}

.sub-command .search-command-name {
    font-size: 0.9rem;
}

.sub-command .search-command-usage {
    font-size: 0.7rem;
}

.sub-command .search-command-description {
    font-size: 0.8rem;
}

/* Highlight animation for searched commands */
@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sub-commands-list {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
    
    .search-command-content {
        padding-right: 0.5rem;
    }
    
    .search-modal-content {
        width: 95%;
        margin-top: 2rem;
    }
}

/* Commands Grid - Modified for parent-child grouping */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Command card layout */
.command-card {
    margin-bottom: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .commands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .commands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Command Cards */
.command-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.command-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.command-card:hover::before {
    opacity: 1;
}

.command-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

/* Command Highlight Animation */
.command-highlighted {
    animation: commandHighlight 4s ease-in-out;
    transform: translateY(-12px) scale(1.02) !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6), 0 20px 40px rgba(99, 102, 241, 0.25) !important;
    z-index: 10;
    position: relative;
}

@keyframes commandHighlight {
    0% {
        transform: translateY(-12px) scale(1.02);
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.6), 0 20px 40px rgba(99, 102, 241, 0.25);
    }
    50% {
        transform: translateY(-15px) scale(1.03);
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.8), 0 25px 50px rgba(99, 102, 241, 0.35);
    }
    100% {
        transform: translateY(-12px) scale(1.02);
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.6), 0 20px 40px rgba(99, 102, 241, 0.25);
    }
}

/* Command Header */
.command-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.command-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.command-icon i {
    width: 24px;
    height: 24px;
}

.command-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.25rem;
}

.command-info .command-syntax {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Command Content */
.command-description {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Command Meta */
.command-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.meta-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.meta-tag.category {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.meta-tag.admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.meta-tag.owner {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.meta-tag.bot-owner {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.meta-tag.antinuke {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.meta-tag.elevated {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.meta-tag.role {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.meta-tag.basic {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.meta-tag.cooldown {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Command Parameters */
.command-params {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.params-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.params-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.param-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.param-name {
    color: #06b6d4;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.param-type {
    color: #a1a1aa;
    font-size: 0.75rem;
}

.param-required {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
}

.param-optional {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
}

/* Command Examples */
.command-examples {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.examples-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: #06b6d4;
    font-size: 0.875rem;
}

/* Statistics Section */
.commands-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    color: #a1a1aa;
    font-size: 1rem;
    font-weight: 500;
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #a1a1aa;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.empty-icon i {
    width: 32px;
    height: 32px;
    color: white;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #a1a1aa;
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

    .commands-header h1 {
        font-size: 2rem;
    }

    .command-categories {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .commands-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .command-card {
        padding: 1.5rem;
    }

    .commands-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Command Codeblocks Styling */
.command-codeblocks {
    margin: 1.5rem 0;
    display: grid;
    gap: 1rem;
}

.codeblock-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.codeblock-section:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
}

.codeblock-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.codeblock-icon {
    width: 16px;
    height: 16px;
    color: #667eea;
}

.codeblock-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e4e4e7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.codeblock {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    overflow-x: visible;
}

.codeblock.example {
    background: rgba(102, 126, 234, 0.1);
}

.codeblock code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    color: #f4f4f5;
    line-height: 1.5;
    white-space: pre-wrap;
    display: block;
    word-wrap: break-word;
}

.codeblock.example code {
    color: #ddd6fe;
}

/* Add copy button on hover */
.codeblock {
    cursor: pointer;
}

.codeblock::after {
    content: var(--copy-text, 'Copy');
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: #a1a1aa;
    opacity: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    pointer-events: auto; /* Changed from none to auto to make it clickable */
    user-select: none;
}

.codeblock:hover::after {
    opacity: 1;
}

.codeblock:hover::after {
    background: rgba(255, 255, 255, 0.15);
    color: #f4f4f5;
}

/* Copied state styling */
.codeblock[style*="--copy-text"]::after {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

/* Command category badge styling */
.command-category-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
    border-radius: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    max-width: fit-content;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Update meta tags for aliases */
.meta-tag.aliases {
    background: rgba(168, 85, 247, 0.2);
    color: #c4b5fd;
    font-size: 0.75rem;
    max-width: none;
    overflow: visible;
    text-overflow: initial;
    white-space: normal;
}

@media (max-width: 480px) {
    .commands-stats {
        grid-template-columns: 1fr;
    }

    .command-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .command-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .command-categories {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .command-codeblocks {
        margin: 1rem 0;
    }
    
    .codeblock code {
        font-size: 0.8rem;
    }
    
    .codeblock-header {
        padding: 0.5rem 0.75rem;
    }
    
    .codeblock {
        padding: 0.75rem;
    }
}

/* Command Name Styles */
.command-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

/* Subcommand styling */
.command-name.subcommand {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    position: relative;
    font-size: 1.1rem;
}

/* Category badge styling for specific categories */
.command-category-badge.category-welcome {
    background-color: rgba(220, 38, 38, 0.2); /* Red background */
    color: #fca5a5; /* Light red text */
}

.command-category-badge.category-moderation {
    background-color: rgba(37, 99, 235, 0.2); /* Blue background */
    color: #93c5fd; /* Light blue text */
}

.command-category-badge.category-information {
    background-color: rgba(79, 70, 229, 0.2); /* Indigo background */
    color: #a5b4fc; /* Light indigo text */
}

.command-category-badge.category-utility {
    background-color: rgba(147, 51, 234, 0.2); /* Purple background */
    color: #d8b4fe; /* Light purple text */
}

.command-category-badge.category-antinuke {
    background-color: rgba(236, 72, 153, 0.2); /* Pink background */
    color: #f9a8d4; /* Light pink text */
}

.command-category-badge.category-autoresponder {
    background-color: rgba(245, 158, 11, 0.2); /* Yellow background */
    color: #fcd34d; /* Light yellow text */
}

.command-category-badge.category-autorole {
    background-color: rgba(16, 185, 129, 0.2); /* Green background */
    color: #6ee7b7; /* Light green text */
}

.command-category-badge.category-starboard {
    background-color: rgba(234, 179, 8, 0.2); /* Amber background */
    color: #fcd34d; /* Light amber text */
}

/* Remove the before pseudo-element since we're using spans now */
/* .command-name.subcommand::before {
    content: '/';
    color: #71717a;
    margin: 0 0.125rem;
    font-weight: 400;
    opacity: 0.7;
} */

/* Style for parent command section */
.command-name.subcommand .parent {
    color: #a78bfa; /* Purple for parent */
    font-weight: 700;
}

/* Style for subgroup (nested parent) */
.command-name.subcommand .subgroup {
    color: #60a5fa; /* Blue for subgroup */
    font-weight: 600;
}

/* Style for separator */
.command-name.subcommand .separator {
    color: #71717a;
    margin: 0 0.125rem;
    font-weight: 400;
    opacity: 0.7;
}

/* Style for child command section */
.command-name.subcommand .child {
    color: #f8fafc; /* White for child command */
    font-weight: 600;
}

/* Parent-Child Command Grouping (bleed.bot style) */
.command-card.parent-command {
    margin-bottom: 0.5rem;
    border: 2px solid rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    position: relative;
    z-index: 2;
}

.command-card.parent-command .command-name {
    font-size: 1.3rem;
    color: #a5b4fc;
}

.command-card.sub-command {
    margin-top: 0.75rem;
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.02);
    position: relative;
}

.command-card.sub-command::before {
    content: '';
    position: absolute;
    left: -3px;
    top: -0.75rem;
    width: 1px;
    height: 0.75rem;
    background: rgba(99, 102, 241, 0.2);
}

.command-card.sub-command:first-of-type::before {
    display: none;
}

/* Nested levels */
.command-card.nested-level-2 {
    margin-left: 3rem;
    border-left-color: rgba(96, 165, 250, 0.4);
}

.command-card.nested-level-3 {
    margin-left: 4.5rem;
    border-left-color: rgba(168, 85, 247, 0.4);
}

/* Smooth transitions */
.command-card {
    transition: all 0.2s ease;
}

.command-card:hover {
    transform: translateY(-2px);
}

/* Command category badge styling */
.command-category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
    border-radius: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}