:root {
    color-scheme: light;
    --tg-blue: #1688e8;
    --tg-blue-dark: #0875d1;
    --tg-ink: #101a35;
    --tg-muted: #68748b;
    --tg-page: #f2f5fa;
}

html {
    min-height: 100%;
    background: var(--tg-page);
    scroll-behavior: smooth;
}

body.telegram-davet-body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at 50% 0%, #ffffff 0, #f6f8fc 42%, #eef2f8 100%);
    color: var(--tg-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.telegram-davet-body * {
    box-sizing: border-box;
}

.tg-page {
    width: 100%;
    min-height: 100vh;
    padding: clamp(14px, 3.5vw, 34px) 14px 40px;
}

.tg-shell {
    width: min(100%, 560px);
    margin: 0 auto;
}

.tg-card {
    overflow: hidden;
    width: 100%;
    padding: clamp(12px, 3vw, 22px);
    border: 1px solid rgba(20, 42, 79, 0.07);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(22, 43, 78, 0.09);
}

.tg-hero,
.tg-instructions {
    margin: 0;
    padding: 0;
}

.tg-hero {
    display: flex;
    justify-content: center;
    width: 100%;
}

.tg-hero-gif {
    display: block;
    width: min(100%, 426px);
    height: auto;
    margin: 0 auto;
    border-radius: 17px;
    object-fit: contain;
}

.tg-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.tg-action-top {
    margin: 18px 0 24px;
}

.tg-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    min-height: 56px;
    padding: 14px 20px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #2298f1 0%, #0879da 100%);
    box-shadow: 0 8px 18px rgba(18, 128, 223, 0.22);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
    -webkit-tap-highlight-color: transparent;
}

.tg-copy-button:hover {
    background: linear-gradient(135deg, #168ce8 0%, #066ec9 100%);
    box-shadow: 0 10px 22px rgba(18, 128, 223, 0.28);
}

.tg-copy-button:active {
    transform: translateY(1px) scale(0.99);
}

.tg-copy-button:focus-visible,
.tg-go-link:focus-visible {
    outline: 3px solid rgba(22, 136, 232, 0.35);
    outline-offset: 3px;
}

.tg-copy-button svg {
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tg-instructions {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 13px;
    background: #fff;
}

.tg-instructions-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border: 0;
    border-radius: 13px;
}

.tg-action-bottom {
    margin: 20px 0 2px;
}

.tg-go-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 28px;
    color: #69758b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tg-go-link:hover {
    color: var(--tg-blue-dark);
}

.tg-copy-status {
    min-height: 20px;
    margin: 8px 0 0;
    color: #12804a;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    text-align: center;
}

.tg-copy-status:empty {
    display: none;
}

@media (max-width: 420px) {
    .tg-page {
        padding: 9px 8px 26px;
    }

    .tg-card {
        padding: 10px;
        border-radius: 19px;
    }

    .tg-copy-button {
        min-height: 53px;
        padding: 13px 12px;
        font-size: 15px;
    }

    .tg-action-top {
        margin: 14px 0 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .tg-copy-button {
        transition: none;
    }
}
