:root {
    --accent: #111111;
    --page-bg: #f4f1ec;
    --text: #111111;
    --muted: #6b6b6b;
    --line: #e5e5e5;
    --card: rgba(255, 255, 255, 0.86);
    --shadow: 0 24px 70px rgba(17, 17, 17, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.public-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 16%, transparent), transparent 34rem),
        linear-gradient(145deg, var(--page-bg), #ffffff);
}

.bio-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px 18px;
    display: grid;
    place-items: center;
}

.bio-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 32px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.profile-cover {
    height: 172px;
    margin: -30px -30px 0;
    background-position: center;
    background-size: cover;
}

.profile-cover::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.3)),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.42), transparent 42%);
}

.share-trigger {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 46px;
    min-height: 46px;
    padding: 0;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.1);
    backdrop-filter: blur(14px);
}

.share-trigger:hover {
    color: #ffffff;
    background: var(--accent);
}

.avatar {
    position: relative;
    z-index: 1;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 14px 32px rgba(17, 17, 17, 0.18);
}

.has-cover .avatar {
    margin-top: -58px;
}

.bio-card h1 {
    margin: 18px 0 6px;
    font-size: clamp(34px, 7vw, 54px);
    line-height: 0.96;
    letter-spacing: 0;
}

.profile-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
}

.verified-badge {
    flex: 0 0 auto;
    width: clamp(28px, 5.8vw, 40px);
    height: clamp(28px, 5.8vw, 40px);
    display: inline-grid;
    place-items: center;
    transform: translateY(-0.05em);
}

.verified-badge svg {
    width: 100%;
    height: 100%;
    display: block;
}

.verified-badge-shape {
    fill: #8b5cf6;
}

.verified-badge-check {
    fill: none;
    stroke: #ffffff;
    stroke-width: 7;
    stroke-linecap: square;
    stroke-linejoin: miter;
}

.handle,
.title,
.bio,
.location {
    margin: 0 auto;
    color: var(--muted);
}

.handle {
    font-weight: 700;
    color: var(--accent);
}

.title {
    margin-top: 10px;
    font-weight: 700;
}

.bio {
    max-width: 31rem;
    margin-top: 14px;
    line-height: 1.6;
}

.location {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.links {
    margin-top: 26px;
    display: grid;
    gap: 12px;
}

.link-button {
    min-height: 58px;
    display: grid;
    grid-template-columns: 42px 1fr 24px;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
    color: #ffffff;
    background: var(--accent);
    text-decoration: none;
    font-weight: 800;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 24%, transparent);
}

.link-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
}

.outline .link-button {
    color: var(--accent);
    background: transparent;
}

.outline .link-icon,
.soft .link-icon {
    background: color-mix(in srgb, var(--accent) 10%, #ffffff);
}

.soft .link-button {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, #ffffff);
}

.share-open {
    overflow: hidden;
}

.share-modal[hidden] {
    display: none;
}

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 22px;
}

.share-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    border: 0;
    border-radius: 0;
    padding: 0;
    background:
        radial-gradient(circle at 50% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 28rem),
        rgba(17, 17, 17, 0.48);
    cursor: default;
}

.share-sheet {
    position: relative;
    width: min(100%, 560px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 30px 90px rgba(17, 17, 17, 0.26);
    backdrop-filter: blur(22px);
}

.share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 14px;
}

.share-header h2 {
    margin: 0;
    font-size: 22px;
}

.share-close {
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 50%;
    color: var(--text);
    background: #f3f3f3;
}

.share-preview {
    margin: 0 22px 18px;
    padding: 18px;
    display: grid;
    grid-template-columns: 76px 1fr;
    align-items: center;
    gap: 16px;
    border-radius: 24px;
    color: #ffffff;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #4f46e5), #1f1f1f);
}

.share-preview img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.72);
}

.share-preview strong,
.share-preview span {
    display: block;
}

.share-preview strong {
    font-size: 22px;
    line-height: 1.1;
}

.share-preview span {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.share-options {
    padding: 0 22px 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.share-option {
    min-height: 98px;
    padding: 12px 8px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 9px;
    border: 1px solid #eeeeee;
    border-radius: 20px;
    color: var(--text);
    background: #ffffff;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.share-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(17, 17, 17, 0.08);
}

.share-option span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: var(--accent);
    font-size: 20px;
}

.share-option strong {
    max-width: 100%;
    color: #333333;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

.copy-option span {
    background: #ededeb;
    color: #111111;
}

[data-share-url="x"] span {
    background: #000000;
}

[data-share-url="facebook"] span {
    background: #1877f2;
}

[data-share-url="whatsapp"] span {
    background: #19c463;
}

[data-share-url="linkedin"] span {
    background: #0a66c2;
}

[data-share-url="messenger"] span {
    background: linear-gradient(145deg, #00b2ff, #a033ff, #ff4f8b);
}

[data-share-url="snapchat"] span {
    color: #111111;
    background: #fffc00;
}

.copy-status {
    min-height: 22px;
    margin: -4px 22px 18px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.admin-page {
    min-height: 100vh;
    background: #f6f6f4;
}

.login-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
}

.panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 50px rgba(17, 17, 17, 0.06);
}

.login-panel .panel {
    width: min(100%, 420px);
}

.login-panel h1,
.admin-header h1,
.panel h2 {
    margin: 0;
}

.login-panel p,
.admin-header p {
    color: var(--muted);
}

.admin-layout {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    background: rgba(246, 246, 244, 0.9);
    backdrop-filter: blur(12px);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.editor-grid {
    align-items: start;
    margin-bottom: 16px;
}

label {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: #565656;
    font-size: 13px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dcdcdc;
    border-radius: 14px;
    padding: 10px 12px;
    background: #fff;
    color: #111;
    font: inherit;
}

textarea {
    resize: vertical;
}

button,
.admin-actions a,
.secondary {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
}

.admin-actions a,
.secondary {
    border: 1px solid var(--line);
    background: #fff;
    color: #111;
}

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

.section-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.links-footer-action {
    margin-top: 16px;
    display: grid;
}

.wide-action {
    width: 100%;
}

.panel h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.links-editor {
    display: grid;
    gap: 12px;
}

.link-row {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1fr auto 44px;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid #eeeeee;
    border-radius: 18px;
    background: #fbfbfb;
}

.switch {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.switch input {
    width: auto;
    min-height: 0;
}

.icon-button {
    width: 44px;
    padding: 0;
    border-radius: 14px;
    background: #fff1f1;
    color: #d33232;
}

.inline-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
}

.inline-checks label {
    display: flex;
    align-items: center;
}

.inline-checks input {
    width: auto;
    min-height: 0;
}

.alert {
    margin: 0 0 16px;
    border-radius: 16px;
    padding: 12px 14px;
    font-weight: 800;
}

.success {
    color: #0f7a3d;
    background: #ecfff3;
}

.error {
    color: #9b1c1c;
    background: #fff0f0;
}

@media (max-width: 820px) {
    .bio-shell {
        padding: 26px 14px;
        align-items: start;
    }

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

    .profile-cover {
        height: 150px;
        margin: -24px -16px 0;
    }

    .share-trigger {
        top: 14px;
        right: 14px;
        width: 42px;
        min-height: 42px;
    }

    .share-modal {
        align-items: end;
        padding: 12px;
    }

    .share-sheet {
        border-radius: 28px;
    }

    .share-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-header,
    .editor-grid,
    .form-grid,
    .link-row {
        grid-template-columns: 1fr;
    }

    .admin-header {
        display: grid;
    }

    .admin-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
