/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0e1a;
    overflow: hidden;
    padding: 20px;
    position: relative;
}

/* ===== 星空背景（深色渐变 + 星星由 JS 生成） ===== */
.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('your-bg.jpg') center/cover no-repeat fixed;
    /* 可更换为图片： background: url('your-bg.jpg') center/cover no-repeat fixed; */
}

/* 星星容器（由 JS 填充） */
#stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* 每颗星星 */
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite alternate;
    opacity: 0.3;
}

@keyframes twinkle {
    0%   { opacity: 0.2; transform: scale(0.8); }
    100% { opacity: 1;   transform: scale(1.2); }
}

/* ===== 名片卡片（高度透明玻璃） ===== */
.card {
    position: relative;
    z-index: 1;
    max-width: 440px;
    width: 100%;
    padding: 44px 40px 38px;
    background: rgba(0, 0, 0, 0.11);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease;
    animation: cardIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px) scale(0.96);
}

.card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 卡片顶部装饰光晕 */
.card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 32px;
    padding: 1px;
    background: conic-gradient(from 120deg at 50% 0%,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 30%,
            rgba(255, 255, 255, 0.02) 50%,
            transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ===== 头像（图片 + 发光效果） ===== */
.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 20px;
    /* ===== 重要：将下面的 your-avatar.jpg 换成你的图片文件名 ===== */
    background: url('avatar.jpg') center/cover no-repeat;
    /* 隐藏原来的文字（如果图片加载失败，会显示白色背景） */
    text-indent: -9999px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    /* 发光效果（自动保留） */
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5),
                0 0 60px rgba(124, 58, 237, 0.3);
    animation: glowPulse 3s ease-in-out infinite alternate;
    transition: transform 0.3s ease;
}

/* 头像呼吸发光动画 */
@keyframes glowPulse {
    0%   { box-shadow: 0 0 20px rgba(79, 70, 229, 0.4), 0 0 40px rgba(124, 58, 237, 0.2); }
    100% { box-shadow: 0 0 40px rgba(79, 70, 229, 0.8), 0 0 80px rgba(124, 58, 237, 0.5); }
}

.card:hover .avatar {
    transform: scale(1.04);
}

/* ===== 文字内容 ===== */
.name {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 4px;
}

.title {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}

.bio {
    font-size: 14.5px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto 22px;
    letter-spacing: 0.01em;
}

.divider {
    width: 48px;
    height: 2px;
    margin: 0 auto 22px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 2px;
}

/* ===== 社交按钮 ===== */
.socials {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.social-link:active {
    transform: scale(0.94);
}

/* 各平台悬停颜色 */
.social-link--twitter:hover {
    background: rgba(29, 161, 242, 0.2);
    color: #1da1f2;
    border-color: rgba(29, 161, 242, 0.25);
}
.social-link--email:hover {
    background: rgba(234, 67, 53, 0.15);
    color: #ea4335;
    border-color: rgba(234, 67, 53, 0.2);
}
.social-link--telegram:hover {
    background: rgba(0, 136, 204, 0.2);
    color: #28a9e0;
    border-color: rgba(0, 136, 204, 0.25);
}

/* ===== 联系按钮 ===== */
.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 34px;
    border-radius: 60px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.btn-contact:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.btn-contact:active {
    transform: scale(0.96);
}

.btn-contact .icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-contact:hover .icon {
    transform: translateX(2px) scale(1.05);
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 28px;
    border-radius: 60px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 520px) {
    .card {
        padding: 32px 22px 30px;
        border-radius: 24px;
    }
    .avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
        background-size: cover; /* 确保小屏也正常 */
    }
    .name {
        font-size: 22px;
    }
    .title {
        font-size: 13px;
    }
    .bio {
        font-size: 13px;
        padding: 0 4px;
    }
    .social-link {
        width: 42px;
        height: 42px;
        font-size: 18px;
        border-radius: 12px;
    }
    .socials {
        gap: 10px;
    }
    .btn-contact {
        padding: 10px 26px;
        font-size: 14px;
    }
    .toast {
        font-size: 13px;
        padding: 10px 20px;
        white-space: normal;
        max-width: 80%;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .card {
        padding: 24px 16px 24px;
    }
    .avatar {
        width: 68px;
        height: 68px;
    }
    .name {
        font-size: 19px;
    }
    .bio {
        font-size: 12px;
    }
    .social-link {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}
