/* nền hồng nhẹ */
.pink-bg, .single-post main.uk-section { padding: 20px 0 40px; }

/* khối chính màu trắng */
.story-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.06); padding: 18px; }

/* tiêu đề */
.story-title { font-weight: 800; font-size: 26px; margin: 6px 0 10px; }
:root[data-theme="dark"] .story-title {    color: #c5c5c5;}
/* cover */
/* .cover img { width: 100%; height: auto; display: block; }
.no-cover { max-height: 360px; aspect-ratio: 3 / 4; display:flex; align-items:center; justify-content:center; background:#f2f2f2; color:#999; } */
.cover{
  width: 250px;
  height: 350px;
  position: relative;
  overflow: hidden;      /* để bo góc + cắt phần thừa */
  border-radius: 8px;    /* nếu muốn bo góc, hoặc dùng uk-border-rounded ở đây */
}

.cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;     /* quan trọng: fill và crop cho đủ khung */
  object-position: center;
  display: block;        /* bỏ khoảng trắng dưới img */
}
.no-cover{
  width:100%; height:100%;
  display:grid; place-items:center;
  background:#f3f4f6; color:#6b7280;
}
.gd-cover{
  width: 250px;
  height: 300px;
  display: block;         /* tránh khoảng trắng dưới img */
  border-radius: 8px;     /* nếu muốn bo góc, ngoài ra uk-border-rounded cũng ok */
}

/* Chỉ áp cho IMG (div placeholder không cần object-fit) */
img.gd-cover{
  object-fit: cover;
  object-position: center;
}


/* nút hàng ngang */
.action-row { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 4px; }
.like-btn.is-liked [uk-icon="heart"] svg path{ stroke: #E91E63!important;    fill: #ff0000!important;}


.meta-label {font-weight: bold;}
/* layout 2 cột cho meta */
.meta-row {    display: flex;    gap: 16px;    align-items: flex-start;    margin-bottom: .5rem;    margin-top: 0 !important;}
.meta-label { flex:0 0 150px; max-width:160px; font-weight:600; color:#222; }
.meta-value { flex:1; display:flex; flex-wrap:wrap; gap:8px; color:#333; }
span.meta-value a {
    color: #333;
}
/* pills */
.chip { display:inline-flex; align-items:center; padding:6px 12px; border-radius:999px;
        font-weight:600; line-height:1; font-size:14px; border:1px solid transparent; text-decoration:none; }
.chip-pink { background:#f59ac6; color:#fff; }
.chip-blue { background:#16b7d7; color:#fff; }
.chip-outline { background:#fff; color:#222; border-color:#3ea8ff; }
.chip-outline:hover { background:#f2f8ff; }

@media (max-width:640px){
  .meta-label { flex-basis:100px; }
}

/* mô tả gập/mở */
.desc { margin-top:14px; }
.desc-inner { line-height:1.75; color:#333; }
:root[data-theme="dark"] .desc-inner {
    color: #e1e1e1;
}
.desc-inner.clamp { display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.desc-toggle { margin-top:6px; background:transparent; border:0; color:#d61a3c; cursor:pointer; }

/* card danh sách chương */
.chap-card { margin-top:18px; padding:14px; border:1px solid #f3f3f3; border-radius:10px; }
.chap-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
.chap-toolbar .right { display:flex; gap:6px; align-items:center; }

.chap-list { list-style:none; margin:0; padding:0; }
.chap-item { display:flex; align-items:center; padding:10px 6px; border-bottom:1px solid #f4f4f4; }
.chap-link { color:#1a1a1a; font-weight:500; text-decoration:none; }
:root[data-theme="dark"]  .chap-link {
    color: #ffffff;
    text-transform: capitalize;
}
.chap-link:hover { text-decoration:underline; }
.vip-badge { margin-left:8px; font-size:11px; font-weight:700; padding:1px 6px; border-radius:4px; background:#ffe1e6; color:#d60039; border:1px solid #ffc0cb; }
.dots { flex:1; margin:0 10px; border-bottom:0px dotted #dcdcdc; height:0; }
.chap-date { white-space:nowrap; color:#888; }

/* skeleton */
.sk .sk-line { display:inline-block; height:14px; background:linear-gradient(90deg,#eee,#f7f7f7,#eee); background-size:200% 100%; animation:sk 1.2s infinite; border-radius:4px; }
@keyframes sk {0%{background-position:200% 0}100%{background-position:-200% 0}}
.sk .dots { border-bottom-color: transparent; }

/* responsive */
@media (max-width: 960px){
  .meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px){
  .meta { grid-template-columns:repeat(1,minmax(0,1fr)); }
  .chap-toolbar { flex-direction:column; align-items:stretch; }
  .chap-toolbar .right { width:100%; }
}
.story-title .purchased-badge {
    color: #28a745; /* Màu xanh lá cây */
    font-size: 0.8em; /* Kích thước nhỏ hơn tiêu đề */
    font-weight: bold;
    vertical-align: middle; /* Căn giữa theo chiều dọc */
    background-color: #eaf6ec;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}
/* CSS cho trường Honeypot chống spam */
.form-honeypot {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}
/* --- CSS CHO CHƯƠNG VIP --- */

/* Badge VIP mặc định (chưa mua) - Giữ nguyên màu đỏ */
.vip-badge {
    margin-left: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: #ffe1e6;
    color: #d60039;
    border: 1px solid #ffc0cb;
    display: inline-flex; /* Giúp icon và chữ căn đều */
    align-items: center;
    gap: 4px; /* Khoảng cách giữa icon và chữ VIP */
}

/* === PHẦN CSS MỚI === */
/* Badge VIP khi đã mua (is-purchased) - Đổi sang màu xanh */
.vip-badge.is-purchased {
    background-color: #eaf6ec;
    color: #28a745;
    border-color: #a4d4b1;
}

/* Căn chỉnh lại icon một chút cho đẹp */
.vip-badge [uk-icon] {
    margin-top: -1px;
}
