/* ============================================
   NEWTRUYEN - MODERN NOVEL READING TEMPLATE
   Custom Stylesheet
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Primary Colors */
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --primary-light: #6b83f2;
  --primary-rgb: 67, 97, 238;

  /* Accent Colors */
  --accent: #f72585;
  --accent-dark: #d91e72;
  --accent-light: #ff5ca1;

  /* Status Colors */
  --success: #06d6a0;
  --warning: #ffd166;
  --danger: #ef476f;
  --info: #118ab2;

  /* Neutral Colors */
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --gray-900: #212529;
  --gray-800: #343a40;
  --gray-700: #495057;
  --gray-600: #6c757d;
  --gray-500: #adb5bd;
  --gray-400: #ced4da;
  --gray-300: #dee2e6;
  --gray-200: #e9ecef;
  --gray-100: #f8f9fa;
  --white: #ffffff;

  /* Background */
  --bg-body: #f0f4ff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8faff;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-primary: 0 4px 15px rgba(var(--primary-rgb), 0.3);

  /* Border Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 50px;

  /* Transition */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  /* Font */
  --font-family: 'Be Vietnam Pro', sans-serif;
}

/* ---------- Base Styles ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ---------- Buttons (Global) ---------- */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 8px 20px;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family);
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
  color: var(--white);
}

.btn-outline-custom {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 8px 20px;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family);
}

.btn-outline-custom:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}

.btn-accent-custom {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 8px 20px;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family);
}

.btn-accent-custom:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 4px 15px rgba(247, 37, 133, 0.3);
  transform: translateY(-1px);
  color: var(--white);
}

.btn-sm-custom {
  padding: 5px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg-custom {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

/* ---------- HEADER ---------- */
.site-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 2px 20px rgba(var(--primary-rgb), 0.3);
}

.header-top {
  padding: 12px 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 18px;
  backdrop-filter: blur(10px);
}

.header-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.header-logo-text span {
  color: var(--warning);
}

.header-search {
  position: relative;
  max-width: 480px;
  flex: 1;
  margin: 0 24px;
}

.header-search-input {
  width: 100%;
  padding: 10px 20px 10px 42px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: var(--white);
  font-size: 13px;
  font-family: var(--font-family);
  transition: var(--transition);
}

.header-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.header-search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.header-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn-login {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 8px 18px;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
  backdrop-filter: blur(10px);
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-btn-login:hover {
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
  transform: translateY(-1px);
}

.header-btn-register {
  background: var(--white);
  color: var(--primary);
  border: none;
  border-radius: var(--radius);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-btn-register:hover {
  background: var(--gray-100);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Navigation */
.header-nav {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

.header-nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.header-nav-item {
  position: relative;
}

.header-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 13px;
  transition: var(--transition);
  white-space: nowrap;
}

.header-nav-link:hover,
.header-nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.header-nav-link.active {
  font-weight: 700;
}

.header-nav-link i {
  font-size: 12px;
}

/* Dropdown */
.header-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 520px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1060;
}

.header-nav-item:hover .header-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.header-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.header-dropdown-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.header-dropdown-link:hover {
  background: var(--bg-body);
  color: var(--primary);
}

.header-dropdown-link i {
  font-size: 11px;
  color: var(--primary);
  width: 16px;
  text-align: center;
}

/* Mobile Toggle */
.header-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  padding: 5px;
}

/* ---------- ANNOUNCEMENT BAR ---------- */
.announcement-bar {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.announcement-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  flex-shrink: 0;
  animation: announcement-pulse 2s infinite;
}

@keyframes announcement-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0);
  }
}

.announcement-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.announcement-slider {
  position: relative;
  height: 20px;
}

.announcement-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.announcement-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.announcement-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-text strong {
  color: var(--primary);
}

.announcement-progress {
  height: 2px;
  background: var(--gray-200);
  border-radius: 1px;
  margin-top: 6px;
  overflow: hidden;
}

.announcement-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 1px;
  width: 0%;
  transition: width 0.1s linear;
}

.announcement-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.announcement-detail-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

.announcement-detail-btn i {
  font-size: 10px;
}

.announcement-close {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}

.announcement-close:hover {
  color: var(--gray-700);
}

/* ---------- SECTION HEADER ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  margin: 0;
}

.section-title-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
}

.section-viewall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(var(--primary-rgb), 0.08);
  transition: var(--transition);
}

.section-viewall:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
}

/* ---------- FEATURED STORIES ---------- */
.featured-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.featured-carousel {
  position: relative;
  overflow: hidden;
}

.featured-track {
  display: flex;
  gap: 16px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card {
  flex: 0 0 calc(16.666% - 14px);
  min-width: 140px;
  cursor: pointer;
  transition: var(--transition);
}

.featured-card:hover {
  transform: translateY(-5px);
}

.featured-card-cover {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow);
}

.featured-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.featured-card:hover .featured-card-cover img {
  transform: scale(1.05);
}

.featured-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-card-stat {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
}

.featured-card-stat i {
  font-size: 10px;
}

.featured-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.featured-card-badge.badge-full {
  background: linear-gradient(135deg, var(--success), #05c090);
}

.featured-card-badge.badge-new {
  background: linear-gradient(135deg, var(--info), #0e7fa5);
}

.featured-card-title {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Carousel Navigation */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.carousel-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

.carousel-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
}

.carousel-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

/* ---------- RECENTLY UPDATED ---------- */
.updated-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.updated-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.updated-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  background: var(--white);
}

.updated-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
  transform: translateY(-2px);
}

.updated-card-cover {
  width: 90px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.updated-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.updated-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.updated-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.updated-card-title:hover {
  color: var(--primary);
}

.updated-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.updated-card-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  transition: var(--transition-fast);
}

.updated-card-tag:hover {
  background: var(--primary);
  color: var(--white);
}

.updated-card-desc {
  font-size: 12px;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  line-height: 1.5;
}

.updated-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  font-size: 11px;
  color: var(--gray-500);
}

.updated-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.updated-card-meta i {
  font-size: 10px;
}

.updated-card-chapter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ---------- RANKING & TRANSLATOR SECTION ---------- */
.ranking-section {
  margin-top: 24px;
}

.ranking-tabs-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.ranking-tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
}

.ranking-tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  font-family: var(--font-family);
  border-radius: var(--radius) var(--radius) 0 0;
}

.ranking-tab-btn:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
}

.ranking-tab-btn.active {
  color: var(--primary);
  font-weight: 700;
}

.ranking-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition-fast);
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-item:hover {
  background: var(--bg-card-hover);
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: var(--radius-sm);
}

.ranking-number {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--gray-100);
  color: var(--gray-600);
}

.ranking-number.top-1 {
  background: linear-gradient(135deg, #ffd700, #ffb300);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(255, 179, 0, 0.4);
}

.ranking-number.top-2 {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: var(--white);
}

.ranking-number.top-3 {
  background: linear-gradient(135deg, #cd7f32, #b5651d);
  color: var(--white);
}

.ranking-cover {
  width: 42px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info {
  flex: 1;
  min-width: 0;
}

.ranking-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-title:hover {
  color: var(--primary);
}

.ranking-stats {
  font-size: 11px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.ranking-stats span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Translator Honor */
.translator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  margin-bottom: 10px;
}

.translator-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
}

.translator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--primary-light);
}

.translator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.translator-info {
  flex: 1;
}

.translator-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.translator-stats {
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.translator-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Section tabs for ranking */
.section-tab-container {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 0;
}

.section-tab-btn {
  flex: 1;
  padding: 14px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-600);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.section-tab-btn:hover {
  color: var(--primary);
}

.section-tab-btn.active {
  color: var(--primary);
}

.section-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.section-tab-btn i {
  font-size: 14px;
}

/* ---------- COMPLETED STORIES ---------- */
.completed-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.completed-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.completed-card {
  cursor: pointer;
  transition: var(--transition);
}

.completed-card:hover {
  transform: translateY(-5px);
}

.completed-card-cover {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-sm);
}

.completed-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.completed-card:hover .completed-card-cover img {
  transform: scale(1.05);
}

.completed-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, var(--success), #05c090);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.completed-card-title {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.completed-card-title:hover {
  color: var(--primary);
}

/* Pagination */
.pagination-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pagination-custom .page-item-custom .page-link-custom {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.pagination-custom .page-item-custom .page-link-custom:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
}

.pagination-custom .page-item-custom.active .page-link-custom {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--dark);
  color: var(--gray-400);
  margin-top: 40px;
  padding: 40px 0 0;
}

.footer-top {
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand-text span {
  color: var(--warning);
}

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-500);
  margin-bottom: 16px;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 14px;
  transition: var(--transition);
}

.footer-social-link:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-link-item {
  margin-bottom: 8px;
}

.footer-link {
  font-size: 13px;
  color: var(--gray-500);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-link:hover {
  color: var(--primary-light);
  padding-left: 4px;
}

.footer-link i {
  font-size: 10px;
  color: var(--primary-light);
}

.footer-bottom {
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  color: var(--gray-600);
}

.footer-bottom a {
  color: var(--primary-light);
}

.footer-bottom a:hover {
  color: var(--white);
}

/* ---------- BACK TO TOP ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 1040;
  box-shadow: var(--shadow-primary);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

/* ---------- LOADING SKELETON ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s ease forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.4s ease forwards;
}

/* Stagger animation delays */
.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

.delay-5 {
  animation-delay: 0.5s;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
  .featured-card {
    flex: 0 0 calc(20% - 13px);
  }

  .completed-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  .updated-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-card {
    flex: 0 0 calc(25% - 12px);
  }

  .completed-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .header-search {
    max-width: 320px;
    margin: 0 16px;
  }
}

@media (max-width: 768px) {
  .site-header {
    position: sticky;
  }

  .header-search {
    display: none;
  }

  .header-mobile-toggle {
    display: block;
  }

  .header-nav-list {
    flex-direction: column;
    padding: 10px;
    gap: 2px;
  }

  .header-nav-link {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .header-dropdown {
    position: static;
    min-width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 8px 16px;
    display: none;
  }

  .header-nav-item:hover .header-dropdown {
    display: block;
    transform: none;
  }

  .header-dropdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .updated-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    flex: 0 0 calc(33.333% - 12px);
  }

  .completed-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-tab-container {
    flex-direction: row;
    overflow-x: auto;
  }

  .section-tab-btn {
    font-size: 13px;
    padding: 12px 16px;
    white-space: nowrap;
  }

  .featured-section,
  .updated-section,
  .completed-section,
  .ranking-tabs-wrapper {
    padding: 16px;
    border-radius: var(--radius);
  }
}

@media (max-width: 576px) {
  body {
    font-size: 13px;
  }

  .featured-card {
    flex: 0 0 calc(50% - 8px);
  }

  .completed-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-title {
    font-size: 16px;
  }

  .header-logo-text {
    font-size: 18px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-btn-login,
  .header-btn-register {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ---------- MOBILE SEARCH ---------- */
.mobile-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1070;
  backdrop-filter: blur(4px);
}

.mobile-search-overlay.show {
  display: block;
}

.mobile-search-container {
  background: var(--white);
  padding: 20px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.mobile-search-input {
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-300);
  font-size: 14px;
  font-family: var(--font-family);
  transition: var(--transition);
}

.mobile-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

/* ---------- RANKING MAIN SECTION (with tab groups) ---------- */
.ranking-main-section {
  margin-top: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.ranking-main-body {
  padding: 24px;
}

/* Sub-tab nav for ranking types */
.ranking-subtab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ranking-subtab-btn {
  padding: 7px 16px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: var(--transition);
  font-family: var(--font-family);
}

.ranking-subtab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ranking-subtab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Translator grid */
.translator-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .translator-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- MISC ---------- */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gap-custom-sm {
  gap: 8px;
}

.gap-custom-md {
  gap: 16px;
}

.gap-custom-lg {
  gap: 24px;
}

/* ============================================
   STORY DETAIL PAGE
   ============================================ */

/* ---------- BREADCRUMB ---------- */
.breadcrumb-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  font-size: 13px;
  color: var(--gray-600);
  flex-wrap: wrap;
}

.breadcrumb-custom a {
  color: var(--gray-600);
  font-weight: 500;
  transition: var(--transition);
}

.breadcrumb-custom a:hover {
  color: var(--primary);
}

.breadcrumb-custom .breadcrumb-separator {
  color: var(--gray-400);
  font-size: 10px;
}

.breadcrumb-custom .breadcrumb-active {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- STORY INFO SECTION ---------- */
.story-detail-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.story-info-wrapper {
  display: flex;
  gap: 28px;
}

.story-cover-container {
  flex-shrink: 0;
  width: 280px;
}

.story-cover-image {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.story-cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-cover-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--success), #05c090);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.story-cover-badge.badge-ongoing {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.story-cover-badge.badge-hot {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.story-cover-rating {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.story-cover-rating i {
  color: var(--warning);
  font-size: 12px;
}

.story-cover-rating span {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.story-cover-rating .rating-count {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 400;
  margin-left: 4px;
}

/* Story Details */
.story-detail-body {
  flex: 1;
  min-width: 0;
}

.story-detail-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.story-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.story-detail-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  transition: var(--transition);
}

.story-detail-tag:hover {
  background: var(--primary);
  color: var(--white);
}

.story-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 12px;
}

.story-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-600);
  background: transparent;
  white-space: nowrap;
}

.story-meta-item i {
  color: var(--primary);
  font-size: 14px;
  flex-shrink: 0;
}

.story-meta-item .meta-label {
  color: var(--gray-500);
  font-weight: 400;
  font-size: 12px;
}

.story-meta-item .meta-value {
  font-weight: 700;
  color: var(--dark);
}

/* Description */
.story-description {
  margin-bottom: 20px;
}

.story-description-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-700);
  max-height: 108px;
  overflow: hidden;
  transition: max-height 0.5s ease;
  position: relative;
}

.story-description-text.expanded {
  max-height: 2000px;
}

.story-description-text:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--white));
}

.story-readmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0;
  margin-top: 4px;
  font-family: var(--font-family);
  transition: var(--transition);
}

.story-readmore-btn:hover {
  color: var(--primary-dark);
}

.story-readmore-btn i {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.story-readmore-btn.expanded i {
  transform: rotate(180deg);
}

/* Action Buttons */
.story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.story-btn-read {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 12px 28px;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
}

.story-btn-read:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-primary);
  transform: translateY(-2px);
  color: var(--white);
}

.story-btn-chapter-list {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 11px 28px;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
}

.story-btn-chapter-list:hover {
  background: rgba(var(--primary-rgb), 0.06);
  transform: translateY(-2px);
  color: var(--primary);
}

.story-btn-bookmark {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 11px 20px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
}

.story-btn-bookmark:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.story-btn-bookmark.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* ---------- CHAPTER LIST SECTION ---------- */
.chapter-list-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.chapter-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.chapter-list-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chapter-sort-btn {
  background: var(--gray-100);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chapter-sort-btn:hover,
.chapter-sort-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.chapter-search {
  position: relative;
}

.chapter-search-input {
  width: 200px;
  padding: 7px 14px 7px 32px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-family);
  transition: var(--transition);
  background: var(--gray-100);
}

.chapter-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.chapter-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 12px;
}

/* Chapter Grid */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: var(--white);
}

.chapter-item:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.03);
  transform: translateX(3px);
}

.chapter-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chapter-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition);
}

.chapter-item:hover .chapter-item-name {
  color: var(--primary);
}

.chapter-item-time {
  font-size: 11px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chapter-item-time i {
  font-size: 10px;
}

.chapter-item-new {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* Chapter Pagination */
.chapter-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

/* ---------- COMMENT SECTION ---------- */
.comment-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.comment-form {
  margin-bottom: 24px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 18px;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}


/* Comment Items */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--gray-100);
  transition: var(--transition);
}

.comment-item:hover {
  background: var(--bg-card-hover);
}

.comment-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.comment-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-item-body {
  flex: 1;
  min-width: 0;
}

.comment-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
}

.comment-item-date {
  font-size: 11px;
  color: var(--gray-500);
}

.comment-item-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.6;
}

.comment-item-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.comment-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  transition: var(--transition);
}

.comment-action-btn:hover {
  color: var(--primary);
}

/* Comment Author Badge */
.comment-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
}

/* Comment Like Liked State */
.comment-like-btn.liked {
  color: var(--accent);
}

.comment-like-btn.liked i {
  font-weight: 900;
}

/* WordPress Comment Form Overrides */
.comment-form-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.comment-form-inner p {
  margin: 0;
}

.comment-input-group {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comment-input-group form,
.comment-input-group .comment-respond {
  flex: 1;
  min-width: 0;
}

.comment-textarea {
  flex: 1;
  width: 100%;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  font-family: var(--font-family);
  resize: vertical;
  min-height: 80px;
  transition: var(--transition);
  line-height: 1.5;
  box-sizing: border-box;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Guest fields row */
.comment-fields-row {
  display: flex;
  gap: 10px;
}

.comment-field-input {
  flex: 1;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font-family);
  transition: var(--transition);
  background: var(--white);
}

.comment-field-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Submit Button */
.comment-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
}

.comment-submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

/* Hide default WP elements */
.comment-form-inner .comment-form-comment label,
.comment-form-inner .logged-in-as,
.comment-form-inner .comment-notes,
.comment-respond .comment-reply-title {
  display: none;
}

/* Reply link styling */
.comment-item-actions .comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  transition: var(--transition);
  text-decoration: none;
}

.comment-item-actions .comment-reply-link:hover {
  color: var(--primary);
}

/* Nested / Children comments */
.comment-item .children {
  margin-left: 20px;
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Avatar in comments - round */
.comment-item-avatar img {
  border-radius: 50%;
}

/* ---------- RELATED STORIES ---------- */
.related-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

/* Related stories: 5 cols */
.related-section .completed-grid,
.related-grid-5 {
  grid-template-columns: repeat(5, 1fr) !important;
}

/* Mobile stats bar — ẩn mặc định, chỉ hiện ở mobile */
.mobile-stats-bar {
  display: none;
}

/* ---------- STORY DETAIL RESPONSIVE ---------- */
@media (max-width: 992px) {
  .story-info-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .story-cover-container {
    width: 180px;
  }

  .story-detail-tags {
    justify-content: center;
  }

  .story-detail-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-actions {
    justify-content: center;
  }

  .story-description-text:not(.expanded)::after {
    background: linear-gradient(transparent, var(--white));
  }
}

@media (max-width: 768px) {
  .story-detail-section {
    padding: 20px;
  }

  .story-detail-title {
    font-size: 20px;
  }

  .story-cover-container {
    width: 160px;
  }

  .story-detail-meta {
    grid-template-columns: 1fr;
  }

  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .story-actions {
    flex-direction: column;
  }

  .story-btn-read,
  .story-btn-chapter-list,
  .story-btn-bookmark {
    width: 100%;
    justify-content: center;
  }

  .chapter-list-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .chapter-search-input {
    width: 100%;
  }
}

/* ============================================
   CHAPTER READER PAGE
   ============================================ */

/* ---------- READER LAYOUT ---------- */
.reader-page {
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.reader-page.reader-light {
  --reader-bg: #faf8f5;
  --reader-card-bg: var(--white);
  --reader-text: #2d2d2d;
  --reader-text-secondary: var(--gray-600);
  --reader-border: var(--gray-200);
  --reader-toolbar-bg: var(--white);
  --reader-content-bg: var(--white);
  --reader-hover: var(--gray-100);
}

.reader-page.reader-dark {
  --reader-bg: #1a1a2e;
  --reader-card-bg: #16213e;
  --reader-text: #e0e0e0;
  --reader-text-secondary: #a0a0b0;
  --reader-border: #2a2a4a;
  --reader-toolbar-bg: #16213e;
  --reader-content-bg: #1e1e3a;
  --reader-hover: #2a2a4a;
}

.reader-page {
  background-color: var(--reader-bg);
  color: var(--reader-text);
}

/* ---------- READER HEADER ---------- */
.reader-header {
  background: var(--reader-toolbar-bg);
  border-bottom: 1px solid var(--reader-border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.4s ease, border-color 0.4s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.reader-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.reader-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  font-family: var(--font-family);
  cursor: pointer;
  z-index: 2;
}

.reader-back-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.reader-title-group {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 50%;
  z-index: 1;
}

.reader-title-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.reader-title-link:hover {
  opacity: 0.85;
}

.reader-cover-thumb {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.reader-title-text {
  min-width: 0;
  text-align: left;
}

.reader-story-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--reader-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.4s ease;
}

.reader-chapter-title {
  font-size: 12px;
  color: var(--reader-text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.4s ease;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- READER CONTROL BUTTONS ---------- */
.reader-ctrl-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--reader-hover);
  border: 1px solid var(--reader-border);
  border-radius: var(--radius-sm);
  color: var(--reader-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-family);
  position: relative;
}

.reader-ctrl-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.reader-ctrl-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Wide control buttons with text */
.reader-ctrl-btn.reader-ctrl-btn-wide {
  width: auto;
  padding: 8px 16px;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.reader-ctrl-btn-wide .ctrl-text {
  font-size: 13px;
  font-weight: 600;
}

.reader-ctrl-btn .btn-tooltip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.reader-ctrl-btn:hover .btn-tooltip {
  opacity: 1;
  visibility: visible;
}

/* ---------- SETTINGS PANEL ---------- */
.reader-settings-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--reader-toolbar-bg);
  border: 1px solid var(--reader-border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 260px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s ease;
}

.reader-settings-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.setting-group {
  margin-bottom: 14px;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--reader-text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Font Size Controls */
.font-size-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.font-size-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--reader-hover);
  border: 1px solid var(--reader-border);
  border-radius: var(--radius-sm);
  color: var(--reader-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
}

.font-size-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.font-size-display {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--reader-text);
}

/* Theme Buttons */
.theme-options {
  display: flex;
  gap: 6px;
}

.theme-btn {
  flex: 1;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  border: 1.5px solid var(--reader-border);
  background: var(--reader-hover);
  color: var(--reader-text);
}

.theme-btn:hover {
  border-color: var(--primary);
}

.theme-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Chapter Select */
.chapter-select-wrapper {
  position: relative;
}

.chapter-select {
  width: 100%;
  max-width: 160px;
  padding: 8px 12px;
  border: 1.5px solid var(--reader-border);
  border-radius: var(--radius-sm);
  background: var(--reader-hover);
  color: var(--reader-text);
  font-size: 13px;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.chapter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* ---------- READER TOP NAV ---------- */
.reader-top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto 32px;
  padding: 16px 0;
  border-bottom: 1px solid var(--reader-border);
}

/* ---------- READER CONTENT ---------- */
.reader-content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.reader-chapter-heading {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--reader-border);
}

.reader-chapter-heading h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--reader-text);
  margin-bottom: 6px;
  line-height: 1.4;
  transition: color 0.4s ease;
}

.reader-chapter-heading .chapter-subtitle {
  font-size: 13px;
  color: var(--reader-text-secondary);
  transition: color 0.4s ease;
}

.reader-content {
  font-size: 18px;
  line-height: 2;
  color: var(--reader-text);
  transition: font-size 0.3s ease, color 0.4s ease;
}

.reader-content p {
  margin-bottom: 18px;
  text-align: justify;
}

.reader-content p:last-child {
  margin-bottom: 0;
}

/* ---------- READER BOTTOM NAV ---------- */
.reader-bottom-nav {
  position: sticky;
  bottom: 0;
  background: var(--reader-toolbar-bg);
  border-top: 1px solid var(--reader-border);
  padding: 12px 0;
  z-index: 100;
  transition: background-color 0.4s ease, border-color 0.4s ease;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.reader-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
}

.reader-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  border: 1.5px solid var(--reader-border);
  background: var(--reader-hover);
  color: var(--reader-text);
}

.reader-nav-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.reader-nav-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.reader-chapter-select-bottom {
  text-align: center;
}

.reader-chapter-select-bottom .chapter-select {
  width: 100%;
}

/* ---------- READER RESPONSIVE ---------- */
@media (max-width: 768px) {

  /* Header: ẩn title group, chỉ giữ back + controls */
  .reader-header-inner {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .reader-title-group {
    display: none;
  }

  /* Chapter select: nhỏ lại để nhường chỗ cho nút trước/sau */
  .chapter-select {
    max-width: 130px;
    min-width: 100px;
    font-size: 12px;
    padding: 6px 24px 6px 8px;
  }

  /* Content wrapper */
  .reader-content-wrapper {
    padding: 20px 16px 40px;
    max-width: 100%;
  }

  /* Top & bottom nav */
  .reader-top-nav {
    gap: 6px;
    padding: 12px 0;
    margin-bottom: 20px;
  }

  /* Content text */
  .reader-content {
    font-size: 16px;
    line-height: 1.9;
  }

  .reader-chapter-heading h1 {
    font-size: 18px;
  }

  .reader-chapter-heading .chapter-subtitle {
    font-size: 12px;
  }

  /* Nav buttons */
  .reader-nav-btn {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Bottom bar */
  .reader-bottom-inner {
    padding: 0 8px;
    gap: 4px;
  }

  .reader-ctrl-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .reader-ctrl-btn.reader-ctrl-btn-wide {
    width: auto;
    height: 32px;
    padding: 0 10px;
    gap: 4px;
  }

  .reader-ctrl-btn-wide .ctrl-text {
    display: inline;
    font-size: 11px;
  }
}

@media (max-width: 480px) {

  /* Back button: chỉ icon */
  .reader-back-btn span {
    display: none;
  }

  .reader-back-btn {
    padding: 8px 10px;
  }

  /* Content */
  .reader-content-wrapper {
    padding: 16px 12px 32px;
  }

  .reader-content {
    font-size: 15px;
  }

  /* Nav buttons: hiện text */
  .reader-nav-btn {
    padding: 8px 12px;
  }
}

/* ============================================================
   STORY SECONDARY ACTIONS (Report + Share)
   ============================================================ */

.story-secondary-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
}

.story-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-family);
  transition: color 0.2s ease;
}

.story-secondary-btn:hover {
  color: var(--primary);
}

.story-secondary-btn i {
  font-size: 12px;
}

/* Share Dropdown */
.story-share-wrapper {
  position: relative;
}

.story-share-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 0;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.story-share-wrapper.open .story-share-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.story-share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background 0.2s ease;
}

.story-share-item:hover {
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--text-primary);
}

.story-share-item.facebook i {
  color: #1877f2;
}

.story-share-item.twitter i {
  color: #1da1f2;
}

.story-share-item.telegram i {
  color: #0088cc;
}

.story-share-item.copy i {
  color: var(--text-secondary);
}

/* Report Modal (Bootstrap customization) */
.report-form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.report-form-input,
.report-form-textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-family);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.report-form-input:focus,
.report-form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.report-form-input[readonly] {
  background: #f9fafb;
  color: var(--text-secondary);
}

.report-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.report-btn-cancel {
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
}

.report-btn-cancel:hover {
  background: rgba(0, 0, 0, 0.04);
}

.report-btn-submit {
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-family);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.report-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
  color: var(--white);
}

.report-btn-submit i {
  margin-right: 6px;
}

/* ============================================================
   CATEGORY PAGE
   ============================================================ */

.category-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
}

.category-header-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--white);
  flex-shrink: 0;
}

.category-header-info {
  flex: 1;
  min-width: 0;
}

.category-header-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.category-header-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.category-header-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.category-stat {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.category-stat i {
  margin-right: 4px;
}

/* Filter Bar */
.category-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.category-filter-left {
  display: flex;
  gap: 8px;
}

.category-filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
}

.category-filter-btn:hover,
.category-filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.category-sort-select {
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-family);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 18px;
}

/* Story Grid */
/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.category-grid-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.category-grid-card:hover {
  transform: translateY(-4px);
}

.category-grid-cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.category-grid-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-grid-card:hover .category-grid-cover img {
  transform: scale(1.05);
}

.category-grid-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--white);
  z-index: 2;
}

.category-grid-badge.hot {
  background: #ef4444;
}

.category-grid-badge.full {
  background: #10b981;
}

.category-grid-badge.new {
  background: var(--primary);
}

.category-grid-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  display: flex;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-grid-card:hover .category-grid-overlay {
  opacity: 1;
}

.category-grid-overlay i {
  margin-right: 3px;
}

.category-grid-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 10px;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.category-grid-card:hover .category-grid-title {
  color: var(--primary);
}

.category-grid-meta {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pagination */
.category-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.page-dots {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 0 4px;
}

/* WordPress Pagination (paginate_links output) */
.page-item-custom {
  display: inline-flex;
}

.page-item-custom a,
.page-item-custom span,
.page-link-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.page-item-custom a:hover,
.page-link-custom:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.35);
}

.page-item-custom.active a,
.page-item-custom.active span,
.page-item-custom .current,
.page-link-custom.current {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.4);
  transform: translateY(-1px);
  pointer-events: none;
}

/* Dots "..." — plain, no button style */
.page-item-custom .dots,
.page-link-custom.dots {
  border: none;
  background: none;
  box-shadow: none;
  cursor: default;
  color: var(--gray-400);
  letter-spacing: 2px;
  min-width: unset;
  padding: 0 6px;
}

.page-item-custom .dots:hover,
.page-link-custom.dots:hover {
  background: none;
  color: var(--gray-400);
  transform: none;
  box-shadow: none;
  border-color: transparent;
}


/* ============================================================
   NEWS PAGE
   ============================================================ */

/* Featured */
.news-featured-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.news-featured-img {
  position: relative;
  overflow: hidden;
}

.news-featured-main .news-featured-img {
  height: 380px;
}

.news-featured-side .news-featured-img {
  height: 180px;
}

.news-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-featured-card:hover .news-featured-img img {
  transform: scale(1.05);
}

.news-featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.news-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-featured-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.news-featured-title-sm {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
}

.news-featured-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.news-featured-meta i {
  margin-right: 4px;
}

/* News List */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-list-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.news-list-item:hover {
  background: rgba(var(--primary-rgb), 0.03);
}

.news-list-thumb {
  width: 180px;
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.news-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-list-item:hover .news-list-thumb img {
  transform: scale(1.05);
}

.news-list-content {
  flex: 1;
  min-width: 0;
}

.news-list-tags {
  margin-bottom: 6px;
}

.news-list-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.news-list-tag.event {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.news-list-tag.update {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.news-list-tag.review {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.news-list-tag.notice {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.news-list-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-list-item:hover .news-list-title {
  color: var(--primary);
}

.news-list-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-list-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.news-list-meta i {
  margin-right: 4px;
  color: var(--primary);
}

/* ============================================================
   NEWS DETAIL PAGE
   ============================================================ */

.news-detail-article {
  padding: 28px;
}

.news-detail-header {
  margin-bottom: 24px;
}

.news-detail-tags {
  margin-bottom: 12px;
}

.news-detail-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 14px;
}

.news-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.news-detail-meta i {
  margin-right: 4px;
  color: var(--primary);
}

.news-detail-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.news-detail-image img {
  width: 100%;
  height: auto;
  display: block;
}

.news-detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.news-detail-content h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 28px 0 14px;
  color: var(--text-primary);
}

.news-detail-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--text-primary);
}

.news-detail-content p {
  margin-bottom: 14px;
}

.news-detail-content ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.news-detail-content ul li {
  margin-bottom: 6px;
}

/* Share */
.news-detail-share {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

.share-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.share-btn:hover {
  transform: scale(1.1);
  color: var(--white);
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn.telegram {
  background: #0088cc;
}

.share-btn.copy {
  background: var(--text-secondary);
}

/* Author */
.news-detail-author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  margin-top: 20px;
}

.news-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 22px;
  flex-shrink: 0;
}

.news-author-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.news-author-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Sidebar */
.news-sidebar-list {
  display: flex;
  flex-direction: column;
}

.news-sidebar-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.news-sidebar-item:last-child {
  border-bottom: none;
}

.news-sidebar-thumb {
  width: 70px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.news-sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-sidebar-content h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-sidebar-item:hover h4 {
  color: var(--primary);
}

.news-sidebar-date {
  font-size: 11px;
  color: var(--text-secondary);
}

.news-sidebar-date i {
  margin-right: 3px;
}

/* Tag Cloud */
.news-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.news-cloud-tag {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.news-cloud-tag:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-hero {
  text-align: center;
  padding: 40px 20px;
}

.contact-hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--white);
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.3);
}

.contact-hero-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.contact-hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Info Cards */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.contact-info-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.contact-info-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
  margin: 0 auto 12px;
}

.contact-info-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.contact-info-card p {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-info-note {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Contact Form */
.contact-form {
  padding-top: 8px;
}

.contact-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.contact-form-label span {
  color: #ef4444;
}

.contact-form-input,
.contact-form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-family);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.contact-form-input:focus,
.contact-form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.contact-form-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form-submit {
  padding: 12px 32px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.contact-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.3);
}

.contact-form-submit i {
  margin-right: 6px;
}

/* FAQ */
.contact-faq {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-family);
  gap: 10px;
}

.faq-question i {
  transition: transform 0.3s ease;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-bottom: 14px;
}

/* ============================================================
   NEW PAGES RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .category-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .category-header-stats {
    justify-content: center;
  }

  .category-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .category-filter-left {
    justify-content: center;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .news-featured-main .news-featured-img {
    height: 240px;
  }

  .news-list-item {
    flex-direction: column;
    gap: 12px;
  }

  .news-list-thumb {
    width: 100%;
    height: 180px;
  }

  .news-detail-title {
    font-size: 20px;
  }

  .contact-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-hero-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .news-featured-main .news-featured-img {
    height: 180px;
  }

  .news-featured-title {
    font-size: 16px;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   AUTH MODAL (Login / Register)
   ============================================ */
.auth-modal-content {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  background: var(--gray-200);
}

/* Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  padding: 0;
  margin: 0;
}

.auth-tabs .nav-item {
  flex: 1;
}

.auth-tab-btn {
  width: 100%;
  padding: 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.25s;
  cursor: pointer;
}

.auth-tab-btn:hover {
  color: var(--gray-700);
}

.auth-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Body */
.auth-body {
  padding: 24px 28px 28px;
}

.auth-notice {
  text-align: center;
  color: var(--success);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* Fields */
.auth-field {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: all 0.2s;
}

.auth-input-wrap:focus-within {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.auth-input-icon {
  color: var(--gray-500);
  font-size: 14px;
  margin-right: 10px;
  flex-shrink: 0;
}

.auth-input {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 0;
  font-size: 14px;
  color: var(--gray-900);
  outline: none;
  font-family: inherit;
}

.auth-input::placeholder {
  color: var(--gray-400);
}

.auth-toggle-pass {
  background: none;
  border: none;
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.2s;
}

.auth-toggle-pass:hover {
  color: var(--primary);
}

/* Remember / Forgot */
.auth-remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 13px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-600);
  cursor: pointer;
}

.auth-remember input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.auth-forgot {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-forgot:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--success), #05b88a);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #05b88a, var(--success));
  box-shadow: 0 4px 15px rgba(6, 214, 160, 0.35);
  transform: translateY(-1px);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Messages */
.auth-message {
  margin-top: 12px;
}

.auth-msg-success {
  color: var(--success);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 8px;
  background: rgba(6, 214, 160, 0.08);
  border-radius: var(--radius-sm);
}

.auth-msg-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 8px;
  background: rgba(239, 71, 111, 0.08);
  border-radius: var(--radius-sm);
}

/* Divider */
.auth-divider {
  text-align: center;
  margin: 18px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-300);
}

.auth-divider span {
  position: relative;
  background: var(--white);
  padding: 0 16px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 500;
}

/* Social / Google placeholder */
.auth-social-placeholder {
  text-align: center;
}

/* Switch text */
.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--gray-600);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Autofill override - remove browser default bg */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--white) inset !important;
  -webkit-text-fill-color: var(--gray-900) !important;
  background-color: var(--white) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ============================================================
   FEATURED PAGE (truyen-de-cu)
   ============================================================ */
.featured-page-header {
  text-align: center;
  padding: 32px 20px 24px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(247, 37, 133, 0.06));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.featured-page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.featured-page-title i {
  color: var(--accent);
  margin-right: 8px;
}

.featured-page-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.featured-page-count {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.featured-page-count span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.featured-page-count i {
  margin-right: 4px;
}

.featured-empty-state {
  text-align: center;
  padding: 60px 20px;
}

.featured-empty-icon {
  font-size: 3rem;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.featured-empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.featured-empty-state p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-back-home:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ============================================================
   FAVORITE BUTTON + TOAST
   ============================================================ */
/* Card wrappers need position:relative */
.featured-card,
.completed-card,
.updated-card,
.category-grid-card-wrap {
  position: relative;
}

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--gray-500);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fav-btn:hover {
  color: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fav-btn.active {
  color: var(--accent);
  background: rgba(247, 37, 133, 0.12);
}

.fav-btn.active i {
  font-weight: 900;
}

.fav-btn.pop {
  animation: favPop 0.3s ease;
}

@keyframes favPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.35);
  }

  100% {
    transform: scale(1);
  }
}

/* Detail page favorite */
.fav-btn-detail {
  transition: all 0.2s ease;
  border-radius: var(--radius);
  padding: 6px 10px !important;
}

.fav-btn-detail:hover {
  background: rgba(247, 37, 133, 0.08);
}

.fav-btn-detail.active {
  background: rgba(247, 37, 133, 0.1);
}

.fav-btn-detail.active .meta-value {
  color: var(--accent);
  font-weight: 600;
}

/* Toast Notification */
.yt-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  z-index: 10000;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.yt-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.yt-toast.success {
  background: linear-gradient(135deg, #06d6a0, #059669);
  color: #fff;
}

.yt-toast.error {
  background: linear-gradient(135deg, #f72585, #dc2626);
  color: #fff;
}

.yt-toast.info {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

/* ============================================================
   ACCOUNT PAGE
   ============================================================ */
.account-page-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--dark);
}

.account-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

/* Sidebar */
.account-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.account-sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.account-sidebar-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.account-sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-sidebar-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.account-sidebar-email {
  font-size: 12px;
  color: var(--gray-500);
  margin: 2px 0 0;
}

.account-sidebar-nav {
  padding: 8px 0;
}

.account-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.account-nav-link:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.account-nav-link.active {
  background: rgba(67, 97, 238, 0.06);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.account-nav-link i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

/* Content */
.account-content {
  min-width: 0;
}

.account-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 28px;
}

.account-section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 6px;
}

.account-section-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 24px;
}

.account-section-subtitle {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin: 28px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

/* Stats Grid */
.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.account-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--gray-100);
  border-radius: var(--radius);
  transition: var(--transition);
}

.account-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.account-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.account-stat-number {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  display: block;
}

.account-stat-label {
  font-size: 12px;
  color: var(--gray-500);
}

/* Form */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.account-label .required {
  color: var(--accent);
}

.account-hint {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: -2px;
}

.account-hint-inline {
  font-weight: 400;
  color: var(--gray-500);
  font-size: 12px;
}

.account-input {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-family);
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
}

.account-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.account-password-wrap {
  position: relative;
}

.account-password-wrap .account-input {
  padding-right: 42px;
}

.account-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 14px;
}

.account-pw-toggle:hover {
  color: var(--primary);
}

/* Avatar Upload */
.account-avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.account-avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 3px solid var(--gray-200);
  transition: var(--transition);
}

.account-avatar-preview:hover {
  border-color: var(--primary);
}

.account-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
  opacity: 0;
  transition: 0.2s;
  cursor: pointer;
}

.account-avatar-preview:hover .account-avatar-overlay {
  opacity: 1;
}

.account-avatar-hint {
  font-size: 11px;
  color: var(--gray-500);
}

/* Submit */
.account-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
  align-self: flex-start;
}

.account-submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

.account-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Message */
.account-msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.account-msg.success {
  background: rgba(6, 214, 160, 0.1);
  color: #059669;
  border: 1px solid rgba(6, 214, 160, 0.3);
}

.account-msg.error {
  background: rgba(247, 37, 133, 0.1);
  color: #dc2626;
  border: 1px solid rgba(247, 37, 133, 0.3);
}

/* Saved Stories Grid */
.account-saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.account-saved-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.account-saved-card:hover {
  transform: translateY(-3px);
}

.account-saved-cover {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
}

.account-saved-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-saved-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty state */
.account-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
}

.account-empty i {
  font-size: 48px;
  color: var(--gray-300);
  margin-bottom: 16px;
  display: block;
}

.account-empty p {
  margin: 0 0 16px;
  font-size: 14px;
}

.account-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.account-empty-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
  .account-layout {
    grid-template-columns: 1fr;
  }

  .account-sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 4px;
  }

  .account-nav-link {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 8px 14px;
    font-size: 13px;
  }

  .account-nav-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }
}