/* =============================================
   RAINY CITY — Linktree Theme
   Stack: Inter (body) + Syne (display)
   Palette: deep navy · electric cyan · warm amber
   ============================================= */

/* ── Design tokens ── */
:root {
    --cyan: #38bdf8;
    --cyan-dim: rgba(56, 189, 248, 0.18);
    --cyan-glow: rgba(56, 189, 248, 0.35);
    --amber: #fbbf24;
    --amber-dim: rgba(251, 191, 36, 0.15);
    --white: #ffffff;
    --white-10: rgba(255, 255, 255, 0.1);
    --white-15: rgba(255, 255, 255, 0.15);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-80: rgba(255, 255, 255, 0.8);
    --dark-glass: rgba(10, 15, 28, 0.65);
    --panel-bg: rgba(255, 255, 255, 0.07);
    --panel-border: rgba(255, 255, 255, 0.13);
    --shadow-deep: 0 24px 60px rgba(0, 0, 0, 0.55);
    --r-panel: 22px;
    --r-btn: 13px;
    --r-circle: 50%;

    --font-display: "Poppins", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Body ── */
body {
    min-height: 100vh;
    font-family: var(--font-body);
    background: #080c18;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

html {
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

html::-webkit-scrollbar {
    display: none;
}

/* =============================================
   BACKGROUND LAYERS
   ============================================= */

/* Hidden source image — WebGL reads it as a texture */
#custom-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100vw;
    min-height: 100vh;
    transform: translate(-50%, -50%) scale(1.06);
    object-fit: cover;
    z-index: 0;
    filter: blur(4px) brightness(0.65) saturate(1.2);
    pointer-events: none;
}

/* Rain canvas sits above the image */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* Colour-grade overlay */
#color-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    /* subtle dark-blue gradient so UI reads on any city photo */
    background: linear-gradient(
        160deg,
        rgba(5, 10, 25, 0.52) 0%,
        rgba(8, 14, 35, 0.38) 50%,
        rgba(3, 6, 18, 0.6) 100%
    );
    pointer-events: none;
}

/* =============================================
   MOBILE WRAPPER
   ============================================= */
.mobile-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    padding: 40px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 0px;
    /* center horizontally on large screens */
    margin-inline: auto;
    min-height: 100vh;
    justify-content: center;
}

/* =============================================
   GLASS PANELS
   ============================================= */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--panel-border);
    border-radius: var(--r-panel);
    box-shadow: var(--shadow-deep);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* ── Profile panel ── */
.profile-panel {
    padding: 20px 22px 20px;
    gap: 0;
    /* Remove glass background */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    margin-top: 0;
}

/* ── Avatar ── */
.avatar-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--white-20);
    display: block;
    /* Soft cyan glow ring */
    box-shadow:
        0 0 0 3px rgba(56, 189, 248, 0.3),
        0 6px 20px rgba(0, 0, 0, 0.5);
}

/* Online status dot */
.avatar-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #080c18;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

/* ── Name & handle ── */
.name {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.3px;
    text-align: center;
    line-height: 1.15;
    margin-bottom: 6px;
}

.handle {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--cyan);
    letter-spacing: 0.4px;
    margin-bottom: 0px;
}

/* ── Bio ── */
.bio {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--white-60);
    text-align: center;
    margin-bottom: 0px;
    margin-top: 18px;
    padding: 0 4px;
}

/* ── Tags ── */
.tags-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--amber);
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: var(--amber-dim);
    border-radius: 999px;
    padding: 4px 12px;
}

/* =============================================
   LINKS PANEL
   ============================================= */
.links-panel {
    padding: 18px 16px 20px;
    gap: 10px;
    align-items: stretch;
    margin-top: 6px;
    /* Remove glass background */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
}

/* ── Link buttons ── */
.link-btn {
    position: relative;
    display: grid;
    /* icon | text | arrow */
    grid-template-columns: 40px 1fr 28px;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r-btn);
    border: 1px solid var(--white-10);
    background: var(--dark-glass);
    color: var(--white);
    text-decoration: none;
    overflow: hidden;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
    cursor: pointer;
}

/* Shine sweep on hover */
.link-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.06) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.link-btn:hover::before {
    transform: translateX(100%);
}

.link-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: var(--cyan-glow);
    transform: translateY(-2px);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.35),
        0 0 12px var(--cyan-dim);
}

.link-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: none;
}

/* Icon circle */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--white-10);
    border: 1px solid var(--white-15);
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    color: var(--cyan);
    flex-shrink: 0;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.link-btn:hover .btn-icon {
    background: var(--cyan-dim);
    color: #fff;
}

/* Label + sub */
.btn-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
    min-width: 0;
}

.btn-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.btn-sub {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--white-60);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Arrow icon */
.btn-arrow {
    display: grid;
    place-items: center;
    color: var(--white-60);
    font-size: 0.75rem;
    transition:
        transform 0.2s ease,
        color 0.2s ease;
    flex-shrink: 0;
}

.link-btn:hover .btn-arrow {
    transform: translateX(3px);
    color: var(--cyan);
}

/* ── Loading state ── */
.spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--cyan);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.link-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.link-btn.is-loading .btn-icon,
.link-btn.is-loading .btn-body,
.link-btn.is-loading .btn-arrow {
    opacity: 0;
}

.link-btn.is-loading .spinner {
    opacity: 1;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   DIVIDER
   ============================================= */
.social-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 2px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--white-15);
    border-radius: 1px;
}

.divider-label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--white-60);
    white-space: nowrap;
}

/* =============================================
   SOCIAL ROW
   ============================================= */
.social-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.social-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--white-10);
    border: 1px solid var(--white-15);
    color: var(--white-80);
    font-size: 1rem;
    text-decoration: none;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

.social-circle:hover {
    background: var(--cyan-dim);
    border-color: var(--cyan-glow);
    color: var(--cyan);
    transform: translateY(-3px) scale(1.08);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.35),
        0 0 12px var(--cyan-dim);
}

.social-circle:active {
    transform: scale(0.94);
    box-shadow: none;
}

/* =============================================
   PAGE FOOTER
   ============================================= */
.page-footer {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--white-60);
    letter-spacing: 0.3px;
    padding-top: 4px;
}

.heart {
    color: #f87171;
    font-style: normal;
}

/* =============================================
   RESPONSIVE — tablet / desktop centering
   ============================================= */
@media (min-width: 480px) {
    .mobile-wrapper {
        padding-top: 40px;
        padding-bottom: 48px;
    }

    .name {
        font-size: 1.6rem;
    }
    
    .profile-panel {
        margin-top: 80px;
    }
}

@media (min-width: 768px) {
    body {
        align-items: center;
        min-height: 100vh;
    }

    .mobile-wrapper {
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .profile-panel {
        margin-top: 100px;
    }
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
