/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.top-nav {
    background-color: white;
    border-bottom: 1px solid #e1e8ed;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1da1f2;
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 0px;
    margin-left: 0px;
    object-fit: contain;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
    color: #1da1f2;
}

.nav-center {
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    padding-right: 36px;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    background-color: #f5f8fa;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

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

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #657786;
    cursor: pointer;
    padding: 4px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-features {
    display: flex;
    gap: 10px;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    background-color: white;
    color: #1da1f2;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-button:hover {
    background-color: #f5f8fa;
    border-color: #1da1f2;
}

.nav-badge {
    background-color: #e0245e;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* 导航标签页 */
.nav-tabs {
    background-color: white;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #e1e8ed;
    padding: 0 20px;
}

.nav-tab {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 16px;
    color: #657786;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.nav-tab:hover {
    color: #1da1f2;
    background-color: #f5f8fa;
}

.nav-tab.active {
    color: #1da1f2;
    font-weight: bold;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 25%;
    width: 50%;
    height: 3px;
    background-color: #1da1f2;
    border-radius: 3px 3px 0 0;
}

/* 主内容区域 */
.main-container {
    display: flex;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    gap: 20px;
    padding: 20px;
    flex: 1;
}

/* 已点赞状态样式 */
.message-action.liked {
    color: #e0245e;
}

/* 认为很棒状态样式 */
.message-action.thought-great {
    color: #e74c3c;
}

/* 现代化点赞按钮设计 */
.message-action.think-great-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 1px solid #e0e0e0;
    cursor: pointer;
    color: #555;
    font-size: 10px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.think-great-button:hover {
    color: #3498db;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.think-great-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 已点赞状态特殊样式 */
.think-great-button.thought-great {
    color: #fff;
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.think-great-button.thought-great:hover {
    background: linear-gradient(145deg, #c0392b, #e74c3c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* 点赞计数样式 */
.think-great-count {
    font-weight: 600;
    position: relative;
    transition: transform 0.3s ease;
}

/* 点赞动画效果 */
@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.think-great-button.thought-great .think-great-count {
    animation: likeAnimation 0.3s ease;
}

/* 点赞用户显示样式 - 现代化设计 */
.latest-likers {
    margin-top: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    display: flex; /* 默认显示 */
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.latest-likers:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.liker-item {
    display: inline;
    color: #3498db;
    font-weight: 500;
    transition: color 0.2s ease;
}

.liker-item:hover {
    color: #2980b9;
    text-decoration: underline;
}

.liker-separator {
    margin: 0 6px;
    color: #aaa;
    font-size: 14px;
}

/* 侧边栏通用样式 */
.left-sidebar,
.right-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-section {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sidebar-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.sidebar-item:hover {
    background-color: #f5f8fa;
    color: #1da1f2;
}

.sidebar-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-text {
    font-size: 15px;
}

/* 中间内容区 */
.content-area {
    flex: 1;
    max-width: 600px;
}

.welcome-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.welcome-text {
    font-size: 18px;
    color: #333;
    margin: 0;
}

/* 发布框 */
.post-box {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.post-textarea {
    flex: 1;
    min-height: 80px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.post-textarea:focus {
    border-color: #1da1f2;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e1e8ed;
}

.post-actions {
    display: flex;
    gap: 12px;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    background-color: white;
    color: #657786;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-button:hover {
    background-color: #f5f8fa;
    border-color: #1da1f2;
    color: #1da1f2;
}

.submit-post-button {
    padding: 8px 20px;
    background-color: #1da1f2;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-post-button:hover {
    background-color: #0d95e8;
}

.submit-post-button.disabled {
    background-color: #ccd6dd;
    color: #657786;
    cursor: not-allowed;
}

.submit-post-button.disabled:hover {
    background-color: #ccd6dd;
}

/* 留言板 */
.message-board {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.board-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e8ed;
}

.board-title {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.message-form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.message-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.message-form input:focus {
    border-color: #1da1f2;
}

.submit-message-button {
    padding: 10px 20px;
    background-color: #1da1f2;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-message-button:hover {
    background-color: #0d95e8;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    padding: 16px;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    transition: all 0.3s;
}

.message-item:hover {
    border-color: #1da1f2;
    box-shadow: 0 1px 3px rgba(29, 161, 242, 0.1);
}

.message-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.message-username {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.message-time {
    color: #999;
    font-size: 12px;
}

.message-content {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.message-actions {
    display: flex;
    gap: 20px;
}

.message-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border: none;
    background: none;
    color: #657786;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s;
}

.message-action:hover {
    color: #1da1f2;
}

.no-messages {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 15px;
}

/* 卡片样式 */
.featured-card,
.quote-card {
    background-color: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid #e1e8ed;
}

.card-title {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.card-content {
    padding: 16px;
}

/* 精选内容 */
.new-year-message {
    text-align: center;
    color: #333;
}

.new-year-message p {
    margin: 8px 0;
    font-size: 15px;
}

/* 引用卡片 */
.quote-text {
    font-size: 18px;
    font-weight: normal;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
}

.quote-author {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

.quote-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 右侧边栏内容 */
.hot-topics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-topic {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.hot-topic:hover {
    background-color: #f5f8fa;
}

.topic-rank {
    width: 24px;
    height: 24px;
    background-color: #e0245e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.hot-topic:nth-child(2) .topic-rank {
    background-color: #f39c12;
}

.hot-topic:nth-child(3) .topic-rank {
    background-color: #16a085;
}

.hot-topic:nth-child(n+4) .topic-rank {
    background-color: #95a5a6;
}

.topic-info {
    flex: 1;
    min-width: 0;
}

.topic-title {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-count {
    font-size: 12px;
    color: #999;
}

/* 推荐关注 */
.recommended-users {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommended-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.recommended-user .user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-desc {
    font-size: 12px;
    color: #999;
}

.follow-button {
    padding: 6px 16px;
    background-color: white;
    color: #1da1f2;
    border: 1px solid #1da1f2;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.follow-button:hover {
    background-color: #f5f8fa;
}

/* 用户头像和按钮 */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #e1e8ed;
    transition: all 0.3s;
    object-fit: cover;
}

.user-avatar:hover {
    border-color: #1da1f2;
    transform: scale(1.05);
}

.login-button,
.account-button {
    padding: 8px 20px;
    background-color: #1da1f2;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-button:hover,
.account-button:hover {
    background-color: #0d95e8;
}

/* 页脚 */
.site-footer {
    background-color: white;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e1e8ed;
    margin-top: auto;
}

.site-footer p {
    margin: 0;
    color: #657786;
    font-size: 14px;
}

.site-footer a {
    color: #1da1f2;
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: #0d95e8;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e1e8ed;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #657786;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-modal:hover {
    background-color: #f5f8fa;
    color: #333;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.modal-textarea {
    width: 100%;
    min-height: 200px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.modal-textarea:focus {
    border-color: #1da1f2;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e1e8ed;
}

.cancel-button {
    padding: 8px 20px;
    background-color: white;
    color: #657786;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-button:hover {
    background-color: #f5f8fa;
}

.confirm-button {
    padding: 8px 20px;
    background-color: #1da1f2;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.confirm-button:hover {
    background-color: #0d95e8;
}

/* 错误消息 */
.error-message {
    background-color: #fee;
    color: #e74c3c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-container {
        flex-wrap: wrap;
    }
    
    .left-sidebar,
    .right-sidebar {
        width: 100%;
        order: 1;
    }
    
    .content-area {
        order: 0;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 12px;
    }
    
    .nav-center {
        display: none;
    }
    
    .main-container {
        padding: 12px;
        gap: 12px;
    }
    
    .nav-tabs {
        padding: 0 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tab {
        padding: 12px 16px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .message-form {
        flex-direction: column;
    }
    
    .submit-message-button {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }
    
    .nav-features {
        gap: 6px;
    }
    
    .nav-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .nav-icon {
        font-size: 16px;
    }
    
    .message-item {
        padding: 12px;
    }
    
    .message-actions {
        gap: 12px;
    }
    
    .welcome-text {
        font-size: 16px;
    }
    
    .board-title {
        font-size: 18px;
    }
}

/* 搜索功能样式 */
.search-highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1da1f2;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-error {
    text-align: center;
    padding: 40px 20px;
    color: #e0245e;
}

.search-results {
    max-width: 100%;
}

.search-header {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.search-header p {
    margin: 0 0 20px 0;
    color: #657786;
    font-size: 16px;
}

.back-to-normal {
    padding: 10px 20px;
    background-color: #1da1f2;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.back-to-normal:hover {
    background-color: #0d95e8;
}

/* 编辑模式样式 */
.editing-mode .account-info input:not([readonly]),
.editing-mode .account-info textarea:not([readonly]) {
    background-color: #fff8e1;
    border-color: #ffc107;
}

/* 账户页面样式保留 */
.hidden-inputs {
    display: none;
}

.account-input,
.account-textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* 排行榜和VIP页面样式保留 */
.rank-container,
.vip-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
}

.round-vip-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    text-align: center;
}