:root {
    --bg: #07111c;
    --bg-deep: #040913;
    --surface: rgba(11, 24, 39, 0.9);
    --surface-strong: rgba(8, 18, 31, 0.98);
    --border: rgba(255, 255, 255, 0.14);
    --border-strong: rgba(255, 255, 255, 0.24);
    --text: #f3f7ff;
    --muted: #aec1db;
    --muted-strong: #d4deef;
    --gold: #f4d271;
    --teal: #64d9d2;
    --lime: #95eb9f;
    --rose: #ff927f;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
    font-family: "Zalando Sans Expanded", sans-serif;
    user-select: none;
}

html {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(100, 217, 210, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(244, 210, 113, 0.14), transparent 24%),
        linear-gradient(180deg, #0a1524 0%, var(--bg) 38%, var(--bg-deep) 100%);
}

body {
    margin: 0;
    min-height: 100dvh;
    color: var(--text);
    background:
        radial-gradient(circle at 14% 16%, rgba(100, 217, 210, 0.16), transparent 25%),
        radial-gradient(circle at 84% 14%, rgba(244, 210, 113, 0.14), transparent 22%),
        radial-gradient(circle at 50% 110%, rgba(255, 146, 127, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(6, 14, 24, 0.96), rgba(4, 9, 19, 1));
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

.page-orbit,
.page-grid {
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
}

.page-orbit {
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.42;
}

.orbit-one {
    top: -12rem;
    left: -12rem;
    background: rgba(100, 217, 210, 0.22);
}

.orbit-two {
    right: -10rem;
    bottom: -12rem;
    background: rgba(255, 146, 127, 0.18);
}

.page-grid {
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 84px 84px;
    opacity: 0.22;
}

.nav,
.discovery-page,
footer {
    position: relative;
    z-index: 1;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
}

.logo-mark {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    margin-left: 0;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-links .btn {
    text-align: center;
    display: inline-block;
    min-width: 120px;
    padding: 0.75rem 1.25rem;
    margin: 0;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    transition: none;
}

.nav-links .btn:hover {
    transform: none;
    opacity: 0.8;
    border-color: transparent;
    background: transparent;
    outline: #f3f4f6 2px solid;
    animation: bold 0.3s forwards;
}

.nav-links .btn:active {
    transform: none;
    animation: click 0.5s ease;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.78rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text);
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.94rem;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.06);
}

.btn:active {
    transform: translateY(0);
}

.primary {
    border-color: rgba(244, 210, 113, 0.3);
    background: linear-gradient(135deg, rgba(244, 210, 113, 0.9), rgba(255, 166, 122, 0.9));
    color: #191005;
}

.primary:hover {
    border-color: rgba(244, 210, 113, 0.6);
    background: linear-gradient(135deg, #f6dd8d, #ffb989);
}

.secondary {
    border-color: rgba(100, 217, 210, 0.44);
    color: var(--teal);
    background: rgba(100, 217, 210, 0.08);
}

.secondary:hover {
    background: rgba(100, 217, 210, 0.14);
}

.auth-user {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.auth-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    background-size: cover;
    background-position: center;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-name {
    font-size: 0.9rem;
    white-space: nowrap;
}

.auth-logout {
    margin: 0;
}

.nav-links .auth-logout-btn {
    min-width: auto;
    padding: 0.55rem 0.9rem;
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text);
}

.hidden {
    display: none;
}

.discovery-page {
    width: min(1580px, 100%);
    margin: 0 auto;
    padding: 1rem 1.4rem 3.5rem;
}

.directory-page {
    border: 1px solid var(--border);
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%),
        var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.directory-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1rem;
    align-items: end;
}

.eyebrow {
    width: fit-content;
    margin: 0 0 1rem;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(244, 210, 113, 0.32);
    background: rgba(244, 210, 113, 0.08);
    color: var(--gold);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p,
dl,
dt,
dd {
    margin-top: 0;
}

h1 {
    max-width: 14ch;
    margin-bottom: 1rem;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 0.96;
    font-weight: 800;
}

h2 {
    margin-bottom: 0.65rem;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    line-height: 1.08;
    font-weight: 800;
}

h3 {
    margin-bottom: 0.4rem;
    font-size: 1.5rem;
    line-height: 1.12;
    font-weight: 800;
}

.directory-copy,
.results-summary,
.profile-description {
    color: var(--muted);
}

.directory-copy {
    max-width: 62ch;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 0;
}

.stat-item {
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.stat-item dt {
    margin-bottom: 0.42rem;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-item dd {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
}

.toolbar-shell {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.field {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.field span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-field {
    flex: 1 1 320px;
}

.sort-field {
    min-width: 220px;
}

.search-field input,
.sort-field select {
    width: 100%;
    min-height: 56px;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 14, 24, 0.92);
    color: var(--text);
    font-size: 0.95rem;
}

.search-field input::placeholder {
    color: #8496b0;
}

.search-field input:focus,
.sort-field select:focus {
    outline: 2px solid rgba(100, 217, 210, 0.24);
    border-color: rgba(100, 217, 210, 0.44);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.filter-chip {
    min-height: 56px;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted-strong);
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.filter-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.24);
}

.filter-chip.is-active {
    border-color: rgba(100, 217, 210, 0.36);
    background: rgba(100, 217, 210, 0.14);
    color: var(--teal);
}

.results-summary {
    margin: 1rem 0 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
    gap: 1.35rem;
    margin-top: 1.15rem;
}

.discovery-card,
.empty-state {
    border: 1px solid var(--border);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
        var(--surface-strong);
}

.discovery-card {
    overflow: hidden;
    animation: discovery-rise 0.45s ease both;
}

.discovery-card__preview {
    position: relative;
    min-height: 420px;
    padding: 1.1rem;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--preview-color), white 18%), transparent 36%),
        linear-gradient(180deg, rgba(11, 24, 39, 0.12), rgba(6, 13, 24, 0.92));
}

.preview-cover,
.preview-scrim,
.preview-fallback {
    position: absolute;
    inset: 0;
}

.preview-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-scrim {
    background:
        linear-gradient(180deg, rgba(7, 16, 27, 0.04), rgba(4, 10, 18, 0.78)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 32%);
}

.preview-fallback {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 34%),
        linear-gradient(135deg, rgba(100, 217, 210, 0.14), rgba(244, 210, 113, 0.1), rgba(255, 146, 127, 0.12));
}

.preview-mini-card {
    --card-opacity: 0.9;
    position: relative;
    z-index: 1;
    width: min(100%, 450px);
    min-height: 100%;
    margin-left: auto;
    border-radius: 28px;
    border: 2px solid color-mix(in srgb, var(--preview-color), white 34%);
    background: rgba(7, 17, 29, var(--card-opacity));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46);
    padding: 1.45rem 1.2rem 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(14px);
}

.preview-avatar-wrap {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--preview-color), rgba(255, 255, 255, 0.88));
}

.preview-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(6, 12, 20, 0.92);
}

.preview-handle {
    margin: 0.9rem 0 0;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    word-break: break-word;
}

.preview-description {
    margin: 0.5rem 0 0;
    color: var(--muted-strong);
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: center;
    max-width: 28ch;
}

.preview-platforms {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 1.25rem;
}

.preview-platform {
    width: 100%;
    max-width: 74px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    display: grid;
    place-items: center;
    justify-self: center;
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

a.preview-platform:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.18);
    border-color: color-mix(in srgb, var(--preview-color), white 25%);
}

a.preview-platform:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--preview-color), white 35%);
    outline-offset: 3px;
}

a.preview-platform:active {
    transform: translateY(0);
}

.preview-platform img {
    width: 24px;
    height: 24px;
}

.preview-footer {
    width: 100%;
    margin-top: 1.05rem;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.discovery-card__meta {
    padding: 1.25rem 1.25rem 1.35rem;
}

.badge-row,
.metric-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted-strong);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge.is-premium {
    border-color: rgba(244, 210, 113, 0.32);
    background: rgba(244, 210, 113, 0.12);
    color: var(--gold);
}

.badge.is-fresh {
    border-color: rgba(149, 235, 159, 0.3);
    background: rgba(149, 235, 159, 0.12);
    color: var(--lime);
}

.identity-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-top: 0.95rem;
}

.identity-row a {
    color: inherit;
    text-decoration: none;
}

.profile-link {
    min-width: auto;
    padding: 0.68rem 0.95rem;
    font-size: 0.83rem;
}

.profile-description {
    margin: 0.95rem 0 0;
    line-height: 1.58;
}

.metric-row {
    margin-top: 1rem;
    color: var(--muted-strong);
    font-size: 0.82rem;
}

.metric-pill {
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.empty-state {
    margin-top: 1.15rem;
    padding: 1.8rem;
    text-align: center;
}

.empty-state__eyebrow {
    color: var(--gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.empty-state p:last-of-type {
    margin-bottom: 1.2rem;
    color: var(--muted);
}

.skeleton {
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: shimmer 1.4s linear infinite;
}

.results-grid .skeleton {
    min-height: 640px;
}

footer {
    text-align: center;
    padding: 1.4rem;
    color: var(--muted);
    font-size: 0.84rem;
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}

@keyframes bold {
    0% {
        font-weight: 400;
    }

    100% {
        font-weight: 600;
    }
}

@keyframes click {
    20% {
        transform: translateY(5px) translateX(5px);
    }
}

@keyframes discovery-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1240px) {
    .directory-intro {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .nav {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .toolbar-shell {
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-chip {
        flex: 1 1 180px;
    }

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

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

    .nav-links {
        gap: 0.55rem;
    }

    .nav-links .btn {
        width: 100%;
        min-width: 0;
    }

    .auth-user {
        width: 100%;
        flex-wrap: wrap;
    }

    .discovery-page {
        padding-inline: 1rem;
    }

    .directory-page {
        border-radius: 24px;
        padding: 1rem;
    }

    h1 {
        font-size: 2.35rem;
    }

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

    .discovery-card,
    .empty-state {
        border-radius: 22px;
    }

    .discovery-card__preview {
        min-height: 310px;
        padding: 0.85rem;
    }

    .preview-mini-card {
        width: 100%;
        min-height: 100%;
        padding: 1rem 0.85rem 0.85rem;
        border-radius: 22px;
    }

    .preview-avatar-wrap {
        width: 82px;
        height: 82px;
    }

    .preview-platform {
        max-width: 58px;
    }

    .preview-platform img {
        width: 20px;
        height: 20px;
    }

    .identity-row {
        flex-direction: column;
    }

    .profile-link {
        width: 100%;
    }
}
