:root {
    color-scheme: dark;
    --background: #09070a;
    --surface: #120e14;
    --card: #151117;
    --card-hover: #1d1620;
    --text: #f1eaf2;
    --text-muted: #aea2b2;
    --border: rgba(255, 255, 255, 0.09);
    --accent: #a82969;
    --accent-dark: #711944;
    --accent-light: #e05a9e;
    --adult-accent: #cf397e;
    --adult-accent-light: #ef8fbc;
    --adult-accent-muted: #bd668f;
    --radius: 17px;
    --max-width: 600px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -8%, rgba(168, 41, 105, 0.22), transparent 35rem),
        linear-gradient(180deg, #0d0910 0%, var(--background) 46%, #070608 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
    font: inherit;
}

[hidden] {
    display: none !important;
}

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

.page {
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    padding: 48px 0 32px;
}

.profile {
    margin-bottom: 26px;
    text-align: center;
}

.avatar-wrapper {
    display: inline-flex;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-dark), #32102b);
    box-shadow: 0 0 35px rgba(168, 41, 105, 0.3);
}

.avatar {
    display: block;
    width: 116px;
    height: 116px;
    object-fit: cover;
    object-position: center 38%;
    background: #171219;
    border: 4px solid var(--background);
    border-radius: 50%;
}

h1 {
    margin: 18px 0 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 7vw, 3rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.username {
    margin: 8px 0 0;
    color: var(--accent-light);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.bio {
    max-width: 470px;
    margin: 16px auto 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.tags,
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tags {
    margin-top: 18px;
}

.tag {
    padding: 6px 10px;
    color: #d6c8db;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 150ms ease, color 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.tag:hover {
    color: #fff;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(224, 90, 158, 0.36);
}

.tag:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

.tag[aria-pressed="true"] {
    color: #fff;
    background: linear-gradient(135deg, rgba(168, 41, 105, 0.82), rgba(113, 25, 68, 0.84));
    border-color: rgba(224, 90, 158, 0.48);
    box-shadow: 0 0 18px rgba(168, 41, 105, 0.2);
}

.profile-actions {
    margin-top: 18px;
}

.utility-button,
.preference-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 150ms ease, color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.utility-button {
    min-height: 40px;
    padding: 9px 14px;
    color: #d8ceda;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.utility-button:hover,
.preference-button:hover {
    color: #fff;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(224, 90, 158, 0.36);
}

.utility-button:focus-visible,
.preference-button:focus-visible,
.age-button:focus-visible,
.link-card:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

.share-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.share-status {
    min-height: 1.4em;
    margin: 8px 0 0;
    color: #a99cad;
    font-size: 0.78rem;
}

.restricted-notice,
.noscript-notice {
    margin: 0 0 22px;
    padding: 14px 16px;
    color: #c1b5c3;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.55;
    text-align: center;
}

.restricted-notice {
    display: none;
}

body.restricted .restricted-notice {
    display: block;
}

.preference-button {
    min-height: 38px;
    margin-top: 11px;
    padding: 8px 13px;
    color: #efb5d0;
    background: rgba(168, 41, 105, 0.1);
    border-color: rgba(221, 79, 153, 0.24);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.link-group {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.link-group:first-child {
    margin-top: 0;
}

.link-group-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 4px 2px;
    color: #95899a;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.link-group-heading::after {
    height: 1px;
    flex: 1;
    content: "";
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

.after-dark-heading {
    color: var(--adult-accent-muted);
}

.after-dark-heading::after {
    background: linear-gradient(90deg, rgba(207, 57, 126, 0.32), transparent);
}

.link-card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 74px;
    padding: 12px 50px 12px 16px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)), var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(12px);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.link-card:hover {
    transform: translateY(-2px);
    background: var(--card-hover);
    border-color: rgba(221, 79, 153, 0.38);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25), 0 0 22px rgba(168, 41, 105, 0.08);
}

.link-card[data-featured="true"] {
    border-color: rgba(224, 90, 158, 0.42);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.24), 0 0 26px rgba(207, 57, 126, 0.2), inset 0 0 18px rgba(168, 41, 105, 0.05);
}

.link-card[data-featured="true"]::after {
    position: absolute;
    inset: -1px;
    z-index: -1;
    content: "";
    border-radius: inherit;
    background: radial-gradient(circle at 15% 50%, rgba(224, 90, 158, 0.12), transparent 42%);
}

.link-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    margin-right: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
}

/* Local SVG paths include the same light fill as their CDN counterparts. */
.platform-icon {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.link-content {
    min-width: 0;
}

.link-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    font-size: 1rem;
    font-weight: 750;
}

.link-card[target="_blank"] .link-title::after {
    content: "↗";
    color: #8f8293;
    font-size: 0.76rem;
    font-weight: 500;
}

.link-description {
    display: block;
    margin-top: 3px;
    overflow: visible;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.arrow {
    position: absolute;
    right: 18px;
    color: #8f8293;
    font-size: 1.2rem;
    transition: color 160ms ease, transform 160ms ease;
}

.link-card:hover .arrow {
    color: var(--accent-light);
    transform: translateX(3px);
}

.adult-link {
    border-color: rgba(190, 53, 112, 0.25);
    background: linear-gradient(110deg, rgba(93, 19, 54, 0.18), rgba(20, 15, 22, 0.94) 42%);
}

.adult-link::before {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 2px;
    content: "";
    border-radius: 999px;
    background: linear-gradient(180deg, transparent, var(--adult-accent), transparent);
    box-shadow: 0 0 12px rgba(207, 57, 126, 0.45);
}

.adult-link:hover {
    border-color: rgba(221, 79, 153, 0.48);
    background: linear-gradient(110deg, rgba(120, 24, 67, 0.27), rgba(29, 18, 30, 0.96) 42%);
}

.adult-link .link-icon {
    color: var(--adult-accent-light);
    background: rgba(168, 41, 105, 0.12);
    border-color: rgba(221, 79, 153, 0.2);
}

.generic-icon,
.generic-adult-icon {
    color: #d8ceda;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    line-height: 1;
}

.generic-adult-icon {
    color: #e7a8c5;
}

.adult-seal,
.featured-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.adult-seal {
    color: #efb5d0;
    background: rgba(155, 31, 85, 0.17);
    border: 1px solid rgba(221, 79, 153, 0.36);
}

.featured-badge {
    color: #f7d8e8;
    background: rgba(168, 41, 105, 0.18);
    border: 1px solid rgba(224, 90, 158, 0.36);
}

body.restricted .adult-only {
    display: none !important;
}

.age-notice {
    margin: 28px 0 0;
    padding: 14px 16px;
    color: #978b9b;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    font-size: 0.79rem;
    line-height: 1.55;
    text-align: center;
}

.age-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(3, 2, 4, 0.9);
    backdrop-filter: blur(14px);
    opacity: 1;
    visibility: visible;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.age-modal.hidden,
body.no-js .age-modal {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.age-modal-card {
    width: min(100%, 460px);
    padding: 30px;
    text-align: center;
    background: linear-gradient(145deg, rgba(35, 25, 38, 0.98), rgba(13, 10, 15, 0.99));
    border: 1px solid rgba(221, 79, 153, 0.28);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 50px rgba(168, 41, 105, 0.12);
}

.age-modal-symbol {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    color: #f0bdd7;
    background: rgba(168, 41, 105, 0.13);
    border: 1px solid rgba(221, 79, 153, 0.3);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: 0 0 28px rgba(168, 41, 105, 0.12);
}

.age-modal h2 {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.age-modal p {
    margin: 16px 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.age-modal .legal-note {
    margin-top: 12px;
    color: #897d8d;
    font-size: 0.78rem;
    line-height: 1.45;
}

.age-modal-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.age-button {
    width: 100%;
    min-height: 48px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 750;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.age-button:hover {
    transform: translateY(-1px);
}

.age-button.confirm {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.age-button.decline {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.age-button.decline:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.16);
}

footer {
    margin-top: 28px;
    color: #796d7d;
    font-size: 0.78rem;
    line-height: 1.6;
    text-align: center;
}

/* Custom 404 page */

body.error-page {
    display: grid;
    min-height: 100vh;
}

.error-layout {
    display: grid;
    place-items: center;
    width: min(100% - 32px, 620px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 0;
}

.error-card {
    width: 100%;
    padding: clamp(32px, 8vw, 54px);
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(168, 41, 105, 0.18), transparent 58%),
        linear-gradient(145deg, rgba(35, 25, 38, 0.96), rgba(13, 10, 15, 0.98));
    border: 1px solid rgba(221, 79, 153, 0.24);
    border-radius: 24px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.56),
        0 0 50px rgba(168, 41, 105, 0.1);
}

.error-mark {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
    overflow: hidden;
    border: 1px solid rgba(224, 90, 158, 0.34);
    border-radius: 22px;
    box-shadow: 0 0 28px rgba(168, 41, 105, 0.2);
}

.error-mark img {
    display: block;
    width: 100%;
    height: 100%;
}

.error-code {
    margin: 0;
    color: var(--accent-light);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.error-card h1 {
    margin: 12px 0 0;
    font-size: clamp(2rem, 8vw, 3.2rem);
}

.error-message {
    max-width: 440px;
    margin: 18px auto 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.error-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 28px;
    padding: 12px 19px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    box-shadow: 0 10px 28px rgba(113, 25, 68, 0.28);
    font-size: 0.92rem;
    font-weight: 800;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.error-home-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(113, 25, 68, 0.4);
}

.error-home-button:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

.error-footer {
    margin-top: 24px;
}

.privacy-note {
    display: block;
    margin-top: 4px;
    color: #6f6473;
}

body.no-js .link-card[data-visibility="show"][hidden] {
    display: flex !important;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile,
.restricted-notice,
.link-card,
.age-notice {
    animation: fade-up 500ms ease both;
}

@media (max-width: 480px) {
    .page {
        width: min(100% - 24px, var(--max-width));
        padding-top: 34px;
    }

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

    .link-card {
        min-height: 70px;
        height: auto;
    }

    .age-modal-card {
        padding: 26px 20px;
    }
}

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