:root {
    --bg: #0a0a0b;
    --panel: #151517;
    --outline: #343436;
    --accent: #d7afb1;
    --accent-dark: #9c6e70;
    --text: #b8b8bd;
    --text-active: #e4e4e7;
    --text-muted: #86868b;
}

* {
    box-sizing: border-box;
    user-select: none;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:visited {
    color: var(--accent);
}

button {
    appearance: none;
    -webkit-appearance: none;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.01em;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    display: grid;
    place-items: center;
}

.page-cover {
    position: fixed;
    z-index: 0;
    inset: -18vh -18vw;
    opacity: 0;
    pointer-events: none;
    filter: blur(14px);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: perspective(1200px) translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0) rotateX(var(--parallax-rx, 0deg)) rotateY(var(--parallax-ry, 0deg)) rotateZ(var(--parallax-rz, 0deg)) scale(1.08);
    transform-style: preserve-3d;
    will-change: transform;
}

body.entered .page-cover[data-active="true"] {
    opacity: 1;
}

.page-cover-shade {
    position: fixed;
    z-index: 0;
    inset: 0;
    background: linear-gradient(180deg, rgb(7 8 13 / 60%) 0%, rgb(7 8 13 / 70%) 58%, rgb(7 8 13 / 92%) 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 800ms ease;
}

body.entered .page-cover-shade {
    opacity: 1;
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.enter,
.content {
    grid-area: 1 / 1;
}

.enter {
    position: relative;
    z-index: 1;
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.4s ease;
}

.enter:hover {
    color: var(--accent);
}

.enter.leaving {
    opacity: 0;
    pointer-events: none;
}

.enter.hidden {
    display: none;
}

.content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

.content.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.title {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--accent);
}

.title .wave-char {
    display: inline-block;
    animation: wave 2.2s ease-in-out infinite;
    animation-delay: var(--wave-delay, 0s);
    text-shadow: 0 0 30px color-mix(in srgb, currentColor 52%, transparent), 0 0 62px color-mix(in srgb, currentColor 28%, transparent);
}

@keyframes wave {
    0%, 100% {
        color: var(--accent);
    }
    50% {
        color: var(--accent-dark);
    }
}

.links {
    margin: 10px 0 0;
    font-size: 0.95rem;
}

.links a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.links a:hover {
    color: var(--text-active);
}

.divider {
    margin: 0 8px;
    color: var(--text-muted);
}

.music-player {
    position: fixed;
    z-index: 3;
    bottom: 48px;
    left: 50%;
    display: grid;
    width: min(360px, calc(100vw - 32px));
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 13px;
    background: rgb(10 11 16 / 62%);
    backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity 700ms ease, transform 700ms ease;
}

body.entered .music-player {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.music-player__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.music-player__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.music-player__details {
    display: grid;
    min-width: 0;
    gap: 1px;
    text-align: left;
}

.music-player__details strong,
.music-player__details span {
    display: block;
}

.music-player__title-window,
.music-player__artist-window {
    overflow: visible;
}

.music-player__title-window {
    height: 21px;
    line-height: 21px;
}

.music-player__artist-window {
    height: 18px;
    line-height: 18px;
}

.music-player__title-track,
.music-player__artist-track {
    display: flex;
    flex-direction: column;
}

.music-player__title-track > span,
.music-player__artist-track > span {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#player-next-title,
#player-next-artist {
    display: none;
}

.music-player__details.is-scrolling #player-next-title,
.music-player__details.is-scrolling #player-next-artist {
    display: block;
}

.music-player__title-track > span {
    line-height: 21px;
}

.music-player__artist-track > span {
    line-height: 18px;
}

.music-player__details strong {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.music-player__details > span {
    color: rgb(255 255 255 / 70%);
    font-size: 11px;
}

.music-player__progress {
    display: block;
    width: 100%;
    height: 3px;
    overflow: hidden;
    border: 0;
    border-radius: 99px;
    background: rgb(255 255 255 / 19%);
    color: var(--accent);
    accent-color: var(--accent);
}

.music-player__progress::-webkit-progress-bar {
    border-radius: inherit;
    background: rgb(255 255 255 / 19%);
}

.music-player__progress::-webkit-progress-value {
    border-radius: inherit;
    background: var(--accent);
}

.music-player__progress::-moz-progress-bar {
    border-radius: inherit;
    background: var(--accent);
}

.music-player__toggle {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: #f4f4f6;
    color: #17171b;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}

.music-player__skip {
    display: grid;
    width: 28px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgb(255 255 255 / 70%);
    cursor: pointer;
    transition: color 150ms ease;
}

.music-player__skip:hover { color: #fff; }
.music-player__skip svg { width: 18px; height: 18px; fill: currentColor; }

.music-player__volume {
    position: relative;
    width: 32px;
    height: 32px;
    color: rgb(255 255 255 / 62%);
}

.music-player__volume-toggle {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    display: grid;
    width: 30px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.music-player__volume-toggle:hover {
    color: #fff;
}

.music-player__volume-toggle svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.music-player__volume-popover {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 0;
    display: flex;
    width: 32px;
    height: 32px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 38px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    transition: height 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.music-player__volume.is-open .music-player__volume-popover {
    height: 144px;
    border-color: var(--outline);
    background: #101012;
}

.music-player__volume input {
    position: absolute;
    top: calc(50% - 7px);
    left: 50%;
    width: 88px;
    height: 12px;
    margin: 0;
    appearance: none;
    background: transparent;
    outline: none;
    cursor: pointer;
    transform: translate(-50%, -50%) rotate(-90deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.music-player__volume.is-open input {
    opacity: 1;
    pointer-events: auto;
}

.music-player__volume input::-webkit-slider-thumb {
    width: 6px;
    height: 6px;
    appearance: none;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 62%);
}

.music-player__volume input::-webkit-slider-runnable-track {
    width: 88px;
    height: 3px;
    border: 0;
    border-radius: 99px;
    background: var(--outline);
}

.music-player__volume input::-moz-range-thumb {
    width: 6px;
    height: 6px;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 62%);
}

.music-player__volume input::-moz-range-track {
    height: 3px;
    border: 0;
    border-radius: 99px;
    background: var(--outline);
}

.music-player__toggle:hover {
    transform: scale(1.05);
    background: #fff;
}

.music-player__toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.music-player__toggle .pause-icon { display: none; }
.music-player__toggle[aria-pressed="true"] .play-icon { display: none; }
.music-player__toggle[aria-pressed="true"] .pause-icon { display: block; }
.auth-card {
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    text-align: center;
}

.auth-card .title {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.auth-card .fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-card input {
    background: var(--panel);
    border: 1px solid var(--outline);
    border-radius: 8px;
    color: var(--text-active);
    font-family: inherit;
    font-size: 14px;
    padding: 7px 12px;
    width: 100%;
    transition: border-color 0.2s ease;
}

.auth-card input::placeholder {
    color: var(--text-muted);
}

.auth-card input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-card .submit {
    background: var(--panel);
    border: 1px solid var(--outline);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 0.02em;
    padding: 7px 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.auth-card .submit:hover {
    border-color: var(--accent);
    color: var(--text-active);
}

.auth-card .error {
    color: var(--accent);
    font-size: 0.85rem;
    min-height: 1em;
    display: none;
}

.auth-card .error.visible {
    display: block;
}

.auth-card .switch {
    margin: 0;
    font-size: 0.9rem;
}

.site-footer {
    position: fixed;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 700ms ease;
}

body.entered .site-footer {
    opacity: 1;
    pointer-events: auto;
}

.site-footer a {
    color: var(--text-muted);
}

.site-footer a:hover {
    color: var(--accent);
}

.site-footer .dot {
    margin: 0 6px;
}

.text-card {
    width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.text-card .title {
    font-size: 1.6rem;
    margin-bottom: 14px;
    text-align: center;
}

.text-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.panel-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.panel-box {
    position: relative;
    width: 320px;
    border: 1px solid var(--outline);
    border-radius: 10px;
    padding: 22px 20px 14px;
}

.panel-legend {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg);
    padding: 0 10px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.panel-welcome {
    margin: 0 0 14px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text);
}

.panel-welcome span {
    color: var(--text-active);
    font-weight: 700;
}

.panel-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--outline);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.panel-row > span:first-child {
    white-space: nowrap;
}

.panel-row:first-child {
    border-top: none;
}

.panel-value {
    color: var(--text-active);
}

.dash-token-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.dash-discord-row {
    align-items: flex-start;
}

.dash-discord-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-discord-label {
    color: var(--text-muted);
}

.dash-discord {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-discord-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--outline);
}

.dash-discord-avatar.linked {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--outline);
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dash-discord-names {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.dash-discord-username {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dash-discord-username.linked {
    color: var(--text-active);
    font-weight: 700;
}

.dash-discord-handle {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dash-input {
    background: var(--bg);
    border: 1px solid var(--outline);
    border-radius: 6px;
    color: var(--text-active);
    font-family: inherit;
    font-size: 0.85rem;
    padding: 4px 10px;
    width: 140px;
}

.dash-input:focus {
    outline: none;
    border-color: var(--accent);
}

.panel-row a {
    color: var(--accent);
}

.panel-row a:hover {
    color: var(--text-active);
}

.panel-logout {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.panel-logout:hover {
    color: var(--accent);
}

body.dashboard {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100%;
}

.dash-shell {
    display: flex;
    min-height: 100vh;
}

.dash-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--outline);
    display: flex;
    flex-direction: column;
    padding: 24px 16px 12px;
}

.dash-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent);
    margin-bottom: 28px;
    padding: 0 6px;
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-nav-item,
.dash-nav-item:visited {
    appearance: none;
    background: none;
    border: none;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.dash-nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dash-nav-item:hover {
    color: var(--text-active);
}

.dash-nav-item.active {
    background: var(--outline);
    color: var(--text-active);
}

.dash-nav-secondary {
    margin-top: auto;
    padding-bottom: 14px;
}

.dash-nav-link,
.dash-nav-link:visited {
    font-weight: 600;
    color: var(--text-muted);
}

.dash-nav-link:hover {
    color: var(--text-active);
}

.dash-user {
    margin-left: -16px;
    margin-right: -16px;
    padding: 14px 16px 0;
    border-top: 1px solid var(--outline);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--outline);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.dash-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dash-user-info span {
    color: var(--text-active);
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-user-info a {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dash-user-info a:hover {
    color: var(--accent);
}

.dash-main {
    flex: 1;
    padding: 36px 48px 60px;
    display: flex;
    flex-direction: column;
}

.dash-topbar {
    width: 100%;
    border-bottom: 1px solid var(--outline);
    padding-bottom: 18px;
    margin-bottom: 32px;
}

.dash-content {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-topbar h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-active);
    text-transform: capitalize;
}

.dash-panel {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dash-panel[hidden] {
    display: none;
}

.dash-section-title {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-active);
}

.dash-section-sub {
    margin: 0 0 18px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dash-profile-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 10px;
}

.dash-profile-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-active);
}

.dash-profile-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dash-card {
    width: 100%;
    border: 1px solid var(--outline);
    border-radius: 10px;
    padding: 16px 22px;
}

.dash-card-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.dash-card + .dash-card,
.dash-card-actions + .dash-card {
    margin-top: 16px;
}

.dash-btn,
.dash-btn:visited {
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
    background: none;
    border: none;
    outline: none;
    padding: 0;
    font-size: 0.85rem;
    color: var(--accent);
    transition: color 0.2s ease;
}

.dash-btn:hover {
    color: var(--text-active);
}

.dash-btn-primary,
.dash-btn-primary:visited {
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 7px;
    outline: none;
    padding: 3px 14px;
    color: var(--bg);
    font-weight: 700;
}

.dash-btn-primary:hover {
    background: var(--text-active);
    border-color: var(--text-active);
    color: var(--bg);
}

.dash-store {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.dash-store-item {
    width: 160px;
    border: 1px solid var(--outline);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.dash-store-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--text-active);
}

.dash-price {
    margin: 0 0 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dash-divider {
    border-top: 1px solid var(--outline);
    margin: 14px 0;
}

.dash-invite-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-invite-list .panel-row {
    border-top: none;
}

.dash-changelog {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-changelog li {
    padding: 10px 0;
}

.dash-changelog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.dash-changelog-version {
    font-weight: 700;
    color: var(--text-active);
    font-size: 0.9rem;
}

.dash-changelog-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dash-changelog p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text);
}

.dash-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 12px);
    background: var(--panel);
    border: 1px solid var(--outline);
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.85rem;
    color: var(--text-active);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.dash-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.dash-invite-code {
    font-family: monospace;
    letter-spacing: 0.03em;
    color: var(--text-active);
}
