/* AI Press Automation - Frontend CSS */

.ai-press-frontend-container {
    max-width: 1200px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    line-height: 1.5;
}

/* 상단 헤더 & 라이브 상태 */
.ai-press-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #0f172a;
}

.feed-main-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #0f172a;
    letter-spacing: -0.5px;
}
.feed-sub-title {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.feed-live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}
.pulse {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-refresh-feed {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}
.btn-refresh-feed:hover {
    color: #0f172a;
    transform: rotate(90deg);
}

/* 카테고리 탭 */
.ai-press-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    scrollbar-width: none;
}
.ai-press-category-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.cat-tab-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.cat-tab-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* 언론사 칩 필터 */
.ai-press-source-chips {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.source-chip-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}
.source-chips-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.source-chips-scroll::-webkit-scrollbar {
    display: none;
}
.source-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.source-chip:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}
.source-chip.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* 뉴스 카드 그리드 */
.ai-press-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.news-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}
.news-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.card-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.card-source-badge {
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
}
.card-cat-badge {
    background: #f1f5f9;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.card-title-link {
    text-decoration: none;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title-link:hover {
    color: #2563eb;
}

/* 5분 실시간 NEW 뱃지 */
.card-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
    animation: flash 1.5s infinite;
}
@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.card-excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    font-size: 12px;
    color: #94a3b8;
}
.card-time {
    display: flex;
    align-items: center;
    gap: 4px;
}
.card-read-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 12.5px;
}
.card-read-link:hover {
    text-decoration: underline;
}

/* 더보기 버튼 */
.feed-pagination-wrapper {
    text-align: center;
    margin-top: 20px;
}
.btn-load-more {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-load-more:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* 스켈레톤 로딩 */
.feed-skeleton-loading {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.skeleton-card {
    height: 180px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
