.command-palette {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: min(450px, 90vw); /* Use min() for responsive width */
    max-width: 95vw;
    background: var(--body-color);
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    margin: 0 auto;
}

.command-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid var(--text-color-light);
}

.command-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 16px;
    outline: none;
    padding: 8px 0;
    margin-right: 12px;
}

.command-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 2px;
}

.command-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    margin: 2px 8px;
    border-radius: 6px;
    color: var(--text-color);
}

.command-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--title-color);
}

/* For dark theme */
body.dark-theme .command-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.command-item i {
    font-size: 18px;
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.theme-toggle-btn:hover {
    background-color: var(--first-color);
    color: var(--white-color);
}

.theme-toggle-btn i {
    font-size: 20px;
}

.command-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    z-index: 999;
}

/* Add these styles for better blur handling */
[style*="blur"] {
    will-change: filter;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.command-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--container-color);
    border-top: 1px solid var(--text-color-light);
    font-size: 14px;
    color: var(--text-color-light);
}

.command-footer-left {
    display: flex;
    gap: 16px;
    align-items: center;
}

.command-footer-left span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.spotify-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-color-light);
    text-decoration: none;
    transition: color 0.2s;
}

.spotify-link:hover {
    color: #1DB954; /* Spotify green */
}

.command-footer i {
    font-size: 16px;
}

.command-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esc-indicator {
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 4px;
    background: var(--background);
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 500;
}

.command-separator {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-color-light);
    border-top: 1px solid var(--text-color-light);
    margin-top: 8px;
}

.blog-suggestion {
    padding: 8px 16px;
}

.blog-suggestion-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.blog-suggestion-content small {
    color: var(--text-color-light);
    font-size: 12px;
}

.tag {
    background: var(--first-color);
    color: var(--container-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.no-results {
    opacity: 0.7;
    font-style: italic;
}

.no-results i {
    font-size: 20px;
    color: var(--first-color);
}

.no-results-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.no-results-content small {
    color: var(--text-color-light);
}

.project-suggestion i {
    color: var(--first-color);
}

/* Add responsive styles */
@media screen and (max-width: 768px) {
    .command-palette {
        top: 10%;
        width: 90vw;
    }

    .command-list {
        max-height: 50vh;
    }

    .command-input {
        font-size: 14px;
    }

    .command-item {
        padding: 10px 12px;
        margin: 2px 4px;
    }

    .command-footer {
        padding: 8px 12px;
        font-size: 12px;
    }

    .command-footer-left {
        gap: 8px;
    }

    .command-footer i {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .command-palette {
        top: 5%;
        width: 92vw;
        max-width: 100vw;
        margin: 0 10px;
    }

    .command-input-wrapper {
        padding: 8px;
    }

    .command-input {
        font-size: 14px;
    }

    .command-item {
        padding: 8px 12px;
        margin: 2px 4px;
        font-size: 14px;
    }

    /* Ensure content doesn't overflow on small screens */
    .command-footer {
        padding: 8px;
        font-size: 12px;
    }

    .command-footer-left {
        gap: 6px;
    }

    .esc-indicator {
        display: none; /* Hide ESC indicator on very small screens */
    }

    .command-footer-left span:first-child {
        display: none; /* Hide location on very small screens */
    }

    .command-item i {
        font-size: 16px;
    }

    .theme-toggle-btn i {
        font-size: 18px;
    }
}

/* Add tablet-specific adjustments */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .command-palette {
        width: 600px;
    }

    .command-list {
        max-height: 50vh;
    }
}

/* iPhone-specific adjustments */
@media screen and (max-width: 390px) {
    .command-palette {
        width: 88vw;
        top: 2%;
    }

    .command-list {
        max-height: 60vh;
    }
}