* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    padding-bottom: 60px; /* 为底部Tab栏留出空间 */
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* 顶部导航栏 */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #ff4e33;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 15px;
    padding: 5px 10px;
    margin: 0 10px;
    flex-grow: 1;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    padding: 3px;
    font-size: 14px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-actions .icon {
    font-size: 20px;
}

/* 主体内容区 */
.main-content {
    min-height: calc(100vh - 120px);
    padding: 15px 0;
}

/* 底部Tab栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
}

.tab-item.active {
    color: #ff4e33;
}

.tab-icon {
    font-size: 22px;
    margin-bottom: 3px;
}

/* 首页轮播 */
.banner {
    position: relative;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
}

.banner-dot.active {
    background-color: #fff;
}

/* 分类入口 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-icon {
    width: 40px;
    height: 40px;
    background-color: #ff4e33;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 5px;
}

.category-name {
    font-size: 12px;
    color: #666;
}

/* 内容区块 */
.section {
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
}

.section-more {
    font-size: 12px;
    color: #999;
}

/* 漫画列表 */
.comic-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.comic-item {
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.comic-cover {
    position: relative;
    aspect-ratio: 3/4;
}

.comic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comic-vip {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #ff4e33;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
}

.comic-info {
    padding: 8px;
}

.comic-title {
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.comic-author {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 详情页样式 */
.detail-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.detail-cover {
    width: 120px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.detail-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.detail-rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

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

.action-btn {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 20px;
    font-size: 14px;
}

.primary-btn {
    background-color: #ff4e33;
    color: white;
}

.secondary-btn {
    background-color: #f0f0f0;
    color: #333;
}

/* 章节列表 */
.chapter-list {
    background-color: #fff;
    border-radius: 8px;
    padding: 10px;
}

.chapter-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

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

.chapter-title {
    font-size: 14px;
}

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

/* 阅读器样式 */
.reader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.reader-header {
    position: relative;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-back {
    font-size: 20px;
}

.reader-title {
    flex: 1;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

.reader-settings {
    font-size: 20px;
}

.reader-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reader-page {
    max-width: 100%;
    margin-bottom: 5px;
}

.reader-footer {
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reader-btn {
    font-size: 18px;
}

.reader-progress {
    font-size: 12px;
}

/* 页面切换效果 */
.page {
    display: none;
}

.page.active {
    display: block;
}