* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: #e94560;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #888;
    font-size: 1.1rem;
}

.status-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.status-bar span {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    background: #0f3460;
}

.native-active {
    color: #10b981;
    border: 1px solid #10b981;
}

.native-inactive {
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.native-offline {
    color: #ef4444;
    border: 1px solid #ef4444;
}

section {
    background: #16213e;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #0f3460;
}

section h2 {
    color: #e94560;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.detection-panel {
    text-align: center;
}

.key-display {
    background: #0f3460;
    border: 2px dashed #e94560;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem 0;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
}

.key-display .placeholder {
    color: #888;
}

.key-display .keys {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.key {
    background: #e94560;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.result-panel {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.result-panel.hidden {
    display: none;
}

.result-panel.os-level {
    background: #2d1b69;
    border: 1px solid #7c3aed;
}

.result-panel.app-level {
    background: #064e3b;
    border: 1px solid #10b981;
}

.result-panel.conflict {
    background: #7c2d12;
    border: 1px solid #f97316;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.result-type {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.os-level .result-type {
    background: #7c3aed;
}

.app-level .result-type {
    background: #10b981;
}

.conflict .result-type {
    background: #f97316;
}

.result-owner {
    font-size: 1.2rem;
    font-weight: bold;
}

.result-details {
    color: #ccc;
    font-size: 0.9rem;
    text-align: left;
    margin-top: 0.5rem;
}

.result-details code {
    background: #1a1a2e;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-bar input,
.filter-bar select {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #0f3460;
    background: #1a1a2e;
    color: #eee;
    font-size: 1rem;
}

.filter-bar input {
    flex: 1;
}

.shortcuts-list {
    display: grid;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #0f3460;
    border-radius: 6px;
    transition: background 0.2s;
}

.shortcut-item:hover {
    background: #1a4a7a;
}

.shortcut-keys {
    font-family: 'Courier New', monospace;
    background: #1a1a2e;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.shortcut-owner {
    color: #aaa;
    font-size: 0.9rem;
}

.shortcut-type {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.type-os {
    background: #7c3aed;
}

.type-app {
    background: #10b981;
}

.type-raycast {
    background: #f43f5e;
}

.apps-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.app-card {
    background: #0f3460;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #e94560;
}

.app-card h3 {
    color: #e94560;
    margin-bottom: 0.5rem;
}

.app-card p {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.app-card .location {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #888;
    word-break: break-all;
}

.error, .offline {
    color: #f59e0b;
    text-align: center;
    padding: 1rem;
}

footer {
    text-align: center;
    color: #888;
    margin-top: 2rem;
}

.api-note {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .filter-bar {
        flex-direction: column;
    }

    .apps-list {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}
