:root {
    --bg: #0b0420;
    --bg-elevated: #160a35;
    --bg-hover: #21104a;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 240, 135, 0.5);
    --text: #f5f3ff;
    --text-muted: #9b8dc4;
    --accent: #00f087;
    --accent-dark: #00b864;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    padding: 64px 0 40px;
    background: linear-gradient(180deg, #1a0a45 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
}

.header h1 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #c3b3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 32px;
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

#search {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

#search:focus {
    border-color: var(--accent);
    background: var(--bg-hover);
}

#search::placeholder {
    color: var(--text-muted);
}

.count {
    color: var(--text-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Groups */
.group {
    margin-bottom: 48px;
}

.group h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.group.empty {
    display: none;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

/* Card */
.card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 240, 135, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card:hover::before {
    opacity: 1;
}

.card-info {
    flex: 1;
    min-width: 0;
    position: relative;
}

.card-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-path {
    font-size: 11px;
    color: var(--text-muted);
    font-family: "SF Mono", Monaco, Consolas, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-arrow {
    color: var(--accent);
    font-size: 18px;
    margin-left: 12px;
    transition: transform 0.2s;
    position: relative;
}

.card:hover .card-arrow {
    transform: translateX(4px);
}

.card.hidden {
    display: none;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    margin-top: 64px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
}

/* Responsive */
@media (max-width: 640px) {
    .header {
        padding: 40px 0 32px;
    }

    .header h1 {
        font-size: 32px;
    }

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

    .container {
        padding: 0 16px;
    }
}
