/* Link page styles */
@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
    --ink: #17213d;
    --ink-muted: #64708a;
    --line: rgba(22, 37, 70, 0.12);
    --paper: rgba(255, 255, 255, 0.76);
    --blue: #3957ea;
    --purple: #8768f3;
    --green: #b2f571;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: #f5f7ff;
    font-family: "Manrope", Arial, sans-serif;
}

.background-grid,
.background-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.background-grid {
    opacity: 0.44;
    background-image: linear-gradient(rgba(57, 87, 234, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(57, 87, 234, 0.055) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.background-glow { filter: blur(2px); }

.glow-one {
    inset: -20% auto auto -18%;
    width: min(680px, 76vw);
    aspect-ratio: 1;
    border-radius: 48% 52% 47% 53%;
    background: radial-gradient(circle at 55% 42%, rgba(151, 137, 255, 0.44), rgba(184, 228, 253, 0.13) 43%, transparent 70%);
    transform: rotate(20deg);
}

.glow-two {
    inset: 51% -21% auto auto;
    width: min(620px, 75vw);
    aspect-ratio: 1;
    border-radius: 62% 38% 57% 43%;
    background: radial-gradient(circle at 42% 44%, rgba(185, 246, 108, 0.31), rgba(142, 211, 238, 0.12) 46%, transparent 70%);
    transform: rotate(-26deg);
}

.page {
    position: relative;
    width: min(100% - 32px, 620px);
    margin: 0 auto;
    padding: 22px 0 38px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    margin-bottom: 30px;
}

.topbar-label,
.product-tag,
.link-text > small,
.eyebrow {
    letter-spacing: 0.105em;
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 500;
}

.topbar-label { color: #6e7893; }

.share-button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    cursor: pointer;
    color: var(--ink);
    border: 1px solid rgba(28, 47, 92, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 7px 20px rgba(48, 77, 147, 0.08);
    transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.share-button:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 12px 24px rgba(48, 77, 147, 0.16); }
.share-button:active { transform: translateY(0) scale(0.96); }
.share-button:focus-visible, .link-card:focus-visible, .other-app-card:focus-visible { outline: 3px solid rgba(57, 87, 234, 0.4); outline-offset: 4px; }
.share-button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.profile { text-align: center; animation: reveal 520ms both cubic-bezier(0.16, 1, 0.3, 1); }

.avatar-wrap {
    position: relative;
    display: inline-grid;
    width: 92px;
    height: 92px;
    margin-bottom: 19px;
    padding: 5px;
    place-items: center;
    border-radius: 29px;
    background: linear-gradient(135deg, #e2d7ff, #fefeff 50%, #b9f29a);
    box-shadow: 0 18px 32px rgba(55, 74, 144, 0.16);
    transform: rotate(-5deg);
}

.avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    background: #fff;
    transform: rotate(5deg);
}

.status-dot {
    position: absolute;
    right: -2px;
    bottom: 2px;
    width: 17px;
    height: 17px;
    border: 3px solid #f7f9ff;
    border-radius: 50%;
    background: #79d647;
}

.product-tag {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px;
    color: #6c55cb;
}

.product-tag span { color: #a679ee; font-size: 13px; }

h1 { margin: 0; font-size: clamp(36px, 9vw, 49px); letter-spacing: -0.06em; line-height: 1.02; }

.intro {
    max-width: 395px;
    margin: 14px auto 0;
    color: #5e6a84;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
}

.links { display: grid; gap: 11px; margin-top: 34px; }

.link-card,
.other-app-card {
    display: grid;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 10px 25px rgba(43, 65, 128, 0.055);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease, border-color 200ms ease;
}

.link-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 15px;
    min-height: 86px;
    padding: 13px 17px 13px 14px;
    border-radius: 21px;
    animation: reveal 540ms both cubic-bezier(0.16, 1, 0.3, 1);
}

.link-card:nth-child(1) { animation-delay: 50ms; }
.link-card:nth-child(2) { animation-delay: 100ms; }
.link-card:nth-child(3) { animation-delay: 150ms; }
.link-card:nth-child(4) { animation-delay: 200ms; }

.link-card:hover,
.other-app-card:hover { transform: translateY(-3px) scale(1.006); border-color: rgba(68, 87, 185, 0.2); box-shadow: 0 17px 33px rgba(43, 65, 128, 0.13); }
.link-card:active, .other-app-card:active { transform: translateY(0) scale(0.995); }

.link-icon {
    display: grid;
    width: 52px;
    height: 52px;
    overflow: hidden;
    place-items: center;
    border-radius: 16px;
    border: 1px solid rgba(22, 37, 70, 0.08);
    background: linear-gradient(145deg, #fff, #f5f7fc);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 5px rgba(29, 45, 87, 0.04);
}

.apple-icon { color: #1d1d1f; }
.apple-icon svg { width: 28px; height: 32px; fill: currentColor; }
.play-icon svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 1px rgba(10, 78, 148, 0.1)); }
.chrome-icon svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 1px rgba(10, 78, 148, 0.1)); }
.kaspi-icon { padding: 7px; }
.kaspi-icon img { width: 100%; height: 100%; object-fit: contain; }

.link-text { display: grid; gap: 2px; min-width: 0; }
.link-text > small { color: #778199; font-size: 9px; }
.link-text strong { overflow: hidden; font-size: 15px; letter-spacing: -0.025em; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.link-text em { color: #68748d; font-size: 12px; font-style: normal; font-weight: 500; line-height: 1.4; }
.arrow {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 5px;
    align-items: center;
    color: #8a94aa;
    font-size: 18px;
    font-weight: 600;
    transition: transform 180ms ease;
}
.arrow span { font-family: "DM Mono", monospace; font-size: 9px; text-transform: uppercase; }
.link-card:hover .arrow, .other-app-card:hover .arrow { transform: translate(2px, -2px); }
.other-app { margin-top: 31px; animation: reveal 560ms 250ms both cubic-bezier(0.16, 1, 0.3, 1); }
.eyebrow { display: flex; gap: 9px; align-items: center; margin: 0 0 10px 3px; color: #727d96; text-transform: uppercase; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #b3f26a; box-shadow: 0 0 0 3px rgba(179, 242, 106, 0.27); }

.other-app-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    min-height: 82px;
    padding: 13px 17px 13px 14px;
    border-radius: 20px;
}

.fivek-logo {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(26, 72, 181, 0.2);
}

.other-app-card > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.other-app-card strong { font-size: 14px; letter-spacing: -0.02em; line-height: 1.3; }
.other-app-card small { color: #6e7991; font-size: 11px; font-weight: 500; line-height: 1.38; }

footer { margin: 32px auto 0; color: #7c86a0; text-align: center; animation: reveal 560ms 290ms both cubic-bezier(0.16, 1, 0.3, 1); }
footer p { margin: 0 0 8px; color: #4f5d7d; font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
footer span { font-size: 10px; font-weight: 600; }

.toast {
    position: fixed;
    z-index: 4;
    bottom: 24px;
    left: 50%;
    max-width: calc(100% - 40px);
    margin: 0;
    padding: 11px 16px;
    transform: translate(-50%, 18px);
    opacity: 0;
    pointer-events: none;
    color: #fff;
    border-radius: 99px;
    background: #253255;
    box-shadow: 0 10px 26px rgba(25, 37, 76, 0.24);
    font-size: 12px;
    font-weight: 600;
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible { transform: translate(-50%, 0); opacity: 1; }

@keyframes reveal { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 480px) {
    .page { width: min(100% - 24px, 620px); padding-top: 16px; padding-bottom: 28px; }
    .topbar { margin-bottom: 23px; }
    .avatar-wrap { width: 84px; height: 84px; border-radius: 26px; }
    .avatar { border-radius: 21px; }
    .links { margin-top: 29px; }
    .link-card { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; min-height: 78px; padding: 12px 13px 12px 12px; border-radius: 18px; }
    .link-icon { width: 46px; height: 46px; border-radius: 14px; }
    .link-text strong { font-size: 14px; }
    .link-text em { font-size: 11px; }
    .arrow span { display: none; }
    .other-app-card { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; min-height: 75px; padding: 11px 13px 11px 12px; border-radius: 18px; }
    .fivek-logo { width: 46px; height: 46px; border-radius: 14px; font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
