:root {
    --bg: #0f1220;
    --card: #171a2b;
    --card-2: #1c2034;
    --text: #eef1ff;
    --muted: #a9b0c7;
    --brand: #6c7cff;
    --accent: #00d4ff;
    --good: #2bd576;
    --warn: #ffb020;
    --bad: #ff5d5d;
    --stroke: #262a40;
    --chip: #232843;
    --sidebar: #0d1020;
    --shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
    width: 0px;
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    background: linear-gradient(180deg, #0b0e1b 0%, #10142a 100%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

button {
    font: inherit
}

.app {
    display: grid;
    grid-template-columns: 1fr 300px;
    min-height: 100dvh;
}

.sidebar {
    background: #0b0e1b;
    border-left: 1px solid var(--stroke);
    padding: 20px 16px;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    margin-bottom: 14px;
}

.brand .logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    display: grid;
    place-items: center;
    color: #0d1020;
    font-weight: 800;
    box-shadow: var(--shadow)
}

.brand h1 {
    font-size: 18px;
    line-height: 20px;
    line-height: 1.2;
    margin: 0
}

.search {
    position: relative;
    margin: 8px 0 18px 0;
}

.search input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--stroke);
    color: var(--text);
    outline: none
}

.search .fa-magnifying-glass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted)
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 20px;
    margin-top: 8px
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    border: 1px solid transparent
}

.menu a .fa {
    width: 18px;
    text-align: center
}

.menu a.active {
    background: var(--chip);
    border-color: var(--stroke)
}

.menu a:hover {
    background: var(--card-2)
}

.filters {
    margin-top: 18px;
    border-top: 1px dashed var(--stroke);
    padding-top: 16px
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px
}

.chip {
    padding: 8px 12px;
    border-radius: 24px;
    background: var(--chip);
    color: var(--text);
    border: 1px solid var(--stroke);
    font-size: 13px;
    cursor: pointer;
    user-select: none
}

.chip.active {
    background: var(--brand)
}

.footer-note {
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5
}

.header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(16, 20, 42, .72);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--stroke)
}

.header a {
    display: block;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 16px
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px
}

.header-name {
    font-weight: 700;
    line-height: 20px;
}

.header-sub {
    font-size: 12px;
    line-height: 14px;
    color: var(--muted);
}

.header-title .mini-logo {
    width: 28px;
    height: 28px;
    line-height: 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    display: grid;
    place-items: center;
    color: #0d1020;
    font-weight: 800
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.icon-btn {
    border: 1px solid var(--stroke);
    background: var(--card);
    line-height: 20px;
    color: var(--text);
    padding: 10px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer
}

.icon-btn i {
    width: 14px;
    height: 16px;
}

.icon-btn:hover {
    background: var(--card-2)
}

.menu-toggle {
    display: none
}

.content {
    padding: 16px 16px 80px 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;
}

@media (min-width:520px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media (min-width:760px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media (min-width:980px) {
    .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }
}

@media (min-width:1300px) {
    .grid {
        grid-template-columns: repeat(5, minmax(0, 1fr))
    }
}

.card {
    cursor: pointer;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow)
}

.thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2d3356, #3a4275);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cfd6ff;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .3px
}

.thumb .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(13, 16, 32, .8);
    border: 1px solid var(--stroke);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px
}

.badge.good {
    border-color: rgba(43, 213, 118, .25);
    box-shadow: 0 0 0 1px rgba(43, 213, 118, .15) inset
}

.badge.warn {
    border-color: rgba(255, 176, 32, .25);
    box-shadow: 0 0 0 1px rgba(255, 176, 32, .15) inset
}

.badge.bad {
    border-color: rgba(255, 93, 93, .25);
    box-shadow: 0 0 0 1px rgba(255, 93, 93, .15) inset
}

.badge i {
    font-size: 12px
}

.meta {
    padding: 12px 12px 14px 12px
}

.title {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.tag {
    font-size: 12px;
    color: var(--muted);
    background: transparent;
    border: 1px dashed var(--stroke);
    padding: 6px 8px;
    border-radius: 999px
}

.about {
    margin-top: 28px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 18px
}

.about h2 {
    margin: 0 0 8px 0;
    font-size: 18px
}

.about p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7
}

@media (max-width: 900px) {
    .app {
        grid-template-columns: 1fr
    }

    .sidebar {
        position: fixed;
        right: 0;
        top: 0;
        height: 100dvh;
        width: 300px;
        transform: translateX(100%);
        transition: transform .25s ease;
        z-index: 20
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .scrim {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
        z-index: 15
    }

    .scrim.show {
        opacity: 1;
        pointer-events: auto
    }

    .menu-toggle {
        display: inline-flex
    }
}

.placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #e9edff;
    mix-blend: screen;
    text-transform: uppercase
}

.color-1 {
    background: linear-gradient(135deg, #6c7cff, #00d4ff)
}

.color-2 {
    background: linear-gradient(135deg, #ff7a7a, #ffd36e)
}

.color-3 {
    background: linear-gradient(135deg, #7affc6, #6ea8ff)
}

.color-4 {
    background: linear-gradient(135deg, #b07aff, #6efff5)
}

.color-5 {
    background: linear-gradient(135deg, #ffa6e7, #7ad7ff)
}

.color-6 {
    background: linear-gradient(135deg, #84ffa5, #ffe66e)
}

.color-7 {
    background: linear-gradient(135deg, #9aa4ff, #a4ffe9)
}

.color-8 {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4)
}

.color-9 {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb)
}

.color-10 {
    background: linear-gradient(135deg, #f6d365, #fda085)
}

.rating-good {
    color: var(--good)
}

.rating-warn {
    color: var(--warn)
}

.rating-bad {
    color: var(--bad)
}