/* ==========================================================
   USER PAGES — history.blade.php & favorites.blade.php
   Tất cả CSS user page tập trung ở đây, không để trong blade
   ========================================================== */


/* ----------------------------------------------------------
   SHARED: Card nằm ngang dùng chung cả 2 trang
   ---------------------------------------------------------- */
.list-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    list-style: none;
    width: 100%;
}

.card-horizontal {
    position: relative;
    display: flex;
    flex-direction: row;
    background-color: #171d21;
    border: 1px solid #2a343b;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.card-horizontal:hover {
    border-color: #e2d703;
    box-shadow: 0 6px 20px rgba(226, 215, 3, 0.12);
    transform: translateY(-2px);
}

/* Link tàng hình bọc kín toàn card */
.full-card-link { position: absolute; inset: 0; z-index: 1; }

/* Poster */
.card-horizontal .img-box { width: 140px; flex-shrink: 0; position: relative; }
.card-horizontal .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 2/3;
    display: block;
}

/* Play overlay khi hover */
.card-horizontal .img-box::after {
    content: '\f144';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.card-horizontal:hover .img-box::after { opacity: 1; }

/* Info box */
.card-horizontal .info-box {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
}
.card-horizontal .top-info h4 {
    color: #fff;
    font-size: 18px;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.card-horizontal .year { color: #888; font-size: 13px; }

.card-horizontal .meta-info {
    display: flex;
    gap: 10px;
    color: #ccc;
    font-size: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.card-horizontal .quality {
    border: 1px solid #e2d703;
    color: #e2d703;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* Nút action */
.card-horizontal .action-buttons {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}
.card-horizontal .btn-remove {
    position: relative;
    z-index: 2;
    background-color: rgba(255, 77, 77, 0.08);
    color: #ff4d4d;
    border: 1px solid #ff4d4d;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}
.card-horizontal .btn-remove:hover { background-color: #ff4d4d; color: #fff; }


/* ----------------------------------------------------------
   PAGE HEADER (dùng chung)
   ---------------------------------------------------------- */
.user-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 0 15px;
}
.user-page-header h4 {
    color: #fff;
    font-size: 24px;
    margin: 0;
    border-left: 4px solid #e2d703;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-page-header h4 i { color: #e2d703; font-size: 20px; }
.user-page-header .count-badge {
    background: rgba(226, 215, 3, 0.12);
    border: 1px solid rgba(226, 215, 3, 0.3);
    color: #e2d703;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}


/* ----------------------------------------------------------
   EMPTY STATE (dùng chung)
   ---------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    background: #171d21;
    border-radius: 12px;
    border: 1px dashed #2a343b;
}
.empty-state i { font-size: 48px; color: #333; margin-bottom: 16px; display: block; }
.empty-state h5 { color: #888; font-size: 16px; margin-bottom: 12px; }
.empty-state a { color: #e2d703; text-decoration: none; font-weight: 600; font-size: 14px; }
.empty-state a:hover { text-decoration: underline; }


/* ----------------------------------------------------------
   HISTORY PAGE — riêng
   ---------------------------------------------------------- */
.history-page {
    padding-top: 40px;
    padding-bottom: 80px;
    min-height: 80vh;
    background-color: #11141d;
}

/* Badge "Xem gần nhất" */
.watched-at {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #aaa;
}
.watched-at i { color: #e2d703; font-size: 11px; }

/* Nút "Xem tiếp" */
.btn-watch-cont {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #e2d703;
    color: #111;
    padding: 7px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background-color 0.2s, transform 0.15s;
}
.btn-watch-cont:hover { background-color: #f0e520; transform: scale(1.03); color: #111; }


/* ----------------------------------------------------------
   FAVORITES PAGE — riêng
   ---------------------------------------------------------- */
.favorites-page {
    padding-top: 40px;
    padding-bottom: 80px;
    min-height: 80vh;
    background-color: #11141d;
}


/* ----------------------------------------------------------
   MOBILE RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 600px) {
    .card-horizontal .img-box { width: 100px; }
    .card-horizontal .info-box { padding: 10px 12px; gap: 6px; }
    .card-horizontal .top-info h4 { font-size: 15px; }
    .card-horizontal .meta-info span:nth-child(2) { display: none; }
    .card-horizontal .btn-remove { padding: 6px 10px; font-size: 12px; }
    .btn-watch-cont span, .card-horizontal .btn-remove span { display: none; }
    .btn-watch-cont, .card-horizontal .btn-remove { padding: 8px 10px; }
    .user-page-header h4 { font-size: 20px; }
}
