/* ============================================
   WP Multi RSS Feed 样式文件
   文件名: wp-multi-rss-feed.css
   ============================================ */

/* ===== 容器样式 ===== */
.wpmr-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wpmr-rss-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ===== 重置列表伪元素（重要！解决空白问题） ===== */
.wpmr-rss-list li::before,
.wpmr-rss-list li::after,
.wpmr-item::before,
.wpmr-item::after,
.wpmr-rss-list li .wpmr-info-row::before,
.wpmr-rss-list li .wpmr-info-row::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* 特别针对 .grap 类的 li 伪元素（很多主题使用） */
.grap .wpmr-rss-list li::before,
.grap .wpmr-item::before,
.wpmr-rss-list li::marker {
    display: none !important;
    content: '' !important;
}

/* ===== 单条内容卡片 ===== */
.wpmr-item {
    background: #ffffff;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    padding: 12px 18px !important;
    margin-bottom: 12px !important;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    list-style: none !important;
    position: relative;
}

.wpmr-item:hover {
    border-color: #c8d0d8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* ===== 信息行：站点 + 标题 + 时间 在一行 ===== */
.wpmr-info-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* 站点名称 - 背景色 #27ae60，文字白色 */
.wpmr-site {
    display: inline-block !important;
    background: #27ae60 !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 0 10px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    line-height: 26px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

/* 标题 - 颜色 #27ae60 */
.wpmr-title {
    display: inline !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
    flex: 1 1 auto !important;
    min-width: 80px !important;
    word-break: break-word !important;
    margin: 0 !important;
}

.wpmr-title a {
    color: #27ae60 !important;
    text-decoration: none !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
    border-bottom: 1px solid transparent !important;
    line-height: 1.6 !important;
    display: inline !important;
}

.wpmr-title a:hover {
    color: #1e8449 !important;
    border-bottom-color: #1e8449 !important;
}

/* 时间 */
.wpmr-date {
    display: inline !important;
    color: #8c97a6 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* ===== 摘要 ===== */
.wpmr-summary {
    color: #4a5568 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #f0f2f5 !important;
    word-break: break-word !important;
}

/* ===== 底部时间戳 ===== */
.wpmr-footer {
    text-align: right !important;
    font-size: 12px !important;
    color: #a0abb8 !important;
    margin-top: 16px !important;
    padding-top: 12px !important;
    border-top: 1px solid #eef0f3 !important;
    letter-spacing: 0.2px !important;
}

/* ===== 空状态 ===== */
.wpmr-empty {
    padding: 40px 20px !important;
    text-align: center !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    color: #7a8797 !important;
    border: 1px dashed #d0d7de !important;
    font-size: 14px !important;
}

/* ============================================ */
/* ===== 移动设备适配 (响应式) ===== */
/* ============================================ */

/* 平板及小屏幕 */
@media (max-width: 768px) {
    .wpmr-item {
        padding: 10px 14px !important;
        margin-bottom: 10px !important;
    }
    
    .wpmr-info-row {
        gap: 6px 8px !important;
        line-height: 1.5 !important;
    }
    
    .wpmr-site {
        font-size: 11px !important;
        line-height: 24px !important;
        padding: 0 8px !important;
    }
    
    .wpmr-title {
        font-size: 14px !important;
        min-width: 70px !important;
        line-height: 1.5 !important;
    }
    
    .wpmr-title a {
        line-height: 1.5 !important;
    }
    
    .wpmr-date {
        font-size: 11px !important;
        line-height: 1.5 !important;
    }
    
    .wpmr-summary {
        font-size: 13px !important;
        line-height: 1.6 !important;
        margin-top: 6px !important;
        padding-top: 6px !important;
    }
}

/* 手机小屏幕 */
@media (max-width: 480px) {
    .wpmr-container {
        margin: 12px 0 !important;
    }
    
    .wpmr-item {
        padding: 8px 12px !important;
        margin-bottom: 8px !important;
        border-radius: 6px !important;
    }
    
    .wpmr-info-row {
        gap: 4px 6px !important;
        line-height: 1.4 !important;
    }
    
    .wpmr-site {
        font-size: 10px !important;
        line-height: 22px !important;
        padding: 0 6px !important;
        border-radius: 10px !important;
        order: 1 !important;
    }
    
    .wpmr-title {
        font-size: 13px !important;
        font-weight: 500 !important;
        min-width: 60px !important;
        width: 100% !important;
        order: 3 !important;
        margin-top: 2px !important;
        line-height: 1.4 !important;
        flex-basis: 100% !important;
    }
    
    .wpmr-title a {
        line-height: 1.4 !important;
    }
    
    .wpmr-date {
        font-size: 10px !important;
        margin-left: auto !important;
        line-height: 1.4 !important;
        order: 2 !important;
    }
    
    /* 调整手机上的排列顺序 */
    .wpmr-info-row {
        flex-wrap: wrap !important;
    }
    
    .wpmr-summary {
        font-size: 12px !important;
        line-height: 1.5 !important;
        margin-top: 6px !important;
        padding-top: 6px !important;
    }
    
    .wpmr-footer {
        font-size: 10px !important;
        margin-top: 12px !important;
        padding-top: 8px !important;
    }
}

/* 超小屏手机 (320px 以下) */
@media (max-width: 360px) {
    .wpmr-item {
        padding: 6px 10px !important;
    }
    
    .wpmr-title {
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    
    .wpmr-title a {
        line-height: 1.3 !important;
    }
    
    .wpmr-site {
        font-size: 9px !important;
        padding: 0 5px !important;
        line-height: 20px !important;
    }
    
    .wpmr-date {
        font-size: 9px !important;
        line-height: 1.3 !important;
    }
    
    .wpmr-summary {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }
}

/* ===== 暗色模式支持 ===== */
@media (prefers-color-scheme: dark) {
    .wpmr-item {
        background: #1e2630 !important;
        border-color: #2d3540 !important;
    }
    
    .wpmr-item:hover {
        border-color: #3d4550 !important;
    }
    
    .wpmr-site {
        background: #27ae60 !important;
        color: #ffffff !important;
    }
    
    .wpmr-title a {
        color: #2ecc71 !important;
    }
    
    .wpmr-title a:hover {
        color: #58d68d !important;
        border-bottom-color: #58d68d !important;
    }
    
    .wpmr-date {
        color: #7a8797 !important;
    }
    
    .wpmr-summary {
        color: #b0bcc8 !important;
        border-top-color: #2d3540 !important;
    }
    
    .wpmr-footer {
        color: #5a6777 !important;
        border-top-color: #2d3540 !important;
    }
    
    .wpmr-empty {
        background: #1a222a !important;
        border-color: #2d3540 !important;
        color: #8a97a7 !important;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .wpmr-item {
        border-color: #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
    }
    
    .wpmr-title a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .wpmr-item:hover {
        transform: none !important;
    }
}