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

html,
body {
    margin: 0;
    padding: 0;
    overscroll-behavior: none;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #222;
    -webkit-font-smoothing: antialiased;
}

/* ---------- background ---------- */

.page-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

.page-image,
.pride-page-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pride-page-image {
    display: none;
}

/* ---------- layout ---------- */

.page-full-wrap {
    position: relative;
    z-index: 10;
    width: 680px;
    max-width: 90%;
    margin: 0 auto;
    margin-top: 24px;
    padding-bottom: 100px;
}

.top-sec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    min-height: 36px;
}

.share-btn {
    align-items: center;
    cursor: pointer;
    display: flex;
    height: 36px;
    justify-content: center;
    width: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(13, 12, 34, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s cubic-bezier(0.17, 0.67, 0.29, 2.71);
}

.share-btn:hover {
    transform: scale(1.1);
}

/* ---------- profile ---------- */

.display-image {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    background: #fff;
}

.m-auto {
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    margin: 16px 0 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
    color: #fff;
}

.page-bioline {
    margin: 12px 0 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    text-align: center;
    color: #fff;
}

/* ---------- link buttons ---------- */

.links {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-item-wrap {
    transition: transform 0.15s cubic-bezier(0.17, 0.67, 0.29, 2.71);
}

.page-item-wrap:hover {
    transform: scale(1.025);
}

.page-item-each {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    width: 100%;
    text-decoration: none;
    color: #222;
    background: #fff;
    border: 1px solid rgba(13, 12, 34, 0.08);
    border-radius: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.link-each-image {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
}

.item-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    word-break: break-word;
    text-align: center;
}

.spacer {
    height: 120px;
}

/* ---------- footer logo ---------- */

.page-logo {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    line-height: 0;
    transition: transform 0.15s ease;
}

.page-logo:hover {
    transform: translateX(-50%) scale(1.05);
}

/* ---------- share modal ---------- */

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

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

.modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.1s ease forwards;
}

.share-modal-out {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.share-items-inside {
    display: flex;
    flex-flow: column;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.2s;
}

.share-modal.active .share-items-inside {
    transform: scale(1);
    opacity: 1;
}

.share-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 32px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.share-banner-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.close-share {
    position: absolute;
    top: 19px;
    right: 16px;
    align-items: center;
    cursor: pointer;
    display: flex;
    padding: 8px;
    border-radius: 6px;
}

.close-share:hover {
    background: #f5f5f5;
}

.share-body {
    width: 100%;
}

.share-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: left;
    gap: 18px;
    margin-top: 24px;
    margin-bottom: 12px;
    padding-left: 32px;
    padding-right: 32px;
}

.qr-side {
    display: flex;
    align-items: center;
}

/* flip card + QR */

.flip-card {
    width: 183px;
    height: 183px;
    perspective: 1000px;
    background: transparent;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(-180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-card-front {
    background: #fff;
    color: #000;
}

.flip-card-back {
    transform: rotateY(180deg);
    color: #fff;
}

.qr-canvas {
    position: relative;
    width: 183px;
    height: 183px;
    border-radius: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05), 0 8px 40px rgba(0, 0, 0, 0.04), 0 0 2px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-canvas canvas,
.qr-canvas img {
    display: block;
}

#qr-canvas-blur canvas {
    filter: blur(6px) brightness(0.9);
}

.qr-download {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    cursor: pointer;
}

.qr-download span {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #0095f6;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    padding: 8px 10px;
    transition: all 0.3s ease;
}

.qr-download span:hover {
    transform: scale(1.03);
}

/* share items */

.share-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 52%;
    min-width: 240px;
}

.share-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
}

.share-item:hover {
    background: #f5f5f5;
}

.share-item-left {
    display: flex;
    align-items: center;
}

.share-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #eaeaeb;
    margin-right: 12px;
    flex: none;
}

.share-label {
    white-space: nowrap;
}

.share-svg-arrow {
    margin-right: 4px;
}

/* copy link */

.copy-link-div {
    position: relative;
    display: flex;
    width: calc(100% - 44px);
    margin: 0 auto 36px;
    padding-top: 16px;
}

.link-copy-icon {
    position: absolute;
    left: 10px;
    top: calc(50% + 8px - 8px);
    display: flex;
    pointer-events: none;
}

.link-input {
    flex: 1;
    width: 100%;
    border: 1px solid #0095f6;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 14px 14px 14px 32px;
    font-family: inherit;
    font-size: 14px;
    color: #000;
    outline: none;
    background: #fff;
}

.share-copy {
    width: 96px;
    flex: none;
    background: #0095f6;
    border: 1px solid #0095f6;
    border-radius: 0 6px 6px 0;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.share-copy:hover {
    opacity: 0.85;
}

.share-copy.copied {
    background: #16a34a;
    border-color: #16a34a;
}

/* ---------- animations ---------- */

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* ---------- responsive ---------- */

@media only screen and (max-width: 763px) {
    .page-image {
        display: none;
    }

    .pride-page-image {
        display: block;
    }

    .page-full-wrap {
        width: 90%;
        max-width: 90%;
    }

    .share-modal-out {
        max-width: 100%;
    }

    .share-content-wrapper {
        padding-left: 24px;
        padding-right: 24px;
        justify-content: center;
    }

    .share-items-wrapper {
        width: 100%;
        min-width: 0;
        margin-top: 12px;
    }

    .copy-link-div {
        width: calc(100% - 32px);
    }
}

@media only screen and (max-width: 400px) {
    .qr-side {
        display: none;
    }

    .share-content-wrapper {
        justify-content: center;
    }
}
