:root {
    --bg: #1e1e1e;
    --header-bg: rgba(30, 30, 30, 0.95);
    --surface: #252526;
    --surface-lighter: #2d2d2d;
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.1);
    --text-main: #e4e4e7;
    --text-dim: #a1a1aa;
    --border: rgba(255, 255, 255, 0.1);
    --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: "Inter", -apple-system, "PingFang SC", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0 0 0;
}

.tag-zone-wrapper {
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.tag-zone-container {
    display: none;
}

.tag-zone-container.active {
    display: block;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

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

header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.stats-pill {
    font-size: 0.7rem;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 2px 10px;
    border-radius: 100px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-action-btn {
    font-size: 0.7rem;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    background: var(--surface-lighter);
    color: var(--text-main);
    border-color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-scroll {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 0;
}

.tag-zone {
    margin-bottom: 12px;
}
.tag-scroll::-webkit-scrollbar { display: none; }

.tag-btn {
    white-space: nowrap;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 5px 14px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.tag-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 600;
}

.more-trigger {
    background: var(--surface-lighter);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}
.more-trigger.open {
    transform: rotate(180deg);
    background: var(--primary);
    color: #000;
}

.expanded-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.expanded-panel.show {
    max-height: 300px;
    padding: 15px 0 10px;
    border-top: 1px dashed var(--border);
    margin-top: 10px;
}

.read-status-nav {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}

.read-status-btn {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.read-status-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 600;
}

.read-status-btn[data-status="featured"] {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    border-color: rgba(255, 107, 53, 0.3);
}

.read-status-btn[data-status="featured"]:hover {
    background: rgba(255, 107, 53, 0.3);
    border-color: rgba(255, 107, 53, 0.5);
}

.read-status-btn[data-status="featured"].active {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.read-status-btn:hover:not(.active) {
    background: var(--surface-lighter);
    border-color: rgba(56, 189, 248, 0.3);
}

.refresh-btn {
    background: #ffd700;
    border: 1px solid #ffd700;
    color: #000;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    background: #ffea00;
    border-color: #ffea00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.refresh-btn:active {
    transform: scale(0.98);
}

.search-btn {
    background: #22c55e;
    border: 1px solid #22c55e;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-btn:hover {
    background: #4ade80;
    border-color: #4ade80;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.search-btn:active {
    transform: scale(0.98);
}

.search-btn.active {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
    padding: 12px 0;
}

.search-input {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.search-input::placeholder {
    color: var(--text-dim);
}

.search-confirm-btn {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #000;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-confirm-btn:hover {
    background: #7dd3fc;
    border-color: #7dd3fc;
    transform: translateY(-1px);
}

.search-confirm-btn:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .search-input-wrapper {
        flex-direction: column;
        gap: 8px;
        padding: 10px 0;
    }

    .search-input {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .search-confirm-btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

.date-filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}

.date-filter-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.date-filter-select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.date-filter-input:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.date-filter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.content-area {
    padding: 20px 0;
}

.page-container {
    display: none;
}

.page-container.active {
    display: block;
}

.article-card {
    display: block;
    text-decoration: none;
    background: linear-gradient(145deg, #252526 0%, #1e1e1e 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.article-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
    background: #2d2d2d;
}

.article-card:active { transform: scale(0.98); }

.article-title {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date { font-size: 0.75rem; color: var(--text-dim); }

.tags-inline { display: flex; gap: 5px; }
.inline-tag {
    font-size: 0.65rem;
    background: rgba(255,255,255,0.03);
    color: var(--text-dim);
    padding: 2px 8px;
    border-radius: 4px;
}

.inline-tag.baijiahao {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.load-more-container {
    text-align: center;
    padding: 30px 0 60px;
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 0 60px;
}

.pagination-btn {
    background: linear-gradient(145deg, #252526 0%, #1e1e1e 100%);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #2d2d2d 0%, #252526 100%);
    border-color: var(--primary);
    color: var(--text-main);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--surface);
}

.pagination-numbers {
    display: flex;
    gap: 6px;
}

.pagination-number {
    background: linear-gradient(145deg, #252526 0%, #1e1e1e 100%);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
}

.pagination-number:hover {
    background: linear-gradient(145deg, #2d2d2d 0%, #252526 100%);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--text-main);
    transform: translateY(-1px);
}

.pagination-number.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 6px 10px;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 30px;
    border-radius: 100px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-ghost:hover { background: var(--surface-lighter); border-color: var(--primary); }

.btn-no-more {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 15px 30px;
    font-size: 0.8rem;
    cursor: default;
    position: relative;
}

.btn-no-more::before {
    content: '';
    position: absolute;
    left: 30px;
    right: 30px;
    top: 50%;
    height: 1px;
    background: var(--border);
    z-index: -1;
}

.btn-ghost:disabled,
.btn-no-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .article-card { padding: 16px; }
    .card-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface-lighter);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.read-time {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.article-card.pulse-orange {
    animation: pulseOrange 1s ease-in-out;
}

@keyframes pulseOrange {
    0%, 100% {
        border-color: rgba(255, 165, 0, 0.3);
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.4);
    }
    50% {
        border-color: rgba(255, 165, 0, 1);
        box-shadow: 0 0 1px 1px rgba(255, 165, 0, 0.6);
    }
}