/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
    min-height: 100vh;
    background: #0a0a0a;
    display: block;
    padding: 0;
}

/* ========== INSTAGRAM ICON BUTTON ========== */
.instagram-icon-button {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.instagram-icon-button img {
    width: 32px; 
    height: 32px;
    object-fit: contain;
}

.instagram-icon-button:hover {
    transform: scale(0.95);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .instagram-icon-button img {
        width: 32px;
        height: 32px;
    }
}

/* Desktop adjustments */
@media (min-width: 641px) {
    .instagram-icon-button img {
        width: 32px;
        height: 32px;
    }
}

/* ========== BACKGROUND BLUR ========== */
.ultra-blur-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    filter: blur(28px) brightness(0.6) saturate(1.2);
    transform: scale(1.05);
}

.ultra-blur-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

/* Name section as column */
.name-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.username {
    font-size: 1rem;
    font-weight: 500;
    color: #b9b9ce;
    display: inline-block;
    backdrop-filter: blur(4px);
}

/* ========== MAIN PROFILE CARD ========== */
.profile-card {
    max-width: 641px;
    width: 100%;
    background: rgba(0, 0, 0, 0.96);
    border-radius: 28px;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    backdrop-filter: none;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

/* Position online status at bottom right corner of hero image */
.hero-online-status {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;
}

/* Adjust the online status styling for hero placement - 1.3x bigger */
.hero-online-status .profile-online-status {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 5px 13px;
    border-radius: 26px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-online-status .online-indicator {
    position: relative;
    display: inline-block;
    border-radius: 9999px;
    height: 10.4px;
    width: 10.4px;
}

.hero-online-status .online-ping {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: #10b981;
    opacity: 0.75;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero-online-status .online-dot {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: #10b981;
}

.hero-online-status .online-text {
    display: inline-block;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.975px;
    font-weight: 600;
    color: #10b981;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Desktop layout */
@media (min-width: 640px) {
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1.5rem;
    }
    .profile-card {
        margin: 2rem auto;
        display: flex;
        flex-direction: row;
        height: 500px;
        max-width: 900px;
    }
    
    .card-inner {
        display: flex;
        flex-direction: row;
        width: 100%;
        height: 100%;
    }
    
    /* Profile image takes 70% on desktop */
    .card-hero {
        width: 70%;
        height: 100%;
        border-radius: 28px 0 0 28px;
        flex-shrink: 0;
    }
    
    .card-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Bio/content area takes 30% on desktop */
    .content {
        width: 30%;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow-y: auto;
    }
    
    .bio {
        margin: 0;
        margin-bottom: 0;
    }
    
    .name-row {
        justify-content: center;
    }
    
    /* DESKTOP SHADOW FADE TRANSITION - vertical fade between image and content */
    .card-hero {
        position: relative;
    }
    
    .card-hero::after {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 50px;
        background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0) 12%,
            rgba(0, 0, 0,  0.3) 40%,
            rgba(0, 0, 0, 0.4) 70%,
            rgba(0, 0, 0, 0.96) 100%
        );
        pointer-events: none;
        z-index: 2;
    }
}

/* ========== MOBILE LAYOUT: 50/50 SPLIT ========== */
@media (max-width: 640px) {
    body {
        padding: 0;
        display: block;
        height: 100vh;
        overflow: hidden;
    }
    
    /* Specifically target Instagram button container for proper spacing */
    .instagram-bottom {
        margin: 1rem 0 1rem !important; /* Increased bottom margin */
    }
    
    /* Or if you want the Instagram button to be last element with proper spacing */
    .instagram-bottom:last-child {
        margin-bottom: 0.5rem;
    }
    
    .profile-card {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.98);
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .card-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    /* Hero image takes top 50% on mobile */
    .card-hero {
        height: 50vh;
        width: 100%;
        border-radius: 0;
        flex-shrink: 0;
        position: relative;
    }
    
    .card-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Content takes bottom 50% on mobile */
    .content {
        flex: 1;
        width: 100%;
        padding: 1.2rem 1.2rem 2rem 1.2rem;
        background: rgba(0, 0, 0, 0.96);
        overflow-y: auto;
        position: relative;
        z-index: 3;
    }
    
    .profile-card:hover {
        transform: none;
    }
    
    .bio {
        margin: 0;
        margin-bottom: 0;
    }
    
    .name-row {
        justify-content: center;
        padding-top: 0.5rem;
    }
    
    /* MOBILE SHADOW FADE TRANSITION - bottom fade from image to content */
    .card-hero::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80px;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 12%,
            rgba(0, 0, 0,  0.3) 40%,
            rgba(0, 0, 0, 0.4) 70%,
            rgba(0, 0, 0, 0.96) 100%
        );
        pointer-events: none;
        z-index: 2;
    }
    
    /* Optional: Add a subtle top shadow to content for better blending */
    .content::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 0;
        right: 0;
        height: 20px;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.3),
            transparent
        );
        pointer-events: none;
        z-index: 1;
    }
}

/* ========== PROFILE IMAGE: NO FILTERS ========== */
.card-hero {
    position: relative;
    overflow: hidden;
    background: #000000;
    transform: translateZ(0);
}

.card-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none !important;
    opacity: 1 !important;
    transition: transform 0.3s ease;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    display: block;
}

.profile-card:hover .card-hero img {
    transform: scale(1.01);
}

/* Remove gradient overlay */
.hero-gradient {
    display: none;
}

/* ========== CONTENT AREA ========== */
.content {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF, #d9d9ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    -webkit-font-smoothing: antialiased;
}

.verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: url('/static/verified.svg') center/contain no-repeat;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.username {
    font-size: 1rem;
    font-weight: 500;
    color: #b9b9ce;
    display: inline-block;
    backdrop-filter: blur(4px);
}

/* Bio description - reduced rounding */
.bio {
    padding: 1.2rem 1.4rem;
    border-radius: 20px;
    margin: 0;
    margin-bottom: 0;
    line-height: 1.55;
    font-size: 0.95rem;
    color: #e2e2f0;
    text-align: center;
    white-space: pre-wrap;
    word-break: break-word;
    backdrop-filter: none;
}

/* Link card */
.link-card {
    background: linear-gradient(105deg, rgb(24, 246, 87) 0%, rgb(0, 200, 50) 100%);
    border-radius: 36px;
    margin: 1.5rem 0 1rem;
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 10px 20px -5px rgba(24, 246, 87, 0.4);
    border: none;
    max-width: 630px;
    transform: translateZ(0);
}

.link-card:hover {
    transform: scale(0.97) translateZ(0);
    box-shadow: 0 8px 24px -6px rgb(24, 246, 87);
    background: linear-gradient(105deg, rgb(24, 246, 87) 0%, rgb(0, 180, 45) 100%);
}

.link-card a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 1.8rem;
    text-decoration: none;
    gap: 16px;
}

.cta-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: rgb(0, 0, 0);
    letter-spacing: -0.2px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Share button */
.share-button-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #6b46c1;
    padding: 8px 18px;
    border-radius: 60px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #c4b5fd;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 12px;
    backdrop-filter: blur(2px);
}

.share-button-mini:hover {
    background: #6b46c130;
    border-color: #a855f7;
    color: white;
    transform: translateY(-1px);
}

/* Toast message */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e2f;
    backdrop-filter: blur(20px);
    color: #f0f0ff;
    padding: 10px 24px;
    border-radius: 60px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
    border: 0.5px solid rgba(168, 85, 247, 0.5);
}

/* Desktop adjustments */
@media (min-width: 641px) {
    h1 {
        font-size: 1.6rem;
    }
    
    .cta-text {
        font-size: 1rem;
    }
    
    .link-icon {
        width: 44px;
        height: 44px;
    }
    
    .bio {
        font-size: 0.85rem;
        padding: 1rem;
        margin: 0;
        margin-bottom: 0;
        justify-content: center;
    }
    
    .link-card {
        margin: 1rem 0 0.8rem;
    }
    
    .link-card a {
        padding: 0.8rem 1.2rem;
    }
    
    .username {
        font-size: 0.85rem;

    }
    
    .share-button-mini {
        margin-top: 8px;
    }
}

/* Mobile adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 1.7rem;
    }
    
    .cta-text {
        font-size: 1rem;
    }
    
    .link-icon {
        width: 44px;
        height: 44px;
    }
    
    .bio {
        font-size: 0.85rem;
        padding: 1rem;
        border-radius: 18px;
    }
    
    .link-card {
        border-radius: 28px;
    }
    
    .name-row {
        margin-top: 0.2rem;
    }
}

/* Mobile-specific adjustment - move content 200px above */
@media (max-width: 640px) {
    /* Move the entire content area (username, bio, link card, share button) 200px up */
    .content {
        position: relative;
        top: -80px;
        margin-bottom: -80px; /* Compensate for the upward shift to maintain scroll behavior */
        background: none;
    }
    
    /* Adjust the shadow fade overlay to work with the new positioning */
    .card-hero::after {
        z-index: 4; /* Ensure shadow stays above moved content if needed */
    }
    
    /* Optional: Adjust content container to prevent clipping */
    .card-inner {
        overflow: visible;
    }
    
    /* Optional: Add a smooth transition for better UX */
    .content {
        transition: top 0.3s ease;
    }
}

/* Remove redundant pseudo-element */
.profile-card::before {
    display: none;
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-hero img,
    .link-icon {
        image-rendering: -webkit-optimize-contrast;
    }
}