/* OSANIME Apps — clean standalone Linktree layout */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body.apps-standalone-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(131, 56, 236, .16), transparent 28%),
        radial-gradient(circle at top right, rgba(240, 75, 145, .1), transparent 22%),
        linear-gradient(180deg, #050b18 0%, #040915 100%);
    color: #f8fafc;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.apps-shell {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px 40px;
}

.apps-linktree {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: clamp(14px, 2.5vh, 28px) 0 28px;
}

.apps-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
    color: #98a6bd;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}
.apps-back-link:hover { color: #f4c4db; }

.apps-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto 28px;
}

.apps-profile-logo {
    position: relative;
    width: 110px;
    height: 110px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    padding: 4px;
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(255,91,157,.95) 0%, rgba(147,88,246,.95) 58%, rgba(71,124,245,.95) 100%);
    box-shadow: 0 16px 40px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.08);
}

.apps-profile-logo::after {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 42px;
    background: radial-gradient(circle, rgba(164,102,255,.18), transparent 65%);
    z-index: 0;
}

.apps-profile-logo-core {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(10,18,33,.92), rgba(14,23,40,.96));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(255,255,255,.06);
}

.apps-profile-logo-core img {
    width: 84%;
    height: 84%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.22));
}

.apps-profile-logo-core span {
    color: #fff;
    font-size: 60px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.11em;
    transform: translate(-4px, -1px);
}

.apps-profile-logo-core i {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid rgba(255,255,255,.95);
}

.apps-profile h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 6vw, 40px);
    line-height: 1.06;
    font-weight: 950;
    letter-spacing: -.03em;
}
.apps-profile p { margin: 10px 0 0; color: #99a8bf; font-size: 15px; line-height: 1.5; }

.apps-link-list { display: grid; gap: 14px; }

.apps-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 80px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(19,29,49,.98), rgba(15,24,41,.98));
    box-shadow: 0 12px 28px rgba(0,0,0,.16);
    color: #f8fafc;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
a.apps-link:hover {
    transform: translateY(-2px);
    border-color: rgba(240,75,145,.35);
    background: linear-gradient(180deg, rgba(24,36,60,.99), rgba(18,28,48,.99));
    box-shadow: 0 16px 34px rgba(0,0,0,.24);
}
.apps-link.is-disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }

.apps-link-icon {
    position: relative;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
}

.apps-link-icon-image {
    padding: 6px;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}

.apps-link-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.apps-icon-telegram-custom {
    padding: 6px;
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
    box-shadow: none;
}
.apps-icon-telegram-custom img {
    width: 84%;
    height: 84%;
    object-fit: contain;
    filter: none;
}

.apps-link-glyph {
    display: block;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.02em;
}

.apps-icon-android .apps-link-glyph { color: #9fe4aa; }
.apps-icon-windows .apps-link-glyph { color: #8fc9ff; }
.apps-icon-store .apps-link-glyph { color: #d4b8ff; }
.apps-icon-rustore .apps-link-glyph { color: #ffb5ca; }

.apps-link-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.apps-link-copy strong { color: #f8fafc; font-size: 13px; line-height: 1.35; font-weight: 850; }
.apps-link-copy small { color: #9eabc0; font-size: 11px; line-height: 1.45; }

.apps-version-chip {
    flex: 0 0 auto;
    max-width: 88px;
    overflow: hidden;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    color: #c8d3e4;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.apps-link-action {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(240,75,145,.2), rgba(139,92,246,.16));
    color: #ffd2e7;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 5px 14px rgba(0,0,0,.14);
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.apps-link-action svg {
    width: 21px;
    height: 21px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.apps-action-download {
    color: #ffd3e7;
    background: linear-gradient(145deg, rgba(240,75,145,.28), rgba(191,75,170,.16));
}
.apps-action-visit {
    color: #d9c6ff;
    background: linear-gradient(145deg, rgba(139,92,246,.24), rgba(77,125,245,.16));
}
a.apps-link:hover .apps-link-action {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(255,255,255,.2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 18px rgba(0,0,0,.2);
}
.apps-icon-telegram {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
    box-shadow: none;
}
.apps-icon-telegram svg {
    width: 24px;
    height: 24px;
    fill: #29a9ea;
    display: block;
    transform: translateX(-1px);
}
.apps-link-telegram:hover { border-color: rgba(240,75,145,.35); }

.apps-linktree-footer { margin-top: 22px; text-align: center; }
.apps-linktree-footer p { margin: 0; color: #728198; font-size: 11px; font-weight: 700; letter-spacing: .03em; }

@media (max-width: 600px) {
    .apps-shell { padding: 18px 12px 30px; }
    .apps-linktree { width: min(100%, 520px); padding-top: 8px; }
    .apps-profile-logo { width: 96px; height: 96px; border-radius: 28px; }
    .apps-profile-logo-core { border-radius: 24px; }
    .apps-profile-logo-core span { font-size: 52px; }
    .apps-link { min-height: 76px; gap: 12px; padding: 12px 13px; }
    .apps-link-icon { flex-basis: 46px; width: 46px; height: 46px; border-radius: 14px; }
    .apps-icon-telegram-custom { padding: 5px; }
    .apps-link-glyph { font-size: 13px; }
    .apps-link-copy strong { font-size: 12px; }
    .apps-link-copy small { font-size: 10px; }
    .apps-link-action { flex-basis: 38px; width: 38px; height: 38px; border-radius: 12px; }
    .apps-link-action svg { width: 19px; height: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .apps-link { transition: none !important; }
    a.apps-link:hover { transform: none !important; }
}
