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

:root {
    --fg: #f4f4f5;
    --muted: #8d8d93;
    --dim: #5a5a60;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.26);
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Segoe UI Mono', Consolas, monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[hidden] {
    display: none !important;
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    background: #060607;
    color: var(--fg);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    cursor: url('https://assets.575.world/cursor.png'), auto;
}

a, button {
    color: inherit;
    font: inherit;
    cursor: url('https://assets.575.world/cursor.png'), pointer;
}

::selection {
    background: rgba(255, 255, 255, 0.85);
    color: #060607;
}

#bg-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: grayscale(1) brightness(1.05) contrast(1.04);
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(90% 80% at 14% 50%, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.14) 55%, rgba(0, 0, 0, 0.42) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0.62) 100%);
}

.spotlight {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(
        520px circle at var(--mx, 50%) var(--my, 38%),
        rgba(255, 255, 255, 0.07),
        transparent 68%
    );
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.shell {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1180px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 44px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 34px 0;
    animation: rise 0.8s var(--ease) both;
}

.wordmark {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--fg);
    transition: opacity 0.2s ease;
}

.wordmark:hover {
    opacity: 0.6;
}

.wordmark span {
    color: var(--dim);
}

#guild-slot {
    position: relative;
}

.guild-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px 7px 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.guild-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--line-strong);
}

.guild-badge-img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.guild-tooltip {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 330px;
    max-width: calc(100vw - 44px);
    background: rgba(9, 9, 10, 0.94);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s var(--ease);
    z-index: 60;
}

.guild-badge:hover + .guild-tooltip,
.guild-badge.open + .guild-tooltip,
.guild-tooltip:hover {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.guild-banner {
    display: block;
    width: 100%;
    height: 112px;
    object-fit: cover;
}

.guild-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 18px;
    margin-top: 16px;
}

.guild-banner:not([hidden]) + .guild-head {
    margin-top: -30px;
    position: relative;
    z-index: 2;
}

.guild-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.16);
    background: #0b0b0c;
}

.guild-meta {
    flex: 1;
    min-width: 0;
    padding-top: 6px;
}

.guild-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.guild-desc {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
}

.guild-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 18px 0;
}

.trait {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.guild-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
    border-top: 1px solid var(--line);
}

.guild-stats > div {
    padding: 12px 18px;
}

.guild-stats > div + div {
    border-left: 1px solid var(--line);
}

.guild-stats dt {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dim);
}

.guild-stats dd {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0 56px;
}

.hero {
    display: flex;
    align-items: center;
    gap: 44px;
    animation: rise 1s var(--ease) 0.06s both;
}

.avatar-wrap {
    position: relative;
    width: 168px;
    height: 168px;
    flex-shrink: 0;
}

.avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #101012;
}

.avatar-decoration {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: scale(1.2);
    pointer-events: none;
    image-rendering: pixelated;
}

.hero-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
}

.name {
    margin-top: 14px;
    font-size: clamp(3.2rem, 8.5vw, 7rem);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.handle {
    align-self: flex-start;
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.handle:hover {
    color: var(--fg);
    border-bottom-color: var(--line-strong);
}

.status-text {
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    min-height: 1.3em;
}

.activities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
    animation: rise 1s var(--ease) 0.12s both;
}

.activity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.activity-icon {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    object-fit: cover;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 21px;
}

.link {
    padding: 7px 0;
    color: var(--muted);
    font-size: 13px;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.link:hover {
    color: var(--fg);
    text-decoration-color: var(--line-strong);
}

.bottombar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 0;
    animation: rise 1s var(--ease) 0.22s both;
}

.views {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dim);
    font-variant-numeric: tabular-nums;
}

.views svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.views strong {
    font-weight: 600;
    color: var(--muted);
}

.player {
    display: flex;
    align-items: center;
    gap: 14px;
}

.play-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.07);
}

.play-button:active {
    transform: scale(0.96);
}

.play-button svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
}

.track {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.track-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.track-artist {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dim);
}

.equalizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
    margin-left: 6px;
}

.equalizer i {
    display: block;
    width: 3px;
    height: 100%;
    background: var(--dim);
    transform: scaleY(0.28);
    transform-origin: bottom;
    transition: transform 0.3s ease, background 0.3s ease;
}

.player.playing .equalizer i {
    background: var(--fg);
    animation: equalize 1s ease-in-out infinite;
}

.player.playing .equalizer i:nth-child(2) {
    animation-delay: 0.16s;
}

.player.playing .equalizer i:nth-child(3) {
    animation-delay: 0.34s;
}

.player.playing .equalizer i:nth-child(4) {
    animation-delay: 0.08s;
}

.error-page .stage {
    justify-content: center;
    padding: 24px 0;
}

.error-code {
    font-size: clamp(4rem, 14vw, 9rem);
    font-weight: 600;
    line-height: 0.85;
    letter-spacing: -0.05em;
}

.error-message {
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--dim);
}

.error-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-bottom: 4px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    transition: color 0.2s ease, border-color 0.2s ease, gap 0.3s var(--ease);
}

.error-link:hover {
    color: var(--fg);
    border-bottom-color: var(--line-strong);
    gap: 16px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes equalize {
    0%, 100% {
        transform: scaleY(0.22);
    }
    50% {
        transform: scaleY(1);
    }
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .avatar-wrap {
        width: 132px;
        height: 132px;
    }

    .name {
        font-size: clamp(2.9rem, 13vw, 4.6rem);
    }
}

@media (max-width: 560px) {
    .shell {
        padding: 0 22px;
    }

    .topbar,
    .bottombar {
        padding: 22px 0;
    }

    .avatar-wrap {
        width: 104px;
        height: 104px;
    }

    .bottombar {
        flex-wrap: wrap;
        row-gap: 18px;
    }

    .guild-tooltip {
        width: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
