/*
Theme Name: RoseLove Child
Template: RoseLove
*/

/* 1. FIX MÀU VÍ (Lấy theo cách ChatGPT) */
a[href*="wallet"].btn,
.navbar a[href*="wallet"] {
    background: linear-gradient(135deg, #7f1d1d, #dc2626) !important;
    color: #fff !important;
}

/* 2. FIX TÊN CHƯƠNG BỊ BÉ */
.entry-title, 
h1.entry-title, 
.tdb-title-text {
    font-size: 32px !important;
    display: block !important;
}
/* --- Thiết lập chung cho vùng nội dung --- */
.reader-body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    line-height: 1.75; /* Tỷ lệ vàng cho việc đọc lâu không mỏi mắt */
}

/* --- Tinh chỉnh từng Font --- */

/* Literata: Ưu tiên sự trang nhã, giãn nhẹ để đọc truyện/tiểu thuyết */
.font-literata {
    font-family: 'Literata', serif;
    font-size: 18px !important;            /* Kích cỡ tối ưu cho màn hình di động/tablet */
    letter-spacing: 0.02em !important;     /* Giãn nhẹ các chân chữ serif */
    word-spacing: 0.05em !important;
}

/* Source Serif 4: Font rất nét, có thể để cỡ chữ lớn hơn một chút */
.font-source-serif {
    font-family: 'Source Serif 4', serif;
    font-size: 17.5px !important;
    letter-spacing: 0.01em !important;     /* Font này vốn đã thoáng, không cần giãn nhiều */
    word-spacing: 0.02em !important;
}

/* Nunito Sans: Font không chân, cần độ giãn để tránh dính chữ */
.font-nunito {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16.5px !important;          /* Font Sans-serif thường trông to hơn Serif cùng size */
    letter-spacing: 0.035em !important;    /* Giãn rộng hơn để tạo cảm giác hiện đại */
    font-weight: 400 !important;
}

/* --- Đáp ứng màn hình nhỏ (Mobile) --- */
@media (max-width: 600px) {
    .font-literata, .font-source-serif, .font-nunito {
        font-size: 16.5px !important;        /* Giảm nhẹ size trên điện thoại để không quá thô */
        line-height: 1.6;
    }
}
 
@media (max-width: 768px) {
    #chapter-content-text {
        width: 100% !important;
        max-width: 100% !important;
    }
}


.td-main-wrapper {
    width: 100% !important;
}
.btn-primary {
  background-color: var(--td-primary);
  transition: all 0.2s ease;
}
.btn-primary {
  background-color: var(--td-primary);
  transition: all 0.2s ease;
}
.btn-primary,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.scroll-top-icon,
.scroll-top-icon:hover,
.scroll-top-icon:active,
.scroll-top-icon:focus {
  background-color: var(--td-primary) !important;
  border-color: var(--td-primary) !important;
  color: #fff !important;
}

/* phản hồi nhanh - không lag */
.btn-primary,
.scroll-top-icon {
  transition: background-color 0.12s ease, transform 0.12s ease, filter 0.12s ease !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* hiệu ứng hover nhẹ (PC) */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover,
  .scroll-top-icon:hover {
    filter: brightness(1.1);
  }
}

/* hiệu ứng khi bấm (mobile + PC) */
.btn-primary:active,
.scroll-top-icon:active {
  filter: brightness(1.15);
  transform: scale(0.97);
  transition: none !important;
}
:root {
  --td-primary: #4d6300 !important;
  --td-primary-hover: #3f4f00 !important;
  --td-primary-rgb: 77, 99, 0 !important;
}

/* chỉ ép đúng component chính */
.btn-primary,
.btn-outline-primary,
.page-item.active .page-link,
.nav-pills .nav-link.active,
.form-check-input:checked {
  background-color: var(--td-primary) !important;
  border-color: var(--td-primary) !important;
  color: #fff !important;
}

/* hover đẹp nhưng không phá text */
.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-primary:active {
  filter: brightness(1.15);
  transform: scale(0.97);
}

/* scroll top */
.scroll-top-icon {
  background-color: var(--td-primary) !important;
}
#chapter-content-text {
  opacity: 1;
  transition: opacity 0.15s ease;
}
#chapter-content-text {
  will-change: opacity;
  contain: layout style paint;
}