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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    color: #4a90d9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* 头部样式 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
    color: #4a90d9;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: #555;
    font-size: 14px;
}

.main-nav a:hover {
    color: #4a90d9;
    text-decoration: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.user-info .username {
    font-weight: 500;
    color: #333;
}

.user-info .points {
    color: #f39c12;
    font-weight: 500;
}

/* 主体内容 */
.site-main {
    padding: 20px 0;
    min-height: calc(100vh - 160px);
}

/* 底部 */
.site-footer {
    background: #fff;
    padding: 20px 0;
    text-align: center;
    color: #999;
    font-size: 12px;
    border-top: 1px solid #eee;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn:hover {
    text-decoration: none;
    opacity: 0.9;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-primary {
    background: #4a90d9;
    color: #fff;
}

.btn-success {
    background: #5cb85c;
    color: #fff;
}

.btn-danger {
    background: #d9534f;
    color: #fff;
}

.btn-warning {
    background: #f0ad4e;
    color: #fff;
}

.btn-default {
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
}

.btn-default:hover {
    background: #f5f5f5;
}

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

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group.checkboxes label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
    cursor: pointer;
}

.form-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
}

/* 提示框 */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-success {
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.alert-error {
    background: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #dff0d8;
    color: #3c763d;
}

.badge-danger {
    background: #f2dede;
    color: #a94442;
}

.badge-default {
    background: #eee;
    color: #666;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.data-table tr:hover td {
    background: #f9f9f9;
}

/* 分页 */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a,
.pagination .current {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
}

.pagination a:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.pagination .current {
    background: #4a90d9;
    color: #fff;
    border-color: #4a90d9;
}

/* 论坛首页 */
.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.forum-header h2 {
    font-size: 18px;
    color: #333;
}

.signin-box {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: right;
}

.signin-done {
    color: #5cb85c;
    font-weight: 500;
}

/* 帖子列表 */
.post-list {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.post-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.post-item:hover {
    background: #f9f9f9;
}

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

.post-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.post-title a {
    color: #333;
    font-weight: 500;
}

.post-title a:hover {
    color: #4a90d9;
    text-decoration: none;
}

.boost-tag {
    display: inline-block;
    padding: 1px 6px;
    background: #f0ad4e;
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

.post-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 15px;
}

/* 空状态 */
.empty-state {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 帖子详情 */
.post-detail {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
}

.post-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.post-header h1 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
}

.post-header .post-meta {
    font-size: 13px;
}

.post-content {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 25px;
    word-wrap: break-word;
}

.boost-section {
    padding: 15px;
    background: #fef9e7;
    border-radius: 4px;
    margin-bottom: 25px;
}

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

.comments-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.comment-form {
    margin-bottom: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    margin-bottom: 6px;
    font-size: 13px;
}

.comment-author {
    font-weight: 500;
    color: #4a90d9;
    margin-right: 10px;
}

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

.comment-content {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* 发帖页面 */
.new-post {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
}

.new-post h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.post-form textarea {
    min-height: 300px;
}

/* 个人中心 */
.profile-page {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    gap: 20px;
}

.avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.profile-header .user-info h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.profile-header .user-info p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 3px;
}

.points-num {
    color: #ffd700;
    font-size: 16px;
}

.profile-actions {
    margin-left: auto;
}

.profile-content {
    padding: 25px;
}

.profile-section {
    margin-bottom: 30px;
}

.profile-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.simple-list {
    list-style: none;
}

.simple-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.simple-list li:last-child {
    border-bottom: none;
}

.list-meta {
    font-size: 12px;
    color: #999;
}

.text-success {
    color: #5cb85c;
}

.text-danger {
    color: #d9534f;
}

/* 转账页面 */
.transfer-page {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 6px;
    padding: 25px;
}

.transfer-page h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.transfer-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.transfer-info strong {
    color: #f39c12;
    font-size: 18px;
}

/* 筛选栏 */
.filter-bar {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-actions {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 用户头衔样式 */
.user-title {
    font-weight: bold;
    margin-left: 5px;
    font-size: 12px;
}

/* 头像样式 */
.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4a90d9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 32px;
}

/* 头像上传区域 */
.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.avatar-upload-form {
    text-align: center;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-default {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
}

.btn-default:hover {
    background: #f5f5f5;
}
