body, html {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100%;
    font-family: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

button, input, select, textarea {
    font: inherit;
}

nav.nav {
    width: 100vw;
    height: 50px;
    padding: 8px;
    margin-top: 0;
    position: absolute;
    top: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    z-index: 324897;
}

nav.nav div {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

nav.nav div button {
    background: var(--bg-3);
    border-radius: 100px;
    padding: 8px;
    border: none;
    transition: 0.15s;
    color: var(--text);
    width: 40px;
    height: 40px;
}

nav.nav div button:hover {
    scale: 1.05;
    background: var(--bg-4);
    cursor: pointer;
}

nav.nav button i {
    color: var(--text);
}

nav.nav .right {
    margin-left: auto;
}

.homecontent {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: min(500px, calc(100% - 40px));
    margin: 0;
    transform: translate(-50%, -50%);
}

.homecontent h1 {
    margin: 0 0 18px;
    color: var(--text-bright);
    font-size: clamp(2.25rem, 5vw, 3.125rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    text-align: center;
}

.search-shell {
    --bg-x: 100px;
    --bg-y: -126px;
    --glow-opacity: 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 6px 10px 6px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    isolation: isolate;
}

.search-light-border,
.search-light-inset,
.search-light {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.search-light-border,
.search-light {
    background-position: var(--bg-x) var(--bg-y);
    background-repeat: no-repeat;
    background-size: 300px 300px;
    opacity: var(--glow-opacity);
    transition: opacity 120ms linear, filter 400ms ease, transform 400ms ease;
    will-change: background-position, opacity, filter;
}

.search-light-border {
    z-index: 1;
    background-image: radial-gradient(
        circle at center,
        rgba(238, 238, 238, 0.92) 0%,
        rgba(211, 211, 211, 0.46) 28%,
        rgba(190, 190, 190, 0.12) 50%,
        rgba(190, 190, 190, 0) 70%
    );
    filter: blur(3px) drop-shadow(0 0 7px rgba(255, 255, 255, 0.18));
}

.search-light-inset {
    z-index: 2;
    inset: 0.8px;
    background: #080808;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.022), 0 12px 32px rgba(0, 0, 0, 0.42);
    transition: background-color 100ms ease;
}

.search-light {
    z-index: 5;
    background-image: radial-gradient(
        circle at center,
        rgba(235, 235, 235, 0.17) 0%,
        rgba(211, 211, 211, 0.07) 38%,
        rgba(211, 211, 211, 0) 68%
    );
    filter: blur(14px);
}

.search-shell:focus-within .search-light-inset {
    background: #0d0d0d;
}

.search-icon {
    position: relative;
    z-index: 4;
    display: grid;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--accent-muted);
    font-size: 0.86rem;
    transition: color 180ms ease, transform 180ms ease;
}

.search-shell:focus-within .search-icon {
    color: var(--text-bright);
    transform: scale(1.06);
}

.search-shell input {
    position: relative;
    z-index: 4;
    min-width: 0;
    flex: 1;
    padding: 5px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-bright);
    caret-color: var(--text-bright);
    font-size: 0.98rem;
    line-height: 1.4;
}

.search-shell input::placeholder {
    color: var(--accent-muted);
    opacity: 1;
}

.search-shell input::-webkit-search-cancel-button {
    appearance: none;
    -webkit-appearance: none;
    display: none;
}

.search-key {
    position: relative;
    z-index: 4;
    flex: 0 0 auto;
    padding: 6px 8px 7px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-2);
    color: var(--accent-muted);
    font-size: 0.68rem;
    line-height: 1;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    transition: color 180ms ease, border-color 180ms ease;
}

.search-shell:focus-within .search-key {
    border-color: var(--border-2);
    color: var(--accent-2);
}

.home-shortcuts {
    width: 100%;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 6px;
}

.home-shortcut {
    display: flex;
    box-sizing: border-box;
    width: 65px;
    height: 75px;
    padding: 12px 4px 10px;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 12px;
    background: #070707;
    text-decoration: none;
    transition: background-color 150ms ease;
    justify-content: center;
}

.home-shortcut-icon {
    width: 22px;
    height: 22px;
    background: transparent;
    object-fit: contain;
    transition: transform 150ms ease;
    border-radius: 5px;
}

.home-shortcut-label {
    display: block;
    width: 100%;
    color: var(--accent-2);
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 150ms ease;
}

.home-shortcut:hover,
.home-shortcut:focus-visible {
    background: #0d0d0d;
    outline: none;
}

.home-shortcut:hover .home-shortcut-icon,
.home-shortcut:focus-visible .home-shortcut-icon {
    transform: scale(1.06);
}

.home-shortcut:hover .home-shortcut-label,
.home-shortcut:focus-visible .home-shortcut-label {
    color: var(--accent-2);
}

@media (max-width: 540px) {
    .homecontent {
        width: min(100% - 32px, 500px);
    }

    .search-shell {
        min-height: 48px;
        padding-left: 15px;
        border-radius: 999px;
    }

    .search-key {
        display: none;
    }

    .home-shortcuts {
        gap: 5px;
    }

    .home-shortcut {
        width: 48px;
        padding: 11px 4px 9px;
        gap: 8px;
        border-radius: 11px;
    }

    .home-shortcut-icon {
        width: 20px;
        height: 20px;
    }

    .home-shortcut-label {
        font-size: 0.57rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .search-light-border,
    .search-light-inset,
    .search-light,
    .search-icon,
    .search-key,
    .home-shortcut,
    .home-shortcut-icon {
        transition: none;
    }
}

.grid {
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(white 10%, transparent);
    position: fixed;
    width: 100%;
    height: 100vh;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-size: 10px 10px;
}
