/* ============================================
   HeyLink.me Style - Dark Purple Crypto Theme
   ============================================ */

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #441992;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(120, 80, 220, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 50, 200, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(60, 30, 160, 0.3) 0%, transparent 50%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    background-attachment: fixed;
}

/* ----- Page Wrapper ----- */
.page-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 50px 0 30px;
    position: relative;
    z-index: 1;
}

/* ----- Profile Section ----- */
.profile-section {
    text-align: center;
    padding: 0 0 30px;
    position: relative;
}

.avatar-wrapper {
    display: inline-block;
    margin-bottom: 14px;
    position: relative;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.action-btn:active {
    transform: scale(0.95);
}

.username {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ----- Links Section ----- */
.links-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 0 20px;
}

/* ----- Link Button (HeyLink.me Pill Style) ----- */
.link-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    text-decoration: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.link-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.link-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.2);
}

.link-btn-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.link-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
}

.link-btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
}

.link-btn-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-btn-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-btn-share {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.link-btn-share:hover {
    background: rgba(255, 255, 255, 0.2);
}

.link-btn-share svg {
    width: 14px;
    height: 14px;
}

.link-btn-share svg path {
    fill: rgba(255, 255, 255, 0.7);
}

/* ----- Ripple ----- */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ----- Footer Section ----- */
.footer-section {
    padding: 20px 0 0;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: color 0.2s;
}

.report-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.cookies-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.cookies-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer-right {
    display: flex;
    align-items: center;
}

.heylink-logo {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.heylink-logo:hover {
    opacity: 1;
}

/* ----- Share Popup ----- */
.share-popup,
.qr-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}

.share-popup.active,
.qr-popup.active {
    display: flex;
}

.share-popup-overlay,
.qr-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.share-popup-content,
.qr-popup-content {
    position: relative;
    background: #1e1040;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 30px;
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.3s ease;
    z-index: 1;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.share-header,
.qr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.share-title,
.qr-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.share-close,
.qr-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.share-close:hover,
.qr-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.share-link-box,
.qr-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.share-url,
.qr-url {
    flex: 1;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.share-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.share-option i {
    width: 20px;
    text-align: center;
}

/* ----- QR Code Box ----- */
.qr-code-box {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
}

.qr-code-box canvas,
.qr-code-box img {
    display: block;
}

/* ----- Toast ----- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2a1550;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 2000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ----- Responsive ----- */
@media (max-width: 400px) {
    .page-wrapper {
        padding: 30px 0 20px;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .username {
        font-size: 1.2rem;
    }

    .link-btn {
        padding: 12px 16px;
    }

    .link-btn-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .link-btn-title {
        font-size: 0.85rem;
    }
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* ----- Selection ----- */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}