/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff2442;
    --primary-hover: #e02040;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --bg-primary: #fff;
    --bg-secondary: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 32px;
}

.search-box {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav a {
    font-size: 15px;
    color: var(--text-secondary);
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--primary-color);
    background: rgba(255, 36, 66, 0.1);
}

.nav a.active {
    color: var(--primary-color);
    font-weight: 500;
}

.publish-btn {
    background: var(--primary-color) !important;
    color: white !important;
}

.publish-btn:hover {
    background: var(--primary-hover) !important;
}

.user-actions {
    flex-shrink: 0;
    margin-left: auto;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-actions .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.btn-login {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
}

/* 标签导航 */
.tags-nav {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    overflow-x: auto;
}

.tags-nav a {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.3s;
}

.tags-nav a:hover,
.tags-nav a.active {
    background: var(--primary-color);
    color: white;
}

/* 瀑布流布局 */
.waterfall {
    column-count: 5;
    column-gap: 16px;
}

@media (max-width: 1200px) {
    .waterfall { column-count: 4; }
}

@media (max-width: 992px) {
    .waterfall { column-count: 3; }
}

@media (max-width: 768px) {
    .waterfall { column-count: 2; }
    .search-box { display: none; }
}

@media (max-width: 480px) {
    .waterfall { column-count: 2; column-gap: 10px; }
}

/* 笔记卡片 */
.note-card {
    break-inside: avoid;
    margin-bottom: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.note-card .cover {
    width: 100%;
    display: block;
}

.cover-container {
    position: relative;
    overflow: hidden;
}

.media-type-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.media-type-indicator:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 0;
}

.cover-container:hover .cover-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.cover-overlay i {
    color: white;
    font-size: 24px;
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-radius: 50%;
}

.cover-container:hover .cover-overlay i {
    opacity: 1;
    transform: scale(1.1);
}

.note-card .content {
    padding: 12px;
}

.note-card .title {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card .author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-card .author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.note-card .author span {
    font-size: 12px;
    color: var(--text-light);
}

.note-card .actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.note-card .actions button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.note-card .actions button:hover {
    color: var(--primary-color);
}

.note-card .actions button.liked {
    color: var(--primary-color);
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 40px 0;
}

.btn-load {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 12px 40px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-load:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal .close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.auth-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content.hidden {
    display: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: var(--primary-hover);
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    background: var(--bg-primary);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: var(--primary-color);
    color: white;
}

/* 笔记详情页 */
.note-detail {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    padding: 20px 0;
}

@media (max-width: 992px) {
    .note-detail {
        grid-template-columns: 1fr;
    }
}

.note-images {
    background: var(--bg-primary);
    border-radius: var(--radius);
    overflow: hidden;
}

.note-images img {
    width: 100%;
    display: block;
}

.note-info {
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 20px;
}

.note-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.note-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.note-author .info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.note-author .info p {
    font-size: 13px;
    color: var(--text-light);
}

.note-author .follow-btn {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.note-author .follow-btn.following {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.note-content h1 {
    font-size: 20px;
    margin-bottom: 12px;
}

.note-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.note-tags span {
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--primary-color);
}

.note-stats {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.note-stats span {
    font-size: 14px;
    color: var(--text-light);
}

.note-actions-bar {
    display: flex;
    gap: 12px;
}

.note-actions-bar button {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.note-actions-bar button:hover,
.note-actions-bar button.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 评论区 */
.comments-section {
    margin-top: 20px;
}

.comments-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.comment-input {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-input img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-input .input-wrapper {
    flex: 1;
    display: flex;
    gap: 10px;
}

.comment-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
}

.comment-input button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-item .content {
    flex: 1;
}

.comment-item .author {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.comment-item .text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.comment-item .meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
}

.comment-item .meta button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
}

/* 个人主页 */
.profile-header {
    background: var(--bg-primary);
    padding: 40px 0;
    margin-bottom: 20px;
}

.profile-header .container {
    display: flex;
    gap: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.profile-info .username {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
}

.profile-info .bio {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 16px;
}

.profile-stats span {
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-stats strong {
    color: var(--text-primary);
    margin-right: 4px;
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.profile-actions button {
    padding: 10px 30px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.profile-actions .btn-primary {
    background: var(--primary-color);
    color: white;
}

.profile-actions .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.profile-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.profile-tabs a {
    padding: 12px 0;
    font-size: 15px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.profile-tabs a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 发布页面 */
.publish-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 30px;
}

.publish-form h2 {
    margin-bottom: 24px;
}

.image-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.image-upload:hover {
    border-color: var(--primary-color);
}

.image-upload i {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.image-upload p {
    color: var(--text-light);
}

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.uploaded-images .image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.uploaded-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-images .remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
}

.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
    outline: none;
}

.form-group textarea:focus {
    border-color: var(--primary-color);
}

.tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.tag-input input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 100px;
}

.tag-item {
    background: var(--bg-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-item .remove {
    cursor: pointer;
    color: var(--text-light);
}

.btn-publish {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-publish:hover {
    background: var(--primary-hover);
}

/* 消息通知 */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.notification-item.unread {
    background: #fff5f5;
}

.notification-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.notification-item .content {
    flex: 1;
}

.notification-item .text {
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-item .time {
    font-size: 12px;
    color: var(--text-light);
}

/* 搜索页面 */
.search-results {
    padding: 20px 0;
}

.search-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.search-tabs a {
    padding: 12px 0;
    font-size: 15px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
}

.search-tabs a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-light);
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 隐藏 */
.hidden {
    display: none !important;
}

/* 验证码相关样式 */
.captcha-group {
    margin-bottom: 16px;
}

.captcha-input {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
}

.captcha-input img {
    width: 120px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.captcha-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    display: block;
}

/* 邮箱验证码输入 */
.email-code-group {
    margin-bottom: 16px;
}

.email-code-input {
    display: flex;
    gap: 12px;
}

.email-code-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    letter-spacing: 2px;
}

.btn-send-code {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
    min-width: 120px;
}

.btn-send-code:hover {
    background: var(--primary-hover);
}

.btn-send-code:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.btn-send-code.countdown {
    background: var(--text-light);
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 忘记密码页面 */
#forgotPasswordTab h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-primary);
}

.back-to-login {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.back-to-login:hover {
    text-decoration: underline;
}

/* 登录弹窗增强 */
.modal-content {
    max-width: 420px;
    width: 90%;
}

.modal-content .form-group {
    margin-bottom: 16px;
}

.modal-content .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.modal-content .form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.modal-content .btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 8px;
}

.modal-content .btn-submit:hover {
    background: var(--primary-hover);
}

/* 用户操作区域包装器 */
.user-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.notification-icon {
    position: relative;
    font-size: 20px;
    color: var(--text-secondary);
    padding: 8px;
}

.notification-icon:hover {
    color: var(--primary-color);
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.user-menu-trigger:hover {
    background: var(--bg-secondary);
}

.user-menu-trigger .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-trigger .nickname {
    font-size: 14px;
    color: var(--text-primary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-trigger .fa-chevron-down {
    font-size: 12px;
    color: var(--text-light);
    transition: transform 0.3s;
}

.user-menu-trigger:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.message-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    animation: pulse 2s infinite;
}

/* 下拉菜单 */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 240px;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
    margin-top: 8px;
}

/* 创建一个透明的桥接区域，覆盖触发器和菜单之间的间隙 */
.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

/* 下拉菜单显示控制 - 使用JS控制 */
.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* 下拉菜单头部 */
.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b7a 100%);
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-nickname {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.dropdown-uid {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

/* 分隔线 */
.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* 下拉菜单项 */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
    position: relative;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

.dropdown-item span {
    font-size: 14px;
}

.dropdown-item.logout-item {
    color: var(--primary-color);
}

.dropdown-item.logout-item i {
    color: var(--primary-color);
}

/* 未读消息标记 */
.unread-badge {
    position: absolute;
    right: 16px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* 涟漪动画效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.user-menu-trigger::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255,36,66,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.user-menu-trigger:hover::after {
    animation: ripple 0.6s ease-out;
}
