* {
    box-sizing: border-box;
}

:root {
    --bg: #07090d;
    --panel: #0e1219;
    --panel-2: #121720;
    --border: rgba(255,255,255,.08);
    --text: #f4f6f8;
    --muted: #8d96a5;
    --red: #ef3340;
    --blue: #3b82f6;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% 25%, rgba(59,130,246,.08), transparent 32%),
        radial-gradient(circle at 80% 80%, rgba(239,51,64,.055), transparent 25%),
        var(--bg);
    color: var(--text);
    font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.ambient {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(120px);
    opacity: .12;
}

.ambient-one {
    background: var(--blue);
    top: -300px;
    left: 30%;
}

.ambient-two {
    background: var(--red);
    right: -350px;
    bottom: -300px;
}

.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 30px 34px;
}

.clock {
    font-size: clamp(36px, 4vw, 58px);
    font-weight: 300;
    letter-spacing: -2px;
    line-height: 1;
}

.date {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.settings {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #aeb6c3;
    border: 1px solid var(--border);
    background: rgba(15,18,24,.65);
    border-radius: 50%;
    transition: .2s ease;
}

.settings:hover {
    color: #fff;
    border-color: rgba(59,130,246,.5);
    transform: rotate(25deg);
}

.main {
    min-height: calc(100vh - 145px);
    display: flex;
    justify-content: center;
    padding: 20px 25px 70px;
}

.hero {
    width: min(1050px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c8ced8;
    font-size: 14px;
    letter-spacing: .8px;
    margin: 10px 0 25px;
}

.brand-mark {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--red), #b91c1c);
    box-shadow: 0 7px 24px rgba(239,51,64,.18);
}

.search-box {
    width: min(620px, 100%);
    height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(17,21,28,.88);
    box-shadow: 0 15px 45px rgba(0,0,0,.22);
    transition: .2s ease;
}

.search-box:focus-within {
    border-color: rgba(59,130,246,.5);
    box-shadow: 0 15px 45px rgba(0,0,0,.28),
                0 0 0 3px rgba(59,130,246,.07);
}

.search-icon {
    color: #8992a0;
    font-size: 27px;
    line-height: 1;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
}

.search-box input::placeholder {
    color: #687180;
}

.search-key {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #777f8d;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
}

.categories {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 25px;
}

.category {
    border: 1px solid var(--border);
    color: #8f98a7;
    background: rgba(15,18,24,.7);
    padding: 8px 13px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    transition: .2s ease;
}

.category:hover {
    color: #fff;
    border-color: rgba(255,255,255,.17);
}

.category.active {
    color: #fff;
    border-color: rgba(239,51,64,.45);
    background: rgba(239,51,64,.10);
}

.category-icon {
    margin-right: 5px;
    color: var(--category-color, #fff);
}

.access-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
}

.access {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 17px 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(
        145deg,
        rgba(17,21,28,.94),
        rgba(11,14,19,.92)
    );
    transition: transform .18s ease, border-color .18s ease,
                background .18s ease, box-shadow .18s ease;
}

.access:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,.35);
    background: #111620;
    box-shadow: 0 15px 35px rgba(0,0,0,.28);
}

.access-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: #181d26;
    border: 1px solid rgba(255,255,255,.07);
    margin-bottom: 13px;
}

.access-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 9px;
}

.access-name {
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.access-category {
    margin-top: 5px;
    color: #687180;
    font-size: 10px;
}

.loading,
.empty {
    width: 100%;
    padding: 40px;
    text-align: center;
    color: var(--muted);
}

.hidden {
    display: none !important;
}

.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #5d6675;
    font-size: 11px;
    background: linear-gradient(transparent, rgba(7,9,13,.9) 40%);
}

.footer-dot {
    color: var(--red);
}

@media (max-width: 600px) {
    .topbar {
        padding: 20px;
    }

    .main {
        padding: 10px 15px 65px;
    }

    .access-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .access {
        min-height: 120px;
        padding: 12px 7px;
    }

    .access-icon {
        width: 50px;
        height: 50px;
    }

    .access-icon img {
        width: 31px;
        height: 31px;
    }

    .access-name {
        font-size: 11px;
    }

    .access-category {
        display: none;
    }
}
