* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding-bottom: 60px;
}

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

/* 作者主页顶部预留空间（包含 .author-header 的页面） */
.container:has(.author-header) {
    padding-top: 70px;
}

/* 文章详细页顶部预留空间 */
.article-detail {
    padding-top: 90px;
}

/* 作者信息头部 */
.author-header {
    background: linear-gradient(135deg, #D70101 0%, #CD0000 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.author-info {
    flex: 1;
}

.author-info h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.author-intro {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.author-actions {
    display: flex;
    gap: 10px;
}

.btn-contact, .btn-follow {
    padding: 6px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s;
}

.btn-contact:hover, .btn-follow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-follow.followed {
    background: rgba(255, 255, 255, 0.4);
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
}

.btn-search {
    padding: 10px 20px;
    background: #D70101;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
}

/* 切换作者 */
.switch-author {
    margin-bottom: 15px;
}

.switch-author select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* 文章列表 */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.article-item:active {
    transform: scale(0.98);
}

.article-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}

.article-header h3 {
    font-size: 16px;
    flex: 1;
    line-height: 1.4;
    padding-right: 50px; /* 为tag4留出空间，避免遮挡标题 */
    min-width: 0; /* 允许flex子元素收缩 */
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.meta-item {
    color: #999;
}

.price {
    color: #D70101;
    font-weight: bold;
    margin-left: auto;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.tag1 {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
    font-weight: bold;
}

.tag2 {
    font-weight: bold;
    color: #D70101; /* 默认红色 */
}

.tag2.热门 {
    color: #D70101;
}

.tag2.普通 {
    color: #D70101;
}

.tag2.超赞 {
    color: #D70101;
}

.tag2.连红 {
    color: #D70101;
}

.tag2.已更新 {
    color: #D70101;
}

.tag2.官方认证 {
    color: #D70101;
}

.tag3 {
    padding: 4px 10px;
    font-size: 11px;
}

.tag3-红 {
    background: #D70101;
    color: white;
}

.tag3-黑 {
    background: #333;
    color: #999;
}

.tag3-新 {
    background: #ffc107;
    color: white;
}

   







      


/* 确保tag3文字显示 */
.tag.tag3 {
    display: inline-block;
    white-space: nowrap;
}

.tag4 {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
    font-weight: bold;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    white-space: nowrap; /* 防止文字换行 */
    flex-shrink: 0; /* 防止被压缩 */
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    gap: 5px;
}

.nav-item.active {
    color: #D70101;
}

.nav-item .icon {
    font-size: 20px;
}

/* 文章详情页 */
.article-detail {
    background: white;
    min-height: 100vh;
    padding: 20px;
    padding-top: 50px; /* 顶部预留空间 */
}

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

.article-detail h1 {
    font-size: 22px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.purchase-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.notice-text {
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

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

.content-section h3 {
    font-size: 16px;
    color: #D70101;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #D70101;
}

.content-text {
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

.content-locked {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.content-locked p {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.locked-content {
    color: #ccc;
    font-size: 12px;
}

.purchase-section {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-label {
    font-size: 14px;
    color: #666;
}

.price-amount {
    font-size: 24px;
    color: #D70101;
    font-weight: bold;
}

.btn-purchase {
    padding: 12px 30px;
    background: linear-gradient(135deg, #D70101 0%, #CD0000 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.related-articles {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.related-articles h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.related-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.related-item:hover {
    background: #e9ecef;
}

.related-item h4 {
    font-size: 15px;
    color: #333;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 50% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    position: relative;
    transform: translateY(-50%);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.contact-info p {
    margin: 10px 0;
    font-size: 14px;
}

/* 订单页面 */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-no {
    font-size: 12px;
    color: #999;
}

.order-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.order-status.paid {
    background: #d4edda;
    color: #155724;
}

.order-status.unpaid {
    background: #f8d7da;
    color: #721c24;
}

.order-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-title {
    font-size: 15px;
    font-weight: 500;
    flex: 1;
}

.order-amount {
    color: #D70101;
    font-weight: bold;
}

/* 个人中心 */
.profile-header {
    background: linear-gradient(135deg, #D70101 0%, #CD0000 100%);
    padding: 30px 20px;
    color: white;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin: 0 auto 15px;
}

.profile-name {
    font-size: 20px;
    margin-bottom: 10px;
}

.profile-menu {
    background: white;
    margin-top: 15px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
}

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

.menu-icon {
    width: 30px;
    font-size: 20px;
    margin-right: 15px;
}

.menu-text {
    flex: 1;
    font-size: 15px;
}

.menu-arrow {
    color: #999;
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .author-header {
        padding: 15px;
    }
    
    .article-item {
        padding: 12px;
    }
}

