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

html,
body {
    margin: 0 !important;
    width: 100% !important;
    overflow-x: hidden;
}

body {
    padding: 0 !important;
    padding-bottom: 70px !important;
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

.top-area {
    background: #fff;
    margin-bottom: 8px;
    width: 100% !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #eee;
}

.app-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #f8f8f8;
}

.app-header .brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.1;
}

.filter-panel {
    padding: 5px 0;
    background: #fff;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 10px;
    border-bottom: 1px dashed #f5f5f5;
}

.filter-row:last-child {
    border-bottom: none;
}

.filter-label {
    font-size: 13px;
    color: #999;
    min-width: 38px;
    font-weight: 500;
    padding-top: 4px;
}

.filter-items {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.filter-item {
    display: inline-block;
    padding: 3px 6px;
    margin-right: 5px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    background: #f3f4f6;
    text-align: center;
}

.filter-items::after {
    content: "";
    flex: 99;
}

.filter-item.active {
    background-color: var(--primary-color);
    color: #fff;
}

.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.manga-grid {
    padding: 4px;
    margin: 0 !important;
    width: 100% !important;
}

.manga-item {
    padding: 4px;
}

.manga-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.cover-wrap {
    position: relative;
    padding-top: 135%;
    background: #eee;
}

.cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f0f0f0;
}

.info-wrap {
    padding: 8px;
    min-height: 58px;
}

.manga-name {
    font-size: 12px;
    font-weight: bold;
    line-height: 1.3;
    height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
    color: #111;
}

.manga-zj {
    font-size: 11px;
    line-height: 1.3;
    color: #666;
}

.manga-zj .meta-summary {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manga-zj .status-finished {
    display: block;
    white-space: nowrap;
}

.manga-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

.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: var(--nav-text-color);
}

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

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

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

.pagination-area {
    padding: 15px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    white-space: nowrap;
    overflow-x: auto;
    gap: 3px;
}

.pagination-area::-webkit-scrollbar {
    display: none;
}

.page-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    border-radius: 2px;
    padding: 0 4px;
}

.page-dot {
    display: inline-block;
    min-width: 15px;
    text-align: center;
    color: #ccc;
    font-size: 14px;
}

.page-box.active {
    background: #999;
    color: #fff;
    border-color: #999;
}

.page-box.disabled {
    background: #999;
    color: #fff;
    opacity: 0.6;
    pointer-events: none;
}

.jump-group {
    display: flex;
    align-items: center;
    margin-left: 2px;
}

.page-input {
    width: 40px;
    height: 32px;
    border: 1px solid #ddd;
    border-right: none;
    text-align: center;
    outline: none;
    font-size: 13px;
    border-radius: 2px 0 0 2px;
}

.btn-jump {
    height: 32px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    font-size: 13px;
    border-radius: 0 2px 2px 0;
    cursor: pointer;
}
