* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
body {
    background-color: #f5f5f5;
    color: #333;
    padding-bottom: 80px;
}
a {
    text-decoration: none;
    color: inherit;
}

/* 顶部导航栏 */
.header {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.top-bar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 10px;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #eee;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-box {
    flex: 1;
    height: 36px;
    background-color: #f5f5f5;
    border-radius: 18px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.icon-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b30;
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.nav-item {
    padding: 12px 15px;
    font-size: 16px;
    color: #666;
    position: relative;
    white-space: nowrap;
}
.nav-item.active {
    color: #00c853;
    font-weight: 500;
}
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: #00c853;
    border-radius: 2px;
}

/* 轮播图 */
.banner-swiper {
    margin: 10px 15px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 150px;
}
.banner-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}
.banner-slide {
    min-width: 100%;
    height: 100%;
}
.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
}
.banner-dot.active {
    background-color: #fff;
    width: 15px;
    border-radius: 3px;
}

/* 功能入口 */
.fun-entry {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    background-color: #fff;
    margin: 0 15px;
    border-radius: 12px;
}
.fun-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.fun-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}
.fun-name {
    font-size: 14px;
    color: #333;
}

/* 标签栏 */
.tag-bar {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tag-item {
    padding: 6px 12px;
    background-color: #fff;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tag-item img {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

/* 文章列表 */
.article-list {
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.article-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.article-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.article-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee;
    overflow: hidden;
}
.article-user {
    flex: 1;
}
.username {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}
.admin-tag {
    background-color: #ff3b30;
    color: #fff;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
}
.user-info {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}
.article-year {
    font-size: 20px;
    font-weight: 700;
    color: #ff6b00;
}
.article-content {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 15px;
}
.content-more {
    color: #007aff;
    cursor: pointer;
}
.article-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}
.article-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}
.image-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    background-color: rgba(0,0,0,0.5);
    padding: 2px 8px;
    border-radius: 10px;
}
.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.action-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #999;
    font-size: 14px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid #f0f0f0;
    z-index: 99;
}
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #999;
    font-size: 12px;
}
.nav-btn.active {
    color: #00c853;
}
.publish-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #00c853;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-top: -20px;
}

/* 表单样式 */
.form-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.form-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}
.form-item {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}
.form-input {
    width: 100%;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}
.form-input:focus {
    border-color: #00c853;
}
.form-btn {
    width: 100%;
    height: 45px;
    background-color: #00c853;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
}
.form-btn:hover {
    opacity: 0.9;
}
.form-tip {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #999;
}
.form-tip a {
    color: #007aff;
}

/* 发布页面 */
.publish-container {
    padding: 20px 15px;
    background-color: #fff;
    min-height: 100vh;
}
.publish-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.publish-title {
    font-size: 18px;
    font-weight: 600;
}
.publish-submit {
    padding: 8px 20px;
    background-color: #00c853;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    cursor: pointer;
}
.content-textarea {
    width: 100%;
    min-height: 200px;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    margin-bottom: 20px;
}
.upload-area {
    margin-bottom: 20px;
}
.upload-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}
.upload-input {
    display: none;
}
.upload-btn {
    width: 80px;
    height: 80px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
}
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.preview-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.preview-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

/* 后台样式 */
.admin-container {
    padding: 20px 15px;
    max-width: 1200px;
    margin: 0 auto;
}
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}
.admin-title {
    font-size: 24px;
    font-weight: 600;
}
.admin-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.admin-table th {
    background-color: #f9f9f9;
    font-weight: 500;
    color: #666;
}
.admin-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    margin-right: 5px;
}
.btn-danger {
    background-color: #ff3b30;
    color: #fff;
}
.btn-primary {
    background-color: #007aff;
    color: #fff;
}
.admin-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.admin-form .form-item {
    margin-bottom: 0;
    flex: 1;
    min-width: 200px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .fun-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    .fun-name {
        font-size: 12px;
    }
    .admin-form {
        flex-direction: column;
        align-items: stretch;
    }
}
