:root {
    --bg-color: var(--tg-theme-bg-color, #0f0f0f);
    --text-color: var(--tg-theme-text-color, #ffffff);
    --hint-color: var(--tg-theme-hint-color, #a1a1aa);
    --btn-bg: var(--tg-theme-button-color, #27272a);
    --btn-text: var(--tg-theme-button-text-color, #ffffff);

    /* Brand palette */
    --brand-pink:    #FF416C;
    --brand-orange:  #FF4B2B;
    --brand-purple:  #8E2DE2;
    --brand-violet:  #4A00E0;

    /* Story CTA — vivid teal-to-cyan so it pops against the dark bg */
    --story-from:    #00C6FF;
    --story-to:      #0072FF;
    --story-glow:    rgba(0, 114, 255, 0.40);

    --primary-gradient: linear-gradient(135deg, var(--brand-pink) 0%, var(--brand-orange) 100%);
    --premium-gradient: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-violet) 100%);
    --story-gradient:   linear-gradient(135deg, var(--story-from) 0%, var(--story-to) 100%);

    --secondary-bg:  rgba(255, 255, 255, 0.07);
    --border-color:  rgba(255, 255, 255, 0.10);

    --radius-pill: 100px;
    --btn-height:  58px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 44px 20px 32px;
    background-image: radial-gradient(circle at 50% 0%, rgba(0, 114, 255, 0.12), transparent 55%);
    background-attachment: fixed;
}

#app {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Profile Header ─────────────────────────────────────────── */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 36px;
}

.avatar-container {
    width: 100px;
    height: 100px;
    background: var(--secondary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-name {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.profile-bio {
    font-size: 0.975rem;
    color: var(--hint-color);
    line-height: 1.55;
    margin-bottom: 16px;
    max-width: 88%;
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 65, 108, 0.12);
    color: var(--brand-pink);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 65, 108, 0.25);
}

/* ── Buttons Container ──────────────────────────────────────── */
.links-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Base Button ────────────────────────────────────────────── */
.link-btn {
    width: 100%;
    height: var(--btn-height);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    letter-spacing: 0.01em;
    -webkit-user-select: none;
    user-select: none;
}

.link-btn .btn-icon {
    position: absolute;
    left: 22px;
    font-size: 1.2rem;
    line-height: 1;
}

.link-btn .btn-text {
    text-align: center;
}

.link-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* ── Share to Story — highlighted CTA ──────────────────────── */
.link-btn.share-story {
    background: var(--story-gradient);
    color: #ffffff;
    box-shadow: 0 6px 24px var(--story-glow);
    /* Subtle pulse to draw the eye */
    animation: story-pulse 3s ease-in-out infinite;
}

.link-btn.share-story:active {
    box-shadow: 0 2px 10px var(--story-glow);
}

/* Badge "NEW" on the share button */
.btn-badge {
    position: absolute;
    right: 20px;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

@keyframes story-pulse {
    0%, 100% { box-shadow: 0 6px 24px var(--story-glow); }
    50%       { box-shadow: 0 8px 36px rgba(0, 114, 255, 0.55); }
}

/* ── Secondary (ghost) ──────────────────────────────────────── */
.link-btn.secondary {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.link-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.11);
}

/* ── Premium (purple) ───────────────────────────────────────── */
.link-btn.premium {
    background: var(--premium-gradient);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(142, 45, 226, 0.30);
}

/* ── Outline / Close ────────────────────────────────────────── */
.link-btn.outline {
    background: transparent;
    color: var(--hint-color);
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.link-btn.outline:hover {
    color: var(--text-color);
}

/* ── Status & Footer ────────────────────────────────────────── */
.status-message {
    margin-top: 22px;
    text-align: center;
    font-size: 0.875rem;
    min-height: 20px;
    color: var(--hint-color);
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer {
    margin-top: 40px;
    font-size: 0.8rem;
    color: var(--hint-color);
    font-weight: 500;
    opacity: 0.5;
}
