﻿
:root {
    --cp-bg: rgba(255, 255, 255, 0.65);
    
    --cp-border: rgba(255, 255, 255, 0.4);
    --cp-text: #1F1F1F;
    --cp-text-muted: #666;
    
    --cp-hover: rgba(0, 0, 0, 0.05);
    
    --cp-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
    --cp-item-radius: 12px;
    --cp-container-radius: 20px;
}

.dark {
    --cp-bg: rgba(26, 26, 26, 0.65);
    --cp-border: rgba(255, 255, 255, 0.1);
    --cp-text: #EDEDED;
    --cp-text-muted: #888;
    --cp-hover: rgba(255, 255, 255, 0.1);
    --cp-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.4);
}


.cmd-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-out;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.cmd-backdrop.open {
    display: flex;
    opacity: 1;
}


.cmd-container {
    width: 100%;
    max-width: 480px;
    
    margin: 0 16px;
    position: relative;
    transform: scale(0.98) translateY(4px);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-backdrop.open .cmd-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}


.cmd-surface {
    background: var(--cp-bg);
    backdrop-filter: blur(20px);
    
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-container-radius);
    box-shadow: var(--cp-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


.cmd-input-wrapper {
    position: relative;
    border-bottom: 1px solid var(--cp-border);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    background: transparent;
}

.cmd-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--cp-text);
    padding-left: 32px;
    padding-right: 48px;
    font-family: inherit;
    font-weight: 400;
}

.cmd-input::placeholder {
    color: var(--cp-text-muted);
    opacity: 0.8;
}


.cmd-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cp-text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}


.cmd-esc {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 500;
    color: var(--cp-text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    pointer-events: none;
    text-transform: lowercase;
}

.dark .cmd-esc {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.05);
}


.cmd-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
    scroll-behavior: smooth;
}


.cmd-group-heading {
    padding: 12px 12px 8px 16px;
    font-size: 11px;
    font-weight: 500;
    color: var(--cp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


.cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin: 2px 8px;
    border-radius: var(--cp-item-radius);
    cursor: pointer;
    color: var(--cp-text);
    text-decoration: none;
    transition: background 0.1s ease;
    background: transparent;
}

.cmd-item:hover,
.cmd-item.selected {
    background: var(--cp-hover);
}

.cmd-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cmd-icon {
    width: 18px;
    height: 18px;
    stroke-width: 1.5px;
    color: var(--cp-text-muted);
    opacity: 0.8;
}

.cmd-item:hover .cmd-icon,
.cmd-item.selected .cmd-icon {
    color: var(--cp-text);
    opacity: 1;
}

.cmd-item span {
    font-size: 14px;
    font-weight: 450;
    color: var(--cp-text);
}


.cmd-shortcut {
    font-size: 12px;
    color: var(--cp-text-muted);
    background: rgba(0, 0, 0, 0.04);
    width: 24px;
    
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    
    font-weight: 500;
}

.dark .cmd-shortcut {
    background: rgba(255, 255, 255, 0.1);
}


.cmd-divider {
    height: 1px;
    background: var(--cp-border);
    margin: 8px 24px;
    opacity: 0.6;
}


.cmd-list::-webkit-scrollbar {
    width: 6px;
}

.cmd-list::-webkit-scrollbar-track {
    background: transparent;
}

.cmd-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    border: 2px solid transparent;
}

.dark .cmd-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none !important;
}


.fab-container {
    position: fixed;
    bottom: 2.5rem;
    right: 1.5rem;
    z-index: 9999;
    pointer-events: auto;
}

.brutalist-fab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: #1a1a1a;
    font-weight: bold;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: white;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    box-shadow: 3px 3px 0px #000000;
}

.dark .brutalist-fab {
    background-color: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
    color: white;
}

.brutalist-fab:hover {
    transform: translate(-4px, -4px) rotate(1deg);
    box-shadow: 8px 8px 0 #000000, 12px 12px 16px rgba(0, 0, 0, 0.15);
}

.dark .brutalist-fab:hover {
    background-color: #3a3a3a;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.6), 12px 12px 16px rgba(0, 0, 0, 0.3);
}

.brutalist-fab::before,
.brutalist-fab::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: 0.6s;
}

.brutalist-fab::before {
    left: -100%;
}

.brutalist-fab::after {
    left: 100%;
}

.brutalist-fab:hover::before {
    animation: swipeRight 1.5s infinite;
}

.brutalist-fab:hover::after {
    animation: swipeLeft 1.5s infinite;
}

@keyframes swipeRight {
    100% {
        transform: translateX(200%) skew(-45deg);
    }
}

@keyframes swipeLeft {
    100% {
        transform: translateX(-200%) skew(-45deg);
    }
}

.fab-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 3;
}

.fab-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.brutalist-fab:hover .fab-icon-wrapper {
    transform: scale(1.1);
}

.brutalist-fab:active .fab-icon-wrapper {
    transform: scale(0.95);
}