* {
    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: linear-gradient(135deg, #a8c8ec 0%, #e8f0f8 50%, #d6e3f0 100%);
    min-height: 100vh;
    padding: 40px 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 8px 32px rgba(31, 76, 135, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.header {
    margin-bottom: 36px;
    text-align: center;
}

.logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 2px solid rgba(42, 82, 130, 0.12);
    box-shadow: 0 4px 16px rgba(42, 82, 130, 0.1);
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #5a7a96;
    font-size: 15px;
    line-height: 1.6;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(31, 76, 135, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.filter-row:focus-within {
    box-shadow: 0 4px 16px rgba(31, 76, 135, 0.12);
    border-color: rgba(42, 82, 130, 0.2);
}

.field-select-wrapper {
    position: relative;
    min-width: 120px;
    flex-shrink: 0;
}

.field-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #2a5282;
    padding-right: 24px;
    cursor: pointer;
    outline: none;
    width: 100%;
}

.field-select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #7a9ab8;
    font-size: 12px;
    pointer-events: none;
}

.value-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #333;
    outline: none;
    padding: 4px 0;
    min-width: 0;
    width: 100%;
}

.value-input::placeholder {
    color: #a8bdcf;
}

/* 日期选择器容器 */
.value-input-container {
    flex: 1;
    min-width: 0;
}

/* 原生日期选择器样式适配 */
.value-input.date-picker {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #333;
    outline: none;
    padding: 4px 0;
    min-width: 0;
    width: 100%;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.value-input.date-picker::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.value-input.date-picker::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(200, 210, 225, 0.4);
    color: #5a7a96;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: rgba(220, 80, 80, 0.15);
    color: #c05050;
}

.add-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 1px dashed rgba(90, 122, 150, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.4);
    color: #5a7a96;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.add-filter:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(42, 82, 130, 0.45);
    color: #2a5282;
}

.add-filter .icon {
    font-size: 16px;
    font-weight: 600;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #2a5282 0%, #1e3d63 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(42, 82, 130, 0.3);
    margin-top: 8px;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(42, 82, 130, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.results-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 32px;
    margin-top: 24px;
    box-shadow: 0 8px 32px rgba(31, 76, 135, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(31, 76, 135, 0.1);
}

.results-header h2 {
    font-size: 20px;
    color: #1a3a5c;
}

.results-count {
    font-size: 14px;
    color: #5a7a96;
    background: rgba(42, 82, 130, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(31, 76, 135, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.result-item:hover {
    box-shadow: 0 4px 16px rgba(31, 76, 135, 0.12);
    transform: translateY(-1px);
}

.result-title {
    font-size: 17px;
    font-weight: 600;
    color: #2a5282;
    margin-bottom: 8px;
    line-height: 1.5;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #7a9ab8;
}

.result-meta span {
    background: rgba(42, 82, 130, 0.06);
    padding: 4px 10px;
    border-radius: 12px;
}

.result-content {
    font-size: 14px;
    line-height: 1.7;
    color: #4a5a6a;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-content.expanded {
    -webkit-line-clamp: unset;
}

.result-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2a5282;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.result-link:hover {
    color: #1e3d63;
    text-decoration: underline;
}

.expand-btn {
    display: inline-block;
    margin-top: 8px;
    color: #5a7a96;
    font-size: 13px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.expand-btn:hover {
    color: #2a5282;
}

.result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

/* ============ 文章整合视图 ============ */
.article-view {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(31, 76, 135, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.article-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(42, 82, 130, 0.1);
}

.article-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    color: #7a9ab8;
}

.article-meta span {
    background: rgba(42, 82, 130, 0.06);
    padding: 4px 12px;
    border-radius: 12px;
}

.article-body {
    font-size: 16px;
    line-height: 2;
    color: #333;
}

.article-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2a5282;
    margin-top: 24px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.article-section-title:first-child {
    margin-top: 0;
}

.article-section-content {
    font-size: 16px;
    line-height: 2;
    color: #3a4a5a;
    margin-bottom: 8px;
    text-indent: 2em;
}

.article-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(31, 76, 135, 0.1);
    text-align: center;
}

.article-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2a5282;
    font-size: 15px;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 12px;
    background: rgba(42, 82, 130, 0.06);
    transition: all 0.2s ease;
}

.article-link:hover {
    background: rgba(42, 82, 130, 0.12);
    text-decoration: none;
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #7a9ab8;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.error-state {
    text-align: center;
    padding: 32px 20px;
    color: #c05050;
    background: rgba(220, 80, 80, 0.06);
    border-radius: 16px;
}

.load-more {
    text-align: center;
    margin-top: 20px;
}

.load-more button {
    padding: 10px 28px;
    border: 1px solid rgba(42, 82, 130, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #2a5282;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more button:hover {
    background: rgba(42, 82, 130, 0.08);
}

/* ============ 翻页器 ============ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(31, 76, 135, 0.1);
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid rgba(42, 82, 130, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: #2a5282;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.page-btn:hover:not(:disabled) {
    background: rgba(42, 82, 130, 0.08);
    border-color: rgba(42, 82, 130, 0.4);
    transform: translateY(-1px);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn.page-num {
    min-width: 38px;
    text-align: center;
    padding: 8px 10px;
}

.page-btn.page-num.active {
    background: linear-gradient(135deg, #2a5282 0%, #1e3d63 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(42, 82, 130, 0.3);
}

.page-ellipsis {
    color: #7a9ab8;
    padding: 0 4px;
    font-size: 14px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1000;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(42, 82, 130, 0.15);
    border-top-color: #2a5282;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay p {
    color: #5a7a96;
    font-size: 15px;
}

/* ============ 打赏悬浮按钮 ============ */
.donate-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(231, 76, 60, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.donate-fab:hover {
    background: rgba(231, 76, 60, 0.18);
    transform: scale(1.1);
}

.donate-fab svg {
    transition: transform 0.25s ease;
}

.donate-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.donate-modal-box {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 32px 36px 28px;
    text-align: center;
    max-width: 320px;
    width: calc(100% - 48px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    animation: donatePop 0.2s ease;
}

@keyframes donatePop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.donate-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: none;
    font-size: 24px;
    color: #b0c0d0;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.donate-close:hover {
    color: #5a7a96;
}

.donate-modal-box h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a3a5c;
    margin-bottom: 6px;
}

.donate-hint {
    font-size: 13px;
    color: #7a9ab8;
    margin-bottom: 18px;
}

.donate-qr {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 10px;
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.donate-qr:active {
    opacity: 0.7;
}

/* ============ 图片放大查看器 ============ */
.img-viewer {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-viewer-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.img-viewer-img {
    position: relative;
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.donate-placeholder {
    font-size: 13px;
    color: #b0c0d0;
    padding: 80px 20px;
    border: 1px dashed #d0dae4;
    border-radius: 10px;
}

@media (max-width: 640px) {
    body {
        padding: 12px 8px;
    }

    .container {
        max-width: 100%;
    }

    .card {
        padding: 20px 14px;
        border-radius: 16px;
    }

    .header {
        margin-bottom: 24px;
    }

    .logo {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }

    .header h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 14px;
    }

    .filter-row {
        flex-wrap: wrap;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .field-select-wrapper {
        width: 100%;
        min-width: unset;
    }

    .value-input {
        width: 100%;
        min-width: unset;
    }

    .remove-btn {
        position: absolute;
        right: 12px;
        top: 12px;
    }

    .search-btn {
        padding: 14px;
        font-size: 16px;
        border-radius: 12px;
    }

    /* ============ 文章视图移动端适配 ============ */
    .results-card {
        padding: 16px 12px;
        border-radius: 16px;
        margin-top: 16px;
    }

    .results-header {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .results-header h2 {
        font-size: 17px;
    }

    .results-count {
        font-size: 13px;
        padding: 4px 10px;
    }

    .result-item {
        padding: 14px;
        border-radius: 12px;
    }

    .result-title {
        font-size: 15px;
    }

    .result-meta {
        gap: 8px;
        font-size: 12px;
    }

    .result-content {
        font-size: 13px;
        line-height: 1.6;
    }

    .article-view {
        padding: 18px 14px;
        border-radius: 12px;
    }

    .article-header {
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .article-title {
        font-size: 19px;
        line-height: 1.4;
    }

    .article-meta {
        gap: 8px;
        font-size: 13px;
        flex-wrap: wrap;
    }

    .article-meta span {
        padding: 3px 8px;
    }

    .article-body {
        font-size: 15px;
        line-height: 1.85;
    }

    .article-section-title {
        font-size: 16px;
        margin-top: 18px;
        margin-bottom: 8px;
    }

    .article-section-content {
        font-size: 15px;
        line-height: 1.85;
        text-indent: 2em;
    }

    .article-footer {
        margin-top: 22px;
        padding-top: 16px;
    }

    .article-link {
        font-size: 14px;
        padding: 7px 16px;
    }

    /* ============ 翻页器移动端适配 ============ */
    .pagination {
        gap: 6px;
        margin-top: 18px;
        padding-top: 16px;
    }

    .page-btn {
        padding: 7px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    .page-btn.page-num {
        min-width: 34px;
        padding: 7px 8px;
    }

    .page-numbers {
        gap: 4px;
    }

    .donate-fab {
        width: 40px;
        height: 40px;
        bottom: 16px;
        right: 16px;
    }

    .donate-modal-box {
        padding: 24px 24px 20px;
    }

    .donate-qr {
        width: 180px;
        height: 180px;
    }
}
