* {
    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;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.page {
    display: none;
    min-height: 100vh;
    padding-bottom: 60px;
}

.page.active {
    display: block;
}

/* 个人资料和账户安全页面不显示底部导航 */
#profile-edit-page,
#security-page {
    padding-bottom: 0;
}

#profile-edit-page .bottom-nav,
#security-page .bottom-nav {
    display: none;
}

/* 顶部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-left, .header-right {
    cursor: pointer;
}

.header-left i, .header-right i {
    font-size: 20px;
    color: #333;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.back-icon {
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* 横幅轮播 */
.banner {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
    overflow: hidden;
}

.banner-carousel {
    position: relative;
    width: 100%;
    height: 200px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
    z-index: 1;
}

.banner-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.banner-quote {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 20px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    color: #fff;
}

.banner-quote .quote-en {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.banner-quote .quote-cn {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 轮播指示器 */
.banner-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

.quote-en {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    font-style: italic;
}

.quote-cn {
    font-size: 14px;
    color: #999;
}

/* 分类标签 */
.tabs {
    display: flex;
    padding: 12px 16px;
    background: #fff;
    overflow-x: auto;
    gap: 12px;
    margin-bottom: 8px;
}

.tab {
    padding: 6px 16px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
}

.tab.active {
    background: #ff6b9d;
    color: #fff;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    font-size: 14px;
    color: #666;
    gap: 8px;
    margin-bottom: 8px;
}

.sort-icon {
    display: inline-block;
    margin-left: 4px;
}

.separator {
    color: #ddd;
    margin: 0 4px;
}

.dot {
    color: #ddd;
    margin: 0 4px;
}

/* 内容列表 */
.content-list {
    padding: 0 16px;
}

.content-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content-card:active {
    transform: scale(0.98);
}

.card-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 6px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.card-likes {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #fff;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    position: relative;
    padding: 4px 20px;
}

.nav-icon {
    font-size: 20px;
    color: #666;
}

.nav-item.active .nav-icon {
    color: #ff6b9d;
}

.nav-label {
    font-size: 12px;
    color: #666;
}

.nav-item.active .nav-label {
    color: #ff6b9d;
}

/* 面包屑 */
.breadcrumb {
    padding: 12px 16px;
    background: #fff;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

/* 文章内容 */
.article-content {
    padding: 16px;
    background: #fff;
}

.article-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    line-height: 1.5;
    margin-bottom: 16px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffa500;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.author-details {
    flex: 1;
}

.author-name {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 14px;
    color: #333;
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.badge i {
    font-size: 10px;
}

.badge-blue {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-orange {
    background: #fff3e0;
    color: #f57c00;
}

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

.follow-btn {
    padding: 6px 16px;
    background: #ff6b9d;
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.follow-btn i {
    font-size: 12px;
}

.engagement {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}

.engagement-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.engagement-item i {
    font-size: 14px;
}

.slogan {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 16px;
}

.slogan-en {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    font-style: italic;
}

.slogan-cn {
    font-size: 14px;
    color: #999;
}

.article-banner {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
}

.intro-section {
    margin-bottom: 20px;
}

.intro-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid #ff6b9d;
}

.intro-text {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.article-link {
    padding: 12px;
    background: #e3f2fd;
    border-radius: 8px;
    color: #1976d2;
    font-size: 14px;
    cursor: pointer;
}

/* 我的页面 */
.profile-bg {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-image: url('images/profile-bg.jpg');
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #1976d2;
}

.user-greeting {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
}

.membership-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #424242;
    color: #fff;
    margin: 16px;
    border-radius: 12px;
    cursor: pointer;
}

.crown-icon {
    font-size: 24px;
    color: #ffd700;
}

.arrow-icon {
    font-size: 18px;
    color: #fff;
}

.coins-icon {
    font-size: 20px;
    color: #ffa500;
}

.membership-text {
    flex: 1;
    font-size: 14px;
}

.arrow-icon {
    font-size: 20px;
}

.points-card {
    background: #fff;
    margin: 0 16px 16px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.points-value {
    font-size: 32px;
    color: #ff6b6b;
    font-weight: bold;
}

.settings-card {
    background: #fff;
    margin: 0 16px 16px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.settings-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
}

.setting-icon {
    font-size: 24px;
    color: #1976d2;
}

.setting-label {
    font-size: 12px;
    color: #666;
}

/* 登录模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #ff6b9d;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.close-icon {
    font-size: 20px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.close-icon:hover {
    color: #333;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.register-link {
    text-align: center;
    font-size: 14px;
    color: #666;
}

#register-link {
    color: #1976d2;
    cursor: pointer;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.form-input:focus {
    border-color: #1976d2;
}

.eye-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 16px;
}

.forgot-password {
    text-align: right;
    font-size: 14px;
}

#forgot-password {
    color: #1976d2;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn i {
    font-size: 14px;
}

.login-btn:active {
    opacity: 0.8;
}

/* 文章详细内容 */
.article-body {
    margin-top: 20px;
    line-height: 1.8;
    color: #333;
    font-size: 15px;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 24px 0 12px;
    color: #333;
}

.article-body ul, .article-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 个人资料编辑页面 */
.profile-edit-content {
    padding: 16px;
    background: #f5f5f5;
    min-height: calc(100vh - 60px);
}

.edit-section {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.edit-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

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

.edit-label {
    width: 80px;
    font-size: 14px;
    color: #333;
    flex-shrink: 0;
}

.edit-value {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.edit-input, .edit-select, .edit-textarea {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    text-align: right;
    background: transparent;
}

.edit-textarea {
    text-align: left;
    resize: none;
    min-height: 80px;
}

.avatar-options {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-option {
    cursor: pointer;
}

.avatar-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #999;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.avatar-preview.selected {
    border-color: #1976d2;
    background: #e3f2fd;
    color: #1976d2;
}

.avatar-option:active .avatar-preview {
    transform: scale(0.95);
}

.save-btn-container {
    padding: 20px 16px;
}

.save-btn {
    width: 100%;
    padding: 14px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.save-btn:active {
    opacity: 0.8;
}

/* 账户安全页面 */
.security-content {
    padding: 16px;
    background: #f5f5f5;
    min-height: calc(100vh - 60px);
}

.security-section {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.security-item:active {
    background: #f5f5f5;
}

.security-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.security-icon {
    font-size: 24px;
    color: #1976d2;
}

.security-details {
    flex: 1;
}

.security-title {
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

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

.security-arrow {
    font-size: 14px;
    color: #ccc;
}

.security-tips {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

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

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
}

.tips-list li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #1976d2;
    font-size: 16px;
}

/* 加载更多提示 */
.load-more-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
    gap: 12px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f0f0f0;
    border-top-color: #ff6b9d;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式 */
@media (max-width: 375px) {
    .article-title {
        font-size: 18px;
    }
    
    .card-title {
        font-size: 14px;
    }
}

