@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #080d1a;
    color: #f8fafc;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    padding: 20px;
    line-height: 1.5;
}

.container-feed {
    max-width: 640px;
    margin: 0 auto;
    padding: 10px 0 40px 0;
    width: 100%;
}

/* ==========================================================================
   HERO & INTERACTION BUTTON STYLING
   ========================================================================== */
.hero-section {
    text-align: center;
    margin-bottom: 35px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6d28d9, #2563eb);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: auto;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 40, 217, 0.45);
    filter: brightness(1.1);
}

.btn-icon {
    display: flex;
    align-items: center;
    font-size: 1.15rem;
}

/* ==========================================================================
   FEED GLASSMORPHISM CARDS
   ========================================================================== */
.feed {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.animated-item {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.animated-item.in-view {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

/* Staggered Entrance Delays */
.animated-item:nth-child(1) { transition-delay: 0.02s; }
.animated-item:nth-child(2) { transition-delay: 0.08s; }
.animated-item:nth-child(3) { transition-delay: 0.14s; }
.animated-item:nth-child(4) { transition-delay: 0.20s; }
.animated-item:nth-child(5) { transition-delay: 0.26s; }

.card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 24px 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card-text {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.65;
    color: #f1f5f9;
    letter-spacing: -0.005em;
    margin: 0;
    white-space: pre-wrap;
    text-align: justify;
    text-align-last: left; 
    word-break: keep-all;  
    overflow-wrap: break-word; 
}

/* ==========================================================================
   METADATA & INTERACTIVE ACTION SYSTEM
   ========================================================================== */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
    padding-top: 16px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: rgba(124, 58, 237, 0.08);
    color: #a78bfa;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.time-dot {
    color: #334155;
    font-size: 10px;
}

.time {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* LIKE COMPONENT ENGINE */
.like-btn {
    all: unset;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 14px;
    border-radius: 12px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.like-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.heart {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.heart i {
    display: block;
}

.like-btn:hover .heart {
    transform: scale(1.1);
}

/* State Aktif Terpilih (Liked) */
.like-btn.liked {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.like-btn.liked .heart {
    animation: heartPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.like-count {
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   MODERN UI PACKAGING (PAGINATION ULTIMATE RESET)
   ========================================================================== */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Sembunyikan text deskripsi "Showing X to Y of Z results" bawaan Laravel */
.pagination-container nav > div:first-child {
    display: none !important;
}

/* Sembunyikan element wrapper bawaan yang ngerusak flex layout */
.pagination-container nav {
    display: block !important;
    width: auto;
}

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

/* Mengunci standardisasi kotak untuk tombol nomor dan tombol panah */
.pagination li .page-link,
.pagination li span,
.pagination-container nav div[role="navigation"] a,
.pagination-container nav div[role="navigation"] span {
    background: rgba(255, 255, 255, 0.02) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    min-width: 44px !important; 
    max-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    cursor: pointer;
}

/* Efek Hover tombol */
.pagination li a.page-link:hover,
.pagination-container nav div[role="navigation"] a:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Halaman Aktif saat ini */
.pagination li.active span,
.pagination li.active .page-link,
.pagination-container nav div[role="navigation"] .active span {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #ffffff !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35) !important;
    cursor: default !important;
    transform: none !important;
}

/* JINAKKAN SVG RAKSASA (Ini yang bikin panah lu segede gaban tadi) */
.pagination-container svg,
.pagination li .page-link svg,
.pagination li span svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    fill: currentColor !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Matikan tombol di ujung halaman */
.pagination li.disabled span,
.pagination li.disabled .page-link {
    opacity: 0.25 !important;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.02) !important;
    color: #475569 !important;
    transform: none !important;
    box-shadow: none !important;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #10b981;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.empty-state {
    text-align: center;
    padding: 50px 24px;
    color: #64748b;
    border: 2px dashed rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.01);
}

.empty-state p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS ADAPTATION
   ========================================================================== */
@media (max-width: 640px) {
    body { padding: 12px; }
    .container-feed { padding: 5px 0 20px 0; }
    .hero-section { margin-bottom: 24px; text-align: center; }
    .btn-primary { width: 100%; }
    .card { padding: 20px; border-radius: 20px; }
    .card-text { font-size: 1rem; }
    .card-footer { margin-top: 16px; padding-top: 14px; }
    .badge { padding: 3px 10px; font-size: 0.68rem; }
}
