/* 蓝色主题样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f8fa;
    color: #14171a;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background-color: #1DA1F2;
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e1e8ed;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #657786;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #1DA1F2;
}

.btn {
    background-color: #1DA1F2;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0d8bd9;
}

/* 帖子样式 */
.post {
    border-bottom: 1px solid #e1e8ed;
    padding: 20px 0;
}

.post:last-child {
    border-bottom: none;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #1DA1F2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
}

.post-user-info h4 {
    color: #14171a;
    margin-bottom: 4px;
}

.post-user-info span {
    color: #657786;
    font-size: 14px;
}

.post-content {
    margin: 12px 0;
    font-size: 15px;
    line-height: 1.5;
}

.post-actions {
    display: flex;
    gap: 30px;
    margin-top: 12px;
    color: #657786;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.3s;
}

.post-action:hover {
    color: #1DA1F2;
}

/* 评论区 */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.comment {
    display: flex;
    margin-bottom: 16px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #657786;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
}

.comment-content {
    flex: 1;
    background-color: #f5f8fa;
    padding: 12px;
    border-radius: 12px;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 4px;
    color: #14171a;
}

/* 布局 */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 30px;
}

.sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

/* 警告消息 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #657786;
}
/* 原有样式保持不变，添加以下新样式 */

/* ==================== 新增样式 ⭐ ==================== */

/* 导航栏增强 */
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s;
    font-size: 14px;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 消息通知徽章 */
.badge {
    background-color: #e0245e;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* 搜索框 */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 1px solid #e1e8ed;
    border-radius: 24px;
    font-size: 15px;
    background-color: #f5f8fa;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    background-color: white;
    border-color: #1DA1F2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, 0.2);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #657786;
}

/* 关注按钮 */
.follow-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #1DA1F2;
    background-color: white;
    color: #1DA1F2;
}

.follow-btn:hover {
    background-color: rgba(29, 161, 242, 0.1);
}

.follow-btn.following {
    background-color: #1DA1F2;
    color: white;
}

.follow-btn.following:hover {
    background-color: #e0245e;
    border-color: #e0245e;
}

/* 点赞按钮 */
.like-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #657786;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px;
}

.like-btn:hover {
    color: #e0245e;
}

.like-btn.liked {
    color: #e0245e;
}

.like-btn svg {
    width: 18px;
    height: 18px;
}

/* 私信界面 */
.messages-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: calc(100vh - 150px);
}

.conversation-list {
    border-right: 1px solid #e1e8ed;
    overflow-y: auto;
}

.conversation-item {
    padding: 15px;
    border-bottom: 1px solid #e1e8ed;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.conversation-item:hover {
    background-color: #f5f8fa;
}

.conversation-item.active {
    background-color: #e8f5fd;
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #1DA1F2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
}

.unread-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #1DA1F2;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.message-area {
    display: flex;
    flex-direction: column;
}

.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message-sent {
    align-self: flex-end;
    background-color: #1DA1F2;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-received {
    align-self: flex-start;
    background-color: #f5f8fa;
    color: #14171a;
    border-bottom-left-radius: 4px;
}

.message-input {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e1e8ed;
}

/* 搜索结果 */
.search-result {
    padding: 15px;
    border-bottom: 1px solid #e1e8ed;
    transition: background-color 0.3s;
}

.search-result:hover {
    background-color: #f5f8fa;
}

.search-result-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-post {
    padding: 15px;
}

/* 用户统计 */
.user-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-weight: bold;
    color: #14171a;
    font-size: 18px;
}

.stat-label {
    color: #657786;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .messages-container {
        grid-template-columns: 1fr;
    }
    
    .conversation-list {
        border-right: none;
        border-bottom: 1px solid #e1e8ed;
        max-height: 200px;
    }
}