/* ================================== */
/*  Doctor Friend – Premium Linktree  */
/* ================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Refined palette */
    --bg-start: #e8f0fe;
    --bg-end: #f0faf4;
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 60px rgba(21, 101, 216, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);

    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(255, 255, 255, 0.9);
    --card-hover-bg: rgba(255, 255, 255, 0.95);

    --text-primary: #0f1d33;
    --text-secondary: #5e6e87;
    --text-muted: #8d9bb5;

    --blue: #1565d8;
    --blue-light: #e3edfc;
    --green: #2fb553;
    --green-light: #e2f7e9;
    --whatsapp: #25d366;
    --whatsapp-light: #e0fbe9;

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    background: var(--bg-start);
}

/* ===== Animated gradient background ===== */
.bg-gradient {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg,
            #e8f0fe 0%,
            #dff0e8 25%,
            #f0f6ff 50%,
            #e6f9ee 75%,
            #eef4ff 100%);
    background-size: 400% 400%;
    animation: gradient-shift 16s ease infinite;
    z-index: 0;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Subtle noise texture */
.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== Floating orbs ===== */
.orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(70px);
}

.orb-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(21, 101, 216, 0.15) 0%, transparent 70%);
    top: -100px;
    left: -80px;
    animation: orb-float 20s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(47, 181, 83, 0.12) 0%, transparent 70%);
    bottom: -60px;
    right: -40px;
    animation: orb-float 24s ease-in-out infinite reverse;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(21, 101, 216, 0.08) 0%, transparent 70%);
    top: 60%;
    left: 15%;
    animation: orb-float 18s ease-in-out infinite 3s;
}

.orb-4 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(47, 181, 83, 0.08) 0%, transparent 70%);
    top: 20%;
    right: 10%;
    animation: orb-float 22s ease-in-out infinite 6s;
}

@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(20px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-15px, 15px) scale(0.95);
    }

    75% {
        transform: translate(25px, 10px) scale(1.03);
    }
}

/* ===== Container ===== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 40px 20px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Glass card ===== */
.glass-card {
    width: 100%;
    padding: 44px 32px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(1.4);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: card-enter .7s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Logo ===== */
.logo-wrapper {
    position: relative;
    animation: fade-in .6s ease-out .2s both;
}

.logo-glow {
    position: absolute;
    inset: -8px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(21, 101, 216, .15), rgba(47, 181, 83, .15));
    filter: blur(20px);
    opacity: 0;
    transition: opacity .4s ease;
}

.logo-wrapper:hover .logo-glow {
    opacity: 1;
}

.logo {
    position: relative;
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 26px;
    background: #fff;
    padding: 6px;
    box-shadow:
        0 4px 24px rgba(21, 101, 216, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease;
}

.logo-wrapper:hover .logo {
    transform: scale(1.06) rotate(-1.5deg);
    box-shadow:
        0 8px 36px rgba(21, 101, 216, 0.16),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* ===== Brand name ===== */
.brand-name {
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 20px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--blue) 20%, var(--green) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fade-in .6s ease-out .35s both;
}

.tagline {
    font-size: .88rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.02em;
    animation: fade-in .6s ease-out .45s both;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Divider ===== */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 4px;
    animation: fade-in .6s ease-out .55s both;
}

.divider-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--green));
    opacity: .5;
}

.divider-line {
    width: 40px;
    height: 1.5px;
    background: linear-gradient(90deg, var(--blue), var(--green));
    opacity: .2;
    border-radius: 2px;
}

/* ===== Links ===== */
.links {
    width: 100%;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ===== Link card ===== */
.link-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
    cursor: pointer;
    transition:
        transform .35s cubic-bezier(.22, 1, .36, 1),
        box-shadow .35s ease,
        background .35s ease,
        border-color .35s ease;
    animation: link-enter .5s cubic-bezier(.22, 1, .36, 1) both;
}

.link-card:nth-child(1) {
    animation-delay: .6s;
}

.link-card:nth-child(2) {
    animation-delay: .72s;
}

.link-card:nth-child(3) {
    animation-delay: .84s;
}

@keyframes link-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Background fill on hover */
.link-card-bg {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    opacity: 0;
    transition: opacity .4s ease;
}

.apple-bg {
    background: linear-gradient(135deg, rgba(21, 101, 216, .06), rgba(33, 150, 243, .04));
}

.google-bg {
    background: linear-gradient(135deg, rgba(47, 181, 83, .06), rgba(102, 214, 138, .04));
}

.whatsapp-bg {
    background: linear-gradient(135deg, rgba(37, 211, 102, .06), rgba(18, 140, 126, .04));
}

.link-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.03);
    background: var(--card-hover-bg);
    border-color: transparent;
}

.link-card:hover .link-card-bg {
    opacity: 1;
}

.link-card:active {
    transform: translateY(-1px) scale(0.99);
    transition-duration: .1s;
}

/* ===== Link icon ===== */
.link-icon-wrapper {
    position: relative;
    z-index: 1;
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
    transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease;
}

.apple-icon {
    background: linear-gradient(145deg, #1565d8, #42a5f5);
    color: #fff;
    box-shadow: 0 4px 16px rgba(21, 101, 216, 0.25);
}

.google-icon {
    background: linear-gradient(145deg, #2fb553, #66d68a);
    color: #fff;
    box-shadow: 0 4px 16px rgba(47, 181, 83, 0.25);
}

.whatsapp-icon {
    background: linear-gradient(145deg, #25d366, #48e87c);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
}

.link-card:hover .link-icon {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* ===== Link content ===== */
.link-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 1;
}

.link-label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.link-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1px;
    letter-spacing: -0.01em;
}

/* ===== Arrow ===== */
.link-arrow {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-muted);
    flex-shrink: 0;
    transition:
        background .3s ease,
        color .3s ease,
        transform .35s cubic-bezier(.22, 1, .36, 1);
}

.link-card:hover .link-arrow {
    background: rgba(21, 101, 216, 0.08);
    color: var(--blue);
    transform: translate(3px, -3px);
}

.link-card:nth-child(2):hover .link-arrow {
    background: rgba(47, 181, 83, 0.08);
    color: var(--green);
}

.link-card:nth-child(3):hover .link-arrow {
    background: rgba(37, 211, 102, 0.08);
    color: var(--whatsapp);
}

/* ===== Footer ===== */
.footer {
    margin-top: 28px;
    animation: fade-in .5s ease-out 1.1s both;
}

.footer p {
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.03em;
}

/* ===== Responsive ===== */
@media (max-width: 520px) {
    .container {
        padding: 24px 14px 20px;
    }

    .glass-card {
        padding: 36px 22px 32px;
        border-radius: 24px;
    }

    .logo {
        width: 94px;
        height: 94px;
        border-radius: 22px;
    }

    .brand-name {
        font-size: 1.45rem;
    }

    .link-card {
        padding: 14px 16px;
        gap: 14px;
    }

    .link-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .link-title {
        font-size: .98rem;
    }

    .link-arrow {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }
}

@media (max-width: 360px) {
    .glass-card {
        padding: 28px 16px 24px;
    }
}