/* ================================================
   REX9 COMMANDS PAGE - PREMIUM V2
   Ultra-modern, glassmorphic design
   ================================================ */

/* ============================================
   PAGE HEADER
   ============================================ */

.commands-header-section {
    padding: 10rem 0 6rem;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.page-header .hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.page-header .hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   SEARCH WRAPPER
   ============================================ */

.command-search-wrapper {
    max-width: 700px;
    margin: 4rem auto 0;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 1.5rem 1.5rem 1.5rem 4rem !important;
    background: rgba(15, 15, 16, 0.8) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(20px);
    font-size: 1.15rem !important;
    color: var(--text) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.search-icon-abs {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    z-index: 11;
}

.search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15), 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* ============================================
   CATEGORY FILTERS
   ============================================ */

.category-filters {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.75rem;
    background: transparent;
    border: none;
    border-radius: 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn i {
    width: 20px;
    height: 20px;
}

.filter-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
}

/* ============================================
   COMMAND GRID & CARDS
   ============================================ */

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.command-detail-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.command-detail-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
}

/* Removed glow effect */

/* ============================================
   CARD CONTENT
   ============================================ */

.command-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.command-detail-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.command-badge {
    padding: 0.5rem 1rem;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 12px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.command-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.command-detail-card code {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #fff;
    border: 1px solid var(--border);
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    word-break: break-all;
    position: relative;
}

.command-detail-card code:hover {
    background: rgba(88, 101, 242, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   RESPONSIVE DESIGN -- COMMANDS SPECIFIC
   ============================================ */

@media (max-width: 1024px) {
    .command-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .commands-header-section {
        padding: 8rem 0 4rem;
    }

    .page-header .hero-title {
        font-size: 2.5rem;
    }

    .command-grid {
        grid-template-columns: 1fr;
        /* Single column for mobile */
        gap: 1.5rem;
    }

    .command-detail-card {
        padding: 1.5rem;
    }

    /* Optimize Search Input for Mobile */
    .search-input {
        padding: 1rem 1rem 1rem 3rem !important;
        /* Reduced padding */
        font-size: 1rem !important;
    }

    .search-icon-abs {
        left: 1rem;
    }

    /* Horizontal Scrollable Filters */
    .category-filters {
        display: flex;
        /* Ensure flex */
        flex-wrap: nowrap;
        /* Prevent wrapping */
        overflow-x: auto;
        /* Enable horizontal scroll */
        justify-content: flex-start;
        /* Align start */
        padding: 0.5rem;
        width: 100%;
        margin-bottom: 3rem;
        background: transparent;
        border: none;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll iOS */
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
    }

    .category-filters::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .filter-btn {
        flex: 0 0 auto;
        /* Don't shrink */
        white-space: nowrap;
        padding: 0.75rem 1.25rem;
        background: rgba(255, 255, 255, 0.05);
        /* Slight bg for visibility */
        border: 1px solid var(--border);
    }

    .filter-btn.active {
        background: var(--primary);
        border-color: var(--primary);
    }
}

@media (max-width: 480px) {
    .page-header .hero-title {
        font-size: 2rem;
    }
}