/* Twitter风格论坛样式 */

.twitter-layout {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* 左侧边栏 */
.twitter-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px;
    border-right: 1px solid rgba(0, 255, 0, 0.2);
    overflow-y: auto;
}

.sidebar-logo {
    margin-bottom: 30px;
    padding: 10px 0;
}

.sidebar-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ff00;
    text-decoration: none;
    text-shadow: 0 0 10px #00ff00;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: #00ff00;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.nav-item:hover {
    background: rgba(0, 255, 0, 0.1);
}

.nav-item.active {
    background: rgba(0, 255, 0, 0.15);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.3rem;
}

.sidebar-post-btn {
    width: 100%;
    padding: 15px;
    background: #00ff00;
    color: #000000;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s;
}

.sidebar-post-btn:hover {
    background: #00cc00;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.4);
}

.sidebar-user {
    margin-top: auto;
    padding: 15px;
    border-radius: 8px;
    background: rgba(0, 255, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-info-small {
    flex: 1;
    min-width: 0;
}

.user-name-small {
    color: #00ff00;
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-wallet-small {
    color: #00cc00;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 主内容区 */
.twitter-main {
    border-right: 1px solid rgba(0, 255, 0, 0.2);
    min-height: 100vh;
}

.twitter-header {
    position: sticky;
    top: 0;
    background: #000000;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.twitter-header h2 {
    color: #00ff00;
    margin: 0;
    font-size: 1.3rem;
}

.twitter-content {
    padding: 0;
}

/* 发帖编辑器 */
.post-composer {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.composer-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.composer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.composer-header textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-size: 1.1rem;
    resize: none;
    font-family: inherit;
    padding: 10px 0;
}

.composer-header textarea:focus {
    outline: none;
}

.composer-header textarea::placeholder {
    color: #006600;
}

.composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 63px;
}

.composer-actions {
    display: flex;
    gap: 15px;
}

.composer-btn {
    background: none;
    border: none;
    color: #00ff00;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.composer-btn:hover {
    background: rgba(0, 255, 0, 0.1);
}

.composer-submit {
    display: flex;
    align-items: center;
    gap: 15px;
}

.char-count {
    color: #00cc00;
    font-size: 0.9rem;
}

/* 帖子流 */
.posts-feed {
    border-top: 1px solid rgba(0, 255, 0, 0.2);
}

.forum-post {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    transition: background 0.2s;
}

.forum-post:hover {
    background: rgba(0, 255, 0, 0.02);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.post-author {
    display: flex;
    gap: 12px;
    flex: 1;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    color: #00ff00;
    font-weight: 600;
    margin-bottom: 4px;
}

.post-time {
    color: #00cc00;
    font-size: 0.85rem;
}

.post-content {
    color: #00ff00;
    line-height: 1.6;
    margin: 10px 0;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.post-footer {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    padding-top: 10px;
}

.post-action-btn {
    background: none;
    border: none;
    color: #00cc00;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.post-action-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
}

.post-action-btn.liked {
    color: #ff0066;
}

.post-action-btn.liked:hover {
    color: #ff3399;
}

/* 探索页面 */
.explore-section {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.explore-section h3 {
    color: #00ff00;
    margin-bottom: 15px;
}

.trending-topics {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-item {
    padding: 15px;
    background: rgba(0, 255, 0, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.topic-item:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
}

.topic-name {
    color: #00ff00;
    font-weight: 600;
    margin-bottom: 5px;
}

.topic-count {
    color: #00cc00;
    font-size: 0.85rem;
}

/* 消息页面 */
.messages-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    height: calc(100vh - 60px);
}

.messages-list {
    border-right: 1px solid rgba(0, 255, 0, 0.2);
    overflow-y: auto;
}

.message-item {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 12px;
}

.message-item:hover {
    background: rgba(0, 255, 0, 0.05);
}

.message-item.unread {
    background: rgba(0, 255, 0, 0.08);
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.message-info {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.message-sender {
    color: #00ff00;
    font-weight: 600;
}

.message-time {
    color: #00cc00;
    font-size: 0.8rem;
}

.message-preview {
    color: #00cc00;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.messages-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00cc00;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 70%;
}

.chat-message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message-content {
    background: rgba(0, 255, 0, 0.1);
    padding: 12px 15px;
    border-radius: 12px;
    color: #00ff00;
    word-wrap: break-word;
}

.chat-message.sent .chat-message-content {
    background: rgba(0, 255, 0, 0.2);
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 20px;
    color: #00ff00;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: #00ff00;
}

/* 社区页面 */
.communities-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.communities-header h3 {
    color: #00ff00;
    margin: 0;
}

.communities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.community-card {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.community-card:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    transform: translateY(-2px);
}

.community-avatar {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
}

.community-name {
    color: #00ff00;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.community-description {
    color: #00cc00;
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.community-stats {
    display: flex;
    gap: 15px;
    color: #00cc00;
    font-size: 0.85rem;
}

/* 个人资料页面 */
.profile-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    border-radius: 12px;
    margin-bottom: 20px;
}

.profile-info {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    border: 4px solid #000000;
    margin-top: -60px;
}

.profile-details {
    flex: 1;
}

.profile-name-large {
    color: #00ff00;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-wallet-large {
    color: #00cc00;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    color: #00cc00;
}

.profile-stat {
    display: flex;
    flex-direction: column;
}

.profile-stat-value {
    color: #00ff00;
    font-weight: 600;
    font-size: 1.1rem;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.profile-tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: #00cc00;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.profile-tab-btn:hover {
    background: rgba(0, 255, 0, 0.05);
    color: #00ff00;
}

.profile-tab-btn.active {
    color: #00ff00;
    border-bottom-color: #00ff00;
    font-weight: 600;
}

.profile-content {
    padding: 20px;
}

/* 右侧边栏 */
.twitter-rightbar {
    padding: 20px;
    overflow-y: auto;
    height: 100vh;
    position: sticky;
    top: 0;
}

.rightbar-section {
    margin-bottom: 30px;
}

.rightbar-section h3 {
    color: #00ff00;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.recommended-user {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 12px;
    align-items: center;
}

.recommended-user:hover {
    background: rgba(0, 255, 0, 0.05);
}

.recommended-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.recommended-user-info {
    flex: 1;
    min-width: 0;
}

.recommended-user-name {
    color: #00ff00;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.recommended-user-wallet {
    color: #00cc00;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.follow-btn {
    padding: 6px 15px;
    background: #00ff00;
    color: #000000;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.follow-btn:hover {
    background: #00cc00;
}

.follow-btn.following {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid #00ff00;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .twitter-layout {
        grid-template-columns: 80px 1fr 0;
    }
    
    .twitter-rightbar {
        display: none;
    }
    
    .nav-text {
        display: none;
    }
    
    .sidebar-post-btn {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .twitter-layout {
        grid-template-columns: 1fr;
    }
    
    .twitter-sidebar {
        display: none;
    }
    
    .messages-container {
        grid-template-columns: 1fr;
    }
    
    .messages-list {
        display: none;
    }
    
    .communities-grid {
        grid-template-columns: 1fr;
    }
}

/* 白天主题适配 */
body[data-theme="light"] .twitter-sidebar,
body[data-theme="light"] .twitter-main,
body[data-theme="light"] .twitter-rightbar {
    background: #ffffff;
    border-color: #e0e0e0;
}

body[data-theme="light"] .nav-item {
    color: #333333;
}

body[data-theme="light"] .nav-item:hover {
    background: rgba(0,0,0,0.05);
}

body[data-theme="light"] .post-content,
body[data-theme="light"] .author-name {
    color: #333333;
}

body[data-theme="light"] .post-time {
    color: #666666;
}

