#feed {
    padding-top: 100px;
    background: #f9fafb;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.load-more-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--brand);
    background: #fff;
    color: var(--brand);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.load-more-btn:hover {
    background: var(--brand);
    color: #fff;
}

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

#feed .sub { color: var(--muted); }

.feed-head-actions { display: flex; gap: 8px; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 150px 20px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}

.empty-state .btn {
    margin-top: 8px;
}

.feed-toolbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.feed-filters{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feed-sort{
    display: flex;
    gap: 8px;
}

.feed-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.f-card{
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
}

.f-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15,23,42,.12);
}

.f-media{
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    background: var(--card);
}

.f-media img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f-badges{
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.f-chip{
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: rgba(17,17,17,.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.15);
}

.f-body{
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.f-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.f-user{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.f-avatar{
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f-user-meta{ min-width: 0; }

.f-name{
    font-weight: 900;
    font-size: 13px;
    line-height: 1.1;
}

.f-time{
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.f-more{
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.f-more:hover {
    background: #f9fafb;
}

.f-more svg {
    width: 16px;
    height: 16px;
    stroke: var(--muted);
}

.f-caption{
    margin: 0;
    color: #374151;
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.f-actions{
    display: flex;
    gap: 6px;
    align-items: center;
}

.f-btn{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 4px;
    border-radius: 4px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    color: #111;
    transition: color 0.15s ease;
    line-height: 1;
}

.f-btn svg {
    display: block;
    flex-shrink: 0;
}

.icon-container {
    display: inline-flex;
    align-items: center;
}

.f-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.f-btn:hover {
    color: #111;
}

.f-btn.is-liked {
    color: #ff6b00;
}

.f-btn.is-liked:hover {
    color: #dd5500;
}

.f-btn.is-liked .f-icon {
    color: #ff6b00;
}

.feed-bottom{
    display: grid;
    place-items: center;
    margin-top: 18px;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.slider-btn svg {
    width: 20px;
    height: 20px;
}

.detail-more svg {
    width: 20px;
    height: 20px;
    stroke: var(--muted);
}

.detail-stat svg {
    width: 20px;
    height: 20px;
    display: block;
}

.pagination{
    display: grid;
    place-items: center;
    margin-top: 22px;
}

.pagination-inner{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.page-list{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
}

.page-btn,
.page-num{
    height: 34px;
    min-width: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    color: var(--text);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover,
.page-num:hover{
    background: #f9fafb;
}

.page-num.is-active{
    border-color: transparent;
    background: var(--brand);
    color: #fff;
}

.page-ellipsis{
    padding: 0 4px;
    color: var(--muted);
    font-weight: 900;
}

.page-btn:disabled,
.page-num:disabled{
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 480px){
    .pagination-inner{
        gap: 8px;
        padding: 10px;
    }
    .page-btn,
    .page-num{
        height: 32px;
        min-width: 32px;
        padding: 0 10px;
        font-size: 12px;
    }
}

@media (max-width: 1024px){
    .feed-grid{ grid-template-columns: repeat(2, 1fr); }
    .feed-toolbar{ flex-direction: column; align-items: stretch; }
    .feed-sort{ justify-content: flex-end; }
}

@media (max-width: 640px){
    .feed-grid{ grid-template-columns: 1fr; }
}