:root {
    --primary-color: #3b82f6;
    --bg-color: #f8f9fa;
}

body {
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-bottom: 70px;
    color: #333;
}

.page-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
}

.page-header .back-btn {
    position: absolute;
    left: 0;
    top: 0;
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    font-size: 20px;
}

.page-header .title {
    font-size: 17px;
    font-weight: bold;
}

.manga-info-box {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.cover-img {
    width: 110px;
    height: 146px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.info-right {
    padding-left: 15px;
}

.m-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #000;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.my-tag {
    display: inline-flex;
    background: #f3f4f6;
    color: #666;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0;
    white-space: nowrap;
}

.btn-group-custom {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-act {
    flex: 1;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.btn-read {
    background: var(--primary-color);
    color: #fff;
}

.btn-download {
    background: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-fav.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.summary-box {
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.chapter-box {
    padding: 10px 15px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    line-height: 1;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.chapter-item {
    display: block;
    background: #f9f9f9;
    border: 1px solid #eee;
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.comment-box {
    border-top: 1px solid #f0f0f0;
    padding: 10px 15px;
}

.comment-form {
    background: #f9fafb;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.comment-input {
    width: 100%;
    min-height: 78px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 9px 10px;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #fff;
    outline: none;
}

.comment-input:focus {
    border-color: var(--primary-color);
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.comment-submit {
    border: 0;
    border-radius: 16px;
    background: var(--primary-color);
    color: #fff;
    height: 32px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
}

.comment-submit:disabled {
    opacity: .65;
}

.comment-login-tip {
    background: #f9fafb;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.comment-login-tip a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.cmt-item {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 15px;
}

.cmt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.cmt-user {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

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

.cmt-content {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

.bar-tab {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #929292;
}

.tab-item.active {
    color: var(--primary-color);
}

.tab-item i {
    font-size: 20px;
    line-height: 1;
}

.tab-label {
    font-size: 11px;
    margin-top: 2px;
}
