/* ==========================================================================
   mOntey biolink - fazerp.eu/mOntey
   Ciemny, monochromatyczny styl z lodowym akcentem. Bez zewnetrznych
   bibliotek: fonty z /assets/fonts, ikony jako inline SVG.
   Ciezkie rzeczy (wideo, muzyka, animowany awatar) laduja sie dopiero
   po kliknieciu "wejdz".
   ========================================================================== */

@font-face {
    font-family: 'Sora';
    src: url('/assets/fonts/sora-latin.woff2') format('woff2');
    font-weight: 100 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Sora';
    src: url('/assets/fonts/sora-latin-ext.woff2') format('woff2');
    font-weight: 100 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Clash Grotesk';
    src: url('/assets/fonts/clash-grotesk.woff2') format('woff2');
    font-weight: 200 700;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --bg: #050506;
    --card: rgba(14, 14, 17, 0.58);
    --line: rgba(255, 255, 255, 0.07);
    --line-2: rgba(255, 255, 255, 0.12);
    --text: #f4f4f5;
    --text-2: #a1a1aa;
    --text-3: #7a7a86;
    --ice: #9be7ff;
    --ice-rgb: 155, 231, 255;
    --ok: #3ddc84;
    --idle: #f5b84a;
    --dnd: #f2545b;
    --font: 'Sora', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Clash Grotesk', 'Sora', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Mono', ui-monospace, Consolas, monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg);
    color: var(--text);
    font: 400 14px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.is-locked {
    overflow: hidden;
}

h1,
p {
    margin: 0;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

img {
    display: block;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--ice);
    outline-offset: 3px;
    border-radius: 8px;
}

::selection {
    background: rgba(var(--ice-rgb), 0.3);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ---------- Tlo ---------- */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: grayscale(.35) brightness(.55) contrast(1.1);
    transform: scale(1.04);
    transition: opacity 2.4s var(--ease);
}

.bg-video.is-ready {
    opacity: .26;
}

.bg-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 640px;
    height: 640px;
    margin: -320px 0 0 -320px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--ice-rgb), 0.07), transparent);
    opacity: 0;
    transition: opacity .6s;
    will-change: transform;
}

.bg-glow.is-on {
    opacity: 1;
}

.bg-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60rem 40rem at 50% 0%, rgba(var(--ice-rgb), 0.05), transparent 60%),
        radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.82) 100%);
}

.bg-grain {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    opacity: .055;
    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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -3%); }
    60% { transform: translate(-2%, -1%); }
    80% { transform: translate(3%, 3%); }
    100% { transform: translate(0, 0); }
}

/* ---------- Ekran wejscia ---------- */
.enter {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    background: rgba(3, 3, 4, 0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: opacity .9s var(--ease), visibility .9s;
}

.enter.is-gone {
    opacity: 0;
    visibility: hidden;
}

.enter-text {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.4vw, 24px);
    font-weight: 500;
    letter-spacing: .32em;
    text-transform: lowercase;
    color: var(--text);
    padding-left: .32em;
    animation: breathe 2.8s ease-in-out infinite;
}

.enter-hint {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--text-3);
}

@keyframes breathe {
    50% { opacity: .45; }
}

/* ---------- Odtwarzacz + wyswietlenia ---------- */
.player,
.views {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 14px 0 5px;
    border-radius: 999px;
    background: rgba(12, 12, 15, 0.62);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--text-2);
    font-size: 12px;
    animation: fade-in .8s var(--ease) both;
}

.player {
    left: max(16px, env(safe-area-inset-left));
}

.views {
    right: max(16px, env(safe-area-inset-right));
    padding: 0 14px;
    gap: 8px;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.views svg {
    width: 16px;
    height: 16px;
}

.player-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--text);
    color: #050506;
    transition: transform .2s var(--ease), background-color .2s;
}

.player-btn:hover {
    transform: scale(1.06);
    background: #fff;
}

.player-btn .ic {
    width: 16px;
    height: 16px;
}

.player-btn .ic-play,
.player.is-paused .player-btn .ic-pause {
    display: none;
}

.player.is-paused .player-btn .ic-play {
    display: block;
}

.eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.eq i {
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: var(--ice);
    transform-origin: bottom;
    animation: eq 1s ease-in-out infinite;
}

.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
.eq i:nth-child(4) { animation-delay: -.15s; }

.player.is-paused .eq i {
    animation-play-state: paused;
    transform: scaleY(.25);
    background: var(--text-3);
}

@keyframes eq {
    0%, 100% { transform: scaleY(.3); }
    50% { transform: scaleY(1); }
}

.volume {
    display: flex;
    width: 0;
    overflow: hidden;
    transition: width .35s var(--ease);
}

.player:hover .volume,
.player:focus-within .volume {
    width: 84px;
}

.volume input {
    width: 80px;
    margin: 0 2px;
    accent-color: var(--ice);
    cursor: pointer;
}

/* ---------- Uklad ---------- */
.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 100vh;
    min-height: 100svh;
    padding: 84px 16px 32px;
}

.card {
    --mx: 50%;
    --my: 0%;
    position: relative;
    width: min(440px, 100%);
    padding: 30px 26px 24px;
    border-radius: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 40px 120px -40px rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    backdrop-filter: blur(22px) saturate(120%);
    transform-style: preserve-3d;
    transition: transform .5s var(--ease);
}

/* swiatlo podazajace za kursorem: tlo + obramowanie */
.card::before,
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity .4s;
}

.card::before {
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.05), transparent 45%);
}

.card::after {
    padding: 1px;
    background: radial-gradient(260px circle at var(--mx) var(--my), rgba(var(--ice-rgb), 0.55), transparent 50%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.card:hover::before,
.card:hover::after {
    opacity: 1;
}

/* wejscie elementow po kliknieciu */
.is-entered .card > *,
.is-entered .foot {
    animation: rise .9s var(--ease) both;
}

.is-entered .card > :nth-child(2) { animation-delay: .08s; }
.is-entered .card > :nth-child(3) { animation-delay: .14s; }
.is-entered .card > :nth-child(4) { animation-delay: .2s; }
.is-entered .foot { animation-delay: .3s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
}

@keyframes fade-in {
    from { opacity: 0; }
}

/* ---------- Profil ---------- */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avatar {
    position: relative;
    width: 112px;
    height: 112px;
    margin-bottom: 18px;
}

.avatar::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(var(--ice-rgb), 0.9), rgba(255, 255, 255, 0.05) 30%, rgba(var(--ice-rgb), 0.5) 55%, rgba(255, 255, 255, 0.05) 80%, rgba(var(--ice-rgb), 0.9));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
    animation: spin 8s linear infinite;
}

.avatar-img {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    background: #111114;
}

.avatar-deco {
    position: absolute;
    inset: -14%;
    width: 128%;
    height: 128%;
    max-width: none;
    pointer-events: none;
}

.avatar-status {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 4px solid #0d0d10;
    background: var(--text-3);
}

[data-status="online"] .avatar-status { background: var(--ok); }
[data-status="idle"] .avatar-status { background: var(--idle); }
[data-status="dnd"] .avatar-status { background: var(--dnd); }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}

.name-text {
    background: linear-gradient(100deg, #fff 0%, #fff 40%, rgba(var(--ice-rgb), 1) 50%, #fff 60%, #fff 100%) 0 0 / 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 6s var(--ease) infinite;
}

@keyframes shimmer {
    0%, 30% { background-position: 100% 0; }
    70%, 100% { background-position: 0% 0; }
}

.guild-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px 3px 5px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line-2);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--text);
    -webkit-text-fill-color: currentColor;
}

.guild-tag img {
    width: 14px;
    height: 14px;
}

.handle {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-3);
}

.tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 22px;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-2);
}

.prompt {
    color: var(--ice);
}

.caret {
    width: 7px;
    height: 15px;
    margin-left: -2px;
    background: var(--ice);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.badges {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
}

.badge {
    position: relative;
    display: grid;
    place-items: center;
    height: 28px;
    min-width: 30px;
    padding: 0 4px;
    border-radius: 8px;
    transition: background-color .2s;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.06);
}

.badge svg {
    width: 24px;
    height: 20px;
}

.badge-text {
    padding: 0 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ice);
}

/* dymek z nazwa dla odznak i ikon */
[data-label]::after {
    content: attr(data-label);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 5;
    padding: 5px 9px;
    border-radius: 8px;
    background: #0e0e11;
    border: 1px solid var(--line-2);
    font: 500 11.5px/1.2 var(--font);
    letter-spacing: normal;
    text-transform: none;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity .15s, transform .15s var(--ease);
}

[data-label]:hover::after,
[data-label]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Status Discord (Lanyard) ---------- */
.presence {
    margin-top: 22px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}

.presence-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-2);
}

.presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-3);
}

[data-status="online"] .presence-dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
[data-status="idle"] .presence-dot { background: var(--idle); box-shadow: 0 0 10px var(--idle); }
[data-status="dnd"] .presence-dot { background: var(--dnd); box-shadow: 0 0 10px var(--dnd); }

.presence-devices {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
}

.presence-custom {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--text);
}

.presence-custom img {
    width: 18px;
    height: 18px;
}

.activity {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.activity-art img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: #141418;
}

.activity-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.activity-kind {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-3);
}

.activity-title,
.activity-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-title {
    margin-top: 2px;
    font-size: 13.5px;
    font-weight: 600;
}

.activity-sub {
    font-size: 12.5px;
    color: var(--text-2);
}

.activity-time {
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ok);
}

.activity-progress {
    margin-top: 8px;
}

.activity-progress .bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.activity-progress .bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #1ed760;
}

.activity-progress .times {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-3);
}

/* ---------- Social media ---------- */
.socials {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
}

.socials a {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    color: var(--text-2);
    transition: color .25s, border-color .25s, background-color .25s, transform .25s var(--ease), box-shadow .25s;
}

.socials svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.socials a:hover,
.socials a:focus-visible {
    color: var(--brand, var(--ice));
    border-color: color-mix(in srgb, var(--brand, #9be7ff) 45%, transparent);
    background: color-mix(in srgb, var(--brand, #9be7ff) 9%, transparent);
    box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--brand, #9be7ff) 60%, transparent);
    transform: translateY(-3px);
}

/* ---------- Serwery Discord ---------- */
.servers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 22px;
}

.server {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    transition: border-color .25s, background-color .25s, transform .25s var(--ease);
}

.server:hover {
    border-color: var(--line-2);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.server-icon {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 13px;
    object-fit: cover;
    background: #141418;
}

.server-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.server-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.server-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
}

.server.has-counts .online-dot {
    background: var(--ok);
    box-shadow: 0 0 8px rgba(61, 220, 132, 0.7);
}

.server-join {
    flex: none;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--text);
    color: #050506;
    font-size: 12.5px;
    font-weight: 600;
    transition: background-color .2s, transform .2s var(--ease);
}

.server:hover .server-join {
    background: var(--ice);
}

/* ---------- Stopka ---------- */
.foot {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-3);
}

.foot a {
    transition: color .2s;
}

.foot a:hover {
    color: var(--ice);
}

.foot .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-3);
}

/* komunikat z /js/security.js */
.fz-guard-msg {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 60;
    padding: 10px 14px;
    border-radius: 10px;
    background: #0e0e11;
    border: 1px solid rgba(242, 84, 91, 0.35);
    color: var(--text);
    font: 500 12.5px/1.4 var(--font);
}

/* ---------- Telefony ---------- */
@media (max-width: 480px) {
    .page {
        justify-content: flex-start;
        padding-top: 74px;
    }

    .card {
        padding: 26px 18px 18px;
        border-radius: 24px;
    }

    .name {
        font-size: 38px;
    }

    .socials {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .socials a {
        aspect-ratio: auto;
        height: 50px;
    }

    .server {
        gap: 10px;
    }

    .server-meta {
        font-size: 11.5px;
    }

    .server-join {
        padding: 7px 11px;
        font-size: 12px;
    }

    .player:hover .volume {
        width: 0;
    }

    .views {
        height: 38px;
    }

    .player {
        height: 38px;
    }
}

@media (hover: none) {
    .card::before,
    .card::after {
        display: none;
    }
}

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

    .bg-grain {
        animation: none;
    }
}
