/* Theme Name: MeTruyen Core v2 */
body { background-color: #111; color: #ddd; font-family: sans-serif; margin: 0; }
a { color: #fff; text-decoration: none; }
a:hover { color: #ff9800; }
.container-truyen { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Lưới truyện */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
.item-truyen { background: #222; border-radius: 5px; overflow: hidden; transition: 0.3s; }
.item-truyen:hover { transform: translateY(-5px); border: 1px solid #ff9800; }
.img-box { height: 200px; overflow: hidden; position: relative; }
.img-box img { width: 100%; height: 100%; object-fit: cover; }
.view-tag { position: absolute; bottom: 5px; right: 5px; background: rgba(0,0,0,0.8); color: #ffb74d; font-size: 11px; padding: 2px 5px; border-radius: 3px; }
.item-truyen h3 { font-size: 13px; margin: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

/* Chi tiết truyện */
.info-truyen { display: flex; gap: 20px; background: #222; padding: 20px; border-radius: 10px; margin-bottom: 20px; }
.col-left img { width: 200px; border-radius: 5px; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.col-right h1 { color: #ff9800; margin-top: 0; }
.list-chuong-box { background: #222; padding: 20px; border-radius: 10px; }
.list-chapters { list-style: none; padding: 0; max-height: 500px; overflow-y: auto; border: 1px solid #333; }
.list-chapters li { border-bottom: 1px dashed #333; }
.list-chapters a { display: block; padding: 10px; transition: 0.2s; }
.list-chapters a:hover { background: #333; padding-left: 15px; color: #ff9800; }

/* Đọc truyện */
.reading-box img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.reading-nav { text-align: center; margin: 20px; }
.reading-nav a { background: #ff9800; color: #000; padding: 10px 20px; border-radius: 5px; font-weight: bold; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .info-truyen { flex-direction: column; }
    .col-left img { width: 100%; max-width: 200px; margin: 0 auto; display: block; }
    .list-grid { grid-template-columns: repeat(2, 1fr); }
}