/* ========================================
   personal_center.css - 个人中心页面样式
   风格：简约可爱，延续「鱼你无关」配色
   浅蓝导航 / 粉色高亮 / 奶白背景 / 白色圆角卡片
   ======================================== */

:root {
    --color-nav: #ADD8E6;
    --color-pink: #EE82EE;
    --color-pink-light: rgba(238, 130, 238, 0.15);
    --color-bg-top: #e8f7ff;
    --color-bg-bottom: #ffffe0;
    --color-card: #ffffff;
    --color-text: #333;
    --color-text-light: #888;
    --color-border: #f0e6e6;
    --radius: 18px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* ---- 页面整体 ---- */
body {
    background: linear-gradient(180deg, var(--color-bg-top) 0%, var(--color-bg-bottom) 100%);
    background-attachment: fixed;
    font-family: '微软雅黑', 'Microsoft YaHei', sans-serif;
    color: var(--color-text);
    min-height: 100vh;
}

/* ---- 顶部导航条 ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--color-nav);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    height: 80px;
}

.nav-logo {
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    color: #FAF0E6;
}

.nav-logo a>span {
    font-size: 20px;
    font-weight: bold;
    color: #FAF0E6;
    white-space: nowrap;
}

.nav-logo a>img {
    width: 50px;
    height: 44px;
}

.nav-menu {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu li:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-menu a {
    display: block;
    padding: 6px 14px;
    text-decoration: none;
    color: var(--color-pink);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.nav-menu a:hover {
    background-color: #FFF5EE;
    border-radius: 4px;
}

.logout {
    background-color: antiquewhite;
    border-radius: 5px;
    width: 85px;
    text-align: center;
    flex-shrink: 0;
}

.logout>a {
    display: block;
    width: 100%;
    padding: 6px 0;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

/* ---- 背景装饰气泡 ---- */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubbles span {
    position: absolute;
    bottom: -60px;
    border-radius: 50%;
    background: rgba(173, 216, 230, 0.35);
    animation: rise linear infinite;
}

.bubbles span:nth-child(1) { left: 8%;  width: 36px;  height: 36px;  animation-duration: 14s; }
.bubbles span:nth-child(2) { left: 22%; width: 22px;  height: 22px;  animation-duration: 11s; animation-delay: 2s; }
.bubbles span:nth-child(3) { left: 38%; width: 48px;  height: 48px;  animation-duration: 17s; animation-delay: 4s; }
.bubbles span:nth-child(4) { left: 58%; width: 26px;  height: 26px;  animation-duration: 13s; animation-delay: 1s; }
.bubbles span:nth-child(5) { left: 76%; width: 40px;  height: 40px;  animation-duration: 16s; animation-delay: 3s; }
.bubbles span:nth-child(6) { left: 90%; width: 18px;  height: 18px;  animation-duration: 10s; animation-delay: 5s; }

@keyframes rise {
    0%   { transform: translateY(0); opacity: 0; }
    10%  { opacity: 0.8; }
    100% { transform: translateY(-110vh); opacity: 0; }
}

/* ---- 主体 ---- */
.profile-main {
    position: relative;
    z-index: 1;
    width: 78%;
    max-width: 1100px;
    margin: 110px auto 40px;
}

.card {
    background-color: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 30px;
    border: 2px solid var(--color-border);
}

/* ---- 个人信息大卡片 ---- */
.profile-card {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.avatar-wrap {
    flex-shrink: 0;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-pink);
    box-shadow: 0 4px 16px rgba(238, 130, 238, 0.35);
    animation: swim 3.5s ease-in-out infinite;
    cursor: pointer;
}

@keyframes swim {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-8px) rotate(2deg); }
}

.profile-info {
    flex: 1;
    min-width: 220px;
}

.nickname {
    font-size: 26px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    font-size: 12px;
    color: #fff;
    background: linear-gradient(135deg, #EE82EE, #FFB6C1);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: normal;
}

.signature {
    margin: 10px 0 16px;
    color: var(--color-text-light);
    font-size: 15px;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: '微软雅黑', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #EE82EE, #DDA0DD);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(238, 130, 238, 0.4);
}

.btn-ghost {
    background: var(--color-pink-light);
    color: var(--color-pink);
}

.btn-ghost:hover {
    background: rgba(238, 130, 238, 0.3);
}

/* 统计数字 */
.profile-stats {
    display: flex;
    gap: 34px;
    flex-shrink: 0;
    padding-left: 20px;
    border-left: 2px dashed var(--color-border);
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-pink);
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 2px;
}

/* ---- 下方两栏 ---- */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    margin-top: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.card-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 46px;
    height: 2px;
    background: var(--color-pink);
}

/* 资料列表 */
.info-list li {
    display: flex;
    padding: 11px 0;
    border-bottom: 1px dashed var(--color-border);
    font-size: 15px;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-key {
    width: 90px;
    flex-shrink: 0;
    color: var(--color-text-light);
}

.info-val {
    color: var(--color-text);
}

/* 兴趣标签 */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #e8f7ff;
    color: #4a9fd4;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.tag:hover {
    background: var(--color-pink);
    color: #fff;
    transform: translateY(-3px);
}

/* 我的兴趣：修改按钮 + 内联编辑 */
.tag-edit-btn {
    float: right;
    border: none;
    background: var(--color-pink-light);
    color: var(--color-pink);
    border-radius: 12px;
    padding: 3px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tag-edit-btn:hover {
    background: var(--color-pink);
    color: #fff;
}

#tag_edit_area {
    margin-top: 12px;
}

#tag_input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#tag_input:focus {
    border-color: var(--color-pink);
}

.tag-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.tag-edit-actions .btn {
    padding: 6px 20px;
    font-size: 13px;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.tag-edit-actions .btn:hover {
    transform: translateY(-1px);
}

.tag-edit-actions #tag_save_btn {
    background: linear-gradient(135deg, #EE82EE, #ADD8E6);
    color: #fff;
    font-weight: 600;
}

.tag-edit-actions #tag_cancel_btn {
    background: #f0f0f0;
    color: #666;
}

.tag-empty {
    background: #f5f5f5;
    color: #aaa;
    cursor: default;
}

.tag-empty:hover {
    background: #f5f5f5;
    color: #aaa;
    transform: none;
}

/* 最近动态 */
.recent-card {
    margin-top: 20px;
}

.recent-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    font-size: 14px;
    color: var(--color-text);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EE82EE, #ADD8E6);
    flex-shrink: 0;
}

/* ---- 个人博客板块 ---- */
.blog-card {
    margin-top: 20px;
}

.blog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-head .card-title {
    margin-bottom: 0;
}

.blog-more {
    font-size: 13px;
    color: var(--color-pink);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-more:hover {
    color: #d15ed1;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 18px;
}

.blog-item {
    border: 2px solid var(--color-border);
    border-radius: 14px;
    padding: 18px 20px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.blog-item:hover {
    transform: translateY(-4px);
    border-color: var(--color-pink);
    box-shadow: 0 8px 20px rgba(238, 130, 238, 0.18);
}

.blog-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.blog-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}

.blog-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: var(--color-pink);
}

.blog-tag {
    flex-shrink: 0;
    font-size: 12px;
    color: #4a9fd4;
    background: #e8f7ff;
    padding: 2px 12px;
    border-radius: 20px;
    margin-top: 2px;
}

.blog-summary {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 10px 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-light);
}

.blog-empty {
    margin-top: 18px;
    padding: 40px 0;
    text-align: center;
    font-size: 15px;
    color: var(--color-text-light);
    border: 2px dashed var(--color-border);
    border-radius: 14px;
}

/* ---- 页面底部 ---- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed var(--color-border);
}

.pagination a,
.page-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
}

.pagination a {
    color: var(--color-pink);
    background: var(--color-pink-light);
    border: 1px solid rgba(238, 130, 238, 0.22);
    transition: transform 0.2s, background 0.2s, color 0.2s;
}

.pagination a:hover,
.pagination a:focus {
    color: #fff;
    background: var(--color-pink);
    transform: translateY(-1px);
}

.page-info {
    color: #4a9fd4;
    background: var(--color-bg-top);
}

footer {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: linear-gradient(90deg, #FFB6C1, #FF1493);
    color: #fff;
    font-size: 14px;
    letter-spacing: 2px;
}

/* ---- 响应式 ---- */
@media screen and (max-width: 860px) {
    .profile-main {
        width: 92%;
        margin-top: 100px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        border-left: none;
        border-top: 2px dashed var(--color-border);
        padding-left: 0;
        padding-top: 16px;
        width: 100%;
        justify-content: space-around;
    }

    .nav-menu a {
        padding: 6px 8px;
        font-size: 13px;
    }
}
