/* ========== 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: 53.3333333333vw;
        background: linear-gradient(to right,
            rgba(0, 0, 0, 0) 12%,
            rgba(0, 0, 0, 0.3) 46%,
            rgba(0, 0, 0, 0.5) 76%,
            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: 53.3333333333vw;
        background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 12%,
            rgba(0, 0, 0, 0.3) 46%,
            rgba(0, 0, 0, 0.5) 76%,
            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: -10px;
        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: 700;
    color: rgb(0, 0, 0);
    letter-spacing: -0.2px;
}

@media (max-width: 630px) {
    .charity-buttons {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      max-width: 630px;
      margin: 0 auto;
    }
}

.more-about-section {
    text-align: center;
    margin: 2rem 0 1.5rem;
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
}

.charity-link-card {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border-radius: 28px;
  margin: 0;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 56px;
  max-width: 630px;
  transform: translateZ(0);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.charity-link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.charity-link-card:hover {
  transform: scale(0.97) translateZ(0);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.charity-link-card a {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.2rem 1.8rem;
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
}


/* 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 SCROLLING ============== */
@media (max-width: 640px) {
    html, body {
        height: auto !important;
        overflow-y: auto !important;
        position: relative !important;
    }
    
    .profile-card {
        min-height: auto !important;
        overflow: visible !important;
        padding-bottom: 2rem;
    }
    
    .card-inner {
        overflow: visible !important;
        min-height: auto;
    }
    
    .content {
        position: static !important;
        top: 0 !important;
        margin-bottom: 0 !important;
        overflow: visible !important;
        padding-bottom: 2rem;
    }
    
    .charity-buttons {
        padding-bottom: 2rem;
    }
}

@media (min-width: 641px) {
    .content {
        overflow: hidden;
    }
}


@media (max-width: 640px) {
    .content {
        position: relative;
        top: -80px;
        margin-bottom: -80px;
    }

    .card-hero::after {
        z-index: 4;
    }

    .card-inner {
        overflow: visible;
    }

    /* Optional: Add a smooth transition for better UX */
    .content {
        transition: top 0.3s ease;
    }
}

.profile-card::before {
    display: none;
}

.webview-bubble {
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 10000 !important;

    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0.8) translateY(-10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    display: flex !important;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(24, 246, 87, 0.5) !important;
    border-radius: 20px !important;
    padding: 12px 16px !important;
    min-width: 160px;
    font-size: 14px;
    font-weight: 600;
    color: #b9b9ce !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}

.webview-bubble.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) translateY(0) !important;
}

.webview-bubble.show {
    z-index: 10001 !important;
}

.webview-bubble .dots-icon {
    font-size: 0.9rem;
    color: #18f657;
    font-weight: bold;

    transform: translateY(-1px);
    display: inline-block;
}

.webview-bubble::after {
    content: "";
    position: absolute;
    top: -6px;
    right: 12px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid rgba(24, 246, 87, 0.3);
}

.webview-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);

    backdrop-filter: blur(20px);

    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.webview-warning.show {
    display: flex;
}

.warning-card {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 28px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(24, 246, 87, 0.2);
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.warning-card h2 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.warning-card:last-child {
    margin-bottom: 0.5rem;
}

.warning-subtitle {
    color: #b9b9ce;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.warning-icon {
    width: 80px;
    height: 80px;
    background: rgba(24, 246, 87, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 2px solid rgba(24, 246, 87, 0.3);
}

.warning-icon::before {
    content: "18+";
    font-size: 1.75rem;
    font-weight: 700;
    color: rgb(24, 246, 87);
}

.warning-text {
    color: #e2e2f0;
    margin-bottom: 2rem;
    line-height: 1.5;
    font-size: 1rem;
}

.instructions {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(24, 246, 87, 0.2);
    border-radius: 16px;
    padding: 1.5rem 1.5rem 1.0rem 1.5rem;
    margin-bottom: 2rem;
}

.instructions ol {
    margin: 0;
    padding: 0;
    list-style-position: inside;
    margin-bottom: 0;
    color: #e2e2f0;
}

.instructions li {
    margin-bottom: 0.75rem;
    font-size: 0.80rem;
}


.close-warning {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #e2e2f0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.close-warning:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .warning-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .card-hero img,
    .link-icon {
        image-rendering: -webkit-optimize-contrast;
    }
}
