/* === Command Palette (Ctrl + K) === */
.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    /* Slate 900 with opacity */
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cmd-palette-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cmd-palette-modal {
    width: 600px;
    max-width: 90vw;
    background: #1e293b;
    /* Slate 800 */
    border: 1px solid #334155;
    /* Slate 700 */
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-palette-overlay.open .cmd-palette-modal {
    transform: scale(1);
}

.cmd-header {
    border-bottom: 1px solid #334155;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmd-header svg {
    color: #94a3b8;
    /* Slate 400 */
    width: 20px;
    height: 20px;
}

.cmd-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    width: 100%;
    outline: none;
    font-family: 'Space Grotesk', sans-serif;
}

.cmd-input::placeholder {
    color: #64748b;
}

.cmd-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.cmd-group-title {
    padding: 8px 12px 4px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: #e2e8f0;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.1s;
}

.cmd-item:hover,
.cmd-item.active {
    background: rgba(34, 211, 238, 0.1);
    /* Cyan tint */
}

.cmd-item.active {
    border-left: 2px solid #22d3ee;
    padding-left: 10px;
    /* Adjust for border */
}

.cmd-item svg {
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.cmd-item.active svg {
    color: #22d3ee;
}

.cmd-shortcut {
    margin-left: auto;
    font-size: 0.75rem;
    color: #64748b;
    background: #334155;
    padding: 2px 6px;
    border-radius: 4px;
}

.cmd-footer {
    padding: 8px 16px;
    background: #0f172a;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: #64748b;
}

.key-hint {
    background: #334155;
    padding: 2px 6px;
    border-radius: 4px;
    color: #cbd5e1;
}

/* Custom Scrollbar */
.cmd-body::-webkit-scrollbar {
    width: 6px;
}

.cmd-body::-webkit-scrollbar-track {
    background: #1e293b;
}

.cmd-body::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}