/* 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, "Microsoft YaHei", sans-serif;

    /* 渐变背景 */
    background: linear-gradient(
            135deg,
            #667eea,
            #764ba2
    );

    min-height: 100vh;

    color: #333;
}


/* 主容器 */
.container {
    width: 90%;
    max-width: 700px;

    margin: 0 auto;
    padding: 60px 0;
}


/* 头部 */
header {
    text-align: center;
    color: white;

    margin-bottom: 30px;
}


/* 头像 */
.avatar {
    width: 90px;
    height: 90px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: white;
    color: #667eea;

    font-size: 40px;
    font-weight: bold;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}


h1 {
    font-size: 36px;
    margin-bottom: 10px;
}


.subtitle {
    font-size: 18px;
    opacity: 0.9;
}


/* 卡片 */
.card {
    background: rgba(255, 255, 255, 0.95);

    padding: 30px;

    margin-bottom: 20px;

    border-radius: 18px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}


.card h2 {
    margin-bottom: 15px;

    color: #555;
}


.card p {
    line-height: 1.8;

    color: #666;
}


/* 按钮 */
button {
    margin-top: 20px;

    padding: 12px 24px;

    border: none;
    border-radius: 25px;

    background: #667eea;
    color: white;

    font-size: 15px;

    cursor: pointer;

    transition: 0.3s;
}


button:hover {
    background: #5568d8;

    transform: translateY(-2px);
}


/* 技能标签 */
.skills {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}


.skills span {
    padding: 8px 15px;

    background: #f0f2ff;

    color: #667eea;

    border-radius: 20px;

    font-size: 14px;
}



/* 隐藏内容 */
.hidden {
    display: none;
}


/* 底部 */
footer {
    text-align: center;

    color: white;

    font-size: 14px;

    opacity: 0.8;

    margin-top: 30px;
}


/* 手机端适配 */
@media (max-width: 600px) {

    .container {
        padding: 40px 0;
    }

    h1 {
        font-size: 28px;
    }

    .card {
        padding: 22px;
    }

}

/* 留言板（本地预览版） */
.guestbook .guestbook-note {
    font-size: 14px;

    color: #8b90ad;

    margin-bottom: 16px;
}


.guestbook-form {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


.guestbook-form input,
.guestbook-form textarea {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #e0e2f0;
    border-radius: 12px;

    background: #fafbff;

    color: #333;

    font-family: inherit;
    font-size: 15px;

    resize: vertical;
}


.guestbook-form input:focus,
.guestbook-form textarea:focus {
    outline: none;

    border-color: #667eea;

    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}


.guestbook-form button {
    align-self: flex-start;

    margin-top: 0;
}


.guestbook-form .guestbook-status {
    min-height: 20px;

    font-size: 13px;

    color: #667eea;
}


.guestbook-list {
    list-style: none;

    margin-top: 20px;

    display: flex;
    flex-direction: column;

    gap: 12px;
}


.guestbook-item {
    padding: 14px 16px;

    background: #f7f8ff;

    border-left: 3px solid #667eea;
    border-radius: 12px;
}


.guestbook-head {
    display: flex;

    justify-content: space-between;
    align-items: baseline;

    gap: 10px;

    margin-bottom: 6px;
}


.guestbook-author {
    font-size: 14px;
    font-weight: bold;

    color: #5568d8;
}


.guestbook-time {
    font-size: 12px;

    color: #9aa0bf;
}


.guestbook .guestbook-content {
    font-size: 15px;

    line-height: 1.7;

    color: #555;

    white-space: pre-wrap;
    word-break: break-word;
}


.guestbook .guestbook-empty {
    margin-top: 20px;

    font-size: 14px;

    color: #9aa0bf;
}

/* ===== 支持我按钮 ===== */
.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.support-count {
    display: inline-grid;
    place-items: center;

    min-width: 46px;
    height: 26px;
    padding: 0 10px;

    border-radius: 13px;
    background: rgba(255, 255, 255, 0.28);

    font-size: 15px;
    font-weight: bold;
    line-height: 1;

    /* 让数字"翻出"胶囊外时被裁掉，形成滚动效果 */
    overflow: hidden;
}

/* 新旧数字重叠在同一格 */
.support-count .count-num {
    grid-area: 1 / 1;
    display: block;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    will-change: transform, opacity;
}

/* 旧数字：上移 + 淡出 */
.support-count .count-num-out {
    animation: countOut 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 新数字：从下方进入 */
.support-count .count-num-in {
    animation: countIn 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes countOut {
    from { transform: translateY(0);     opacity: 1; }
    to   { transform: translateY(-100%); opacity: 0; }
}

@keyframes countIn {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* 状态小提示 */
.support-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #8b90ad;
}