.truyenqq-footer * {
  box-sizing: border-box !important;
}

.truyenqq-footer {
  margin: 0 !important;
  padding: 0 !important;
}

/* =====================================================
   FOOTER BREAK OUT OF CONTAINER
===================================================== */
.truyenqq-footer {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
}

/* =====================================================
   FOOTER CONTAINER - OVERRIDE ISOLATED
===================================================== */
.truyenqq-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* =====================================================
   FOOTER ROOT - WITH DARK MODE SUPPORT
===================================================== */
.truyenqq-footer {
  background-color: #f5f5f5 !important;
  color: #333333 !important;
  margin-top: 80px !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
  display: block !important;
  clear: both !important;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

body.dark-mode .truyenqq-footer {
  background-color: #0f0f0f !important;
  color: #e0e0e0 !important;
}

/* =====================================================
   FOOTER TOP - NEWSLETTER SECTION (DARK MODE)
===================================================== */
.truyenqq-footer .footer-top {
  background: #ffffff !important;
  padding: 40px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(74, 158, 255, 0.2);
  box-sizing: border-box !important;
  transition: background-color 0.3s ease;
}

body.dark-mode .truyenqq-footer .footer-top {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%) !important;
  border-bottom: 1px solid rgba(74, 158, 255, 0.3);
}

.truyenqq-footer .newsletter-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.truyenqq-footer .newsletter-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 280px;
}

.truyenqq-footer .newsletter-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4a9eff 0%, #2b7ee6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.truyenqq-footer .newsletter-icon i {
  font-size: 28px;
  color: #fff;
}

.truyenqq-footer .newsletter-text h3 {
  font-size: 22px;
  font-weight: 700;
  color: #333333;
  margin: 0 0 5px 0;
}

body.dark-mode .truyenqq-footer .newsletter-text h3 {
  color: #ffffff !important;
}

.truyenqq-footer .newsletter-text p {
  font-size: 14px;
  color: #999;
  margin: 0;
}

.truyenqq-footer .newsletter-form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 500px;
}

.truyenqq-footer .newsletter-input {
  flex: 1;
  padding: 14px 20px;
  background-color: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 8px;
  color: #333333 !important;
  font-size: 14px;
  transition: all 0.3s ease;
}

body.dark-mode .truyenqq-footer .newsletter-input {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border-color: rgba(74, 158, 255, 0.3);
}

.truyenqq-footer .newsletter-input::placeholder {
  color: #999999;
}

body.dark-mode .truyenqq-footer .newsletter-input::placeholder {
  color: #666666;
}

.truyenqq-footer .newsletter-input:focus {
  outline: none;
  border-color: #4a9eff;
  background-color: rgba(74, 158, 255, 0.05) !important;
}

body.dark-mode .truyenqq-footer .newsletter-input:focus {
  background-color: rgba(74, 158, 255, 0.1) !important;
}

.truyenqq-footer .newsletter-btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, #4a9eff 0%, #2b7ee6 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.truyenqq-footer .newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 158, 255, 0.4);
}

.truyenqq-footer .newsletter-btn i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.truyenqq-footer .newsletter-btn:hover i {
  transform: translateX(3px);
}

/* =====================================================
   FOOTER MAIN (DARK MODE)
===================================================== */
.truyenqq-footer .footer-main {
  padding: 60px 0 40px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  background-color: #f5f5f5 !important;
  transition: background-color 0.3s ease;
}

body.dark-mode .truyenqq-footer .footer-main {
  background-color: #1a1a1a !important;
}

.truyenqq-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
}

.truyenqq-footer .footer-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* =====================================================
   FOOTER ABOUT COLUMN
===================================================== */
.truyenqq-footer .footer-about {
  max-width: 400px;
}

.truyenqq-footer .footer-logo {
  margin-bottom: 20px;
}

.truyenqq-footer .footer-logo img {
  height: 45px;
  width: auto;
}

.truyenqq-footer .footer-description {
  font-size: 14px;
  line-height: 1.7;
  color: #666666 !important;
  margin-bottom: 25px;
  transition: color 0.3s ease;
}

body.dark-mode .truyenqq-footer .footer-description {
  color: #999999 !important;
}

.truyenqq-footer .footer-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  padding: 20px 0;
  border-top: 1px solid rgba(74, 158, 255, 0.1);
  border-bottom: 1px solid rgba(74, 158, 255, 0.1);
  width: 100%;
  transition: border-color 0.3s ease;
}

body.dark-mode .truyenqq-footer .footer-stats {
  border-top-color: rgba(74, 158, 255, 0.15);
  border-bottom-color: rgba(74, 158, 255, 0.15);
}

.truyenqq-footer .stat-item {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.truyenqq-footer .stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #4a9eff !important;
  margin-bottom: 5px;
  line-height: 1.2;
}

.truyenqq-footer .stat-label {
  font-size: 12px;
  color: #999999 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  transition: color 0.3s ease;
}

body.dark-mode .truyenqq-footer .stat-label {
  color: #666666 !important;
}

.truyenqq-footer .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.truyenqq-footer .contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #666666 !important;
  transition: color 0.3s ease;
}

body.dark-mode .truyenqq-footer .contact-item {
  color: #999999 !important;
}

.truyenqq-footer .contact-item i {
  font-size: 16px;
  color: #4a9eff !important;
}

.truyenqq-footer .contact-item a {
  color: #666666 !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

body.dark-mode .truyenqq-footer .contact-item a {
  color: #999999 !important;
}

.truyenqq-footer .contact-item a:hover {
  color: #4a9eff !important;
}

/* =====================================================
   FOOTER LINKS COLUMNS
===================================================== */
.truyenqq-footer .footer-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.truyenqq-footer .footer-heading {
  font-size: 16px;
  font-weight: 700;
  color: #333333 !important;
  margin: 0 0 20px 0 !important;
  padding: 0 0 12px 0 !important;
  border-bottom: 2px solid #4a9eff;
  position: relative;
  line-height: 1.2;
  transition: color 0.3s ease;
}

body.dark-mode .truyenqq-footer .footer-heading {
  color: #ffffff !important;
}

.truyenqq-footer .footer-heading::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #4a9eff 0%, transparent 100%);
}

.truyenqq-footer .footer-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.truyenqq-footer .footer-links li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.truyenqq-footer .footer-links li a {
  font-size: 14px;
  color: #666666 !important;
  text-decoration: none !important;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  padding-left: 15px;
  line-height: 1.5;
}

body.dark-mode .truyenqq-footer .footer-links li a {
  color: #999999 !important;
}

.truyenqq-footer .footer-links li a::before {
  content: "›";
  position: absolute;
  left: 0;
  color: #4a9eff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.truyenqq-footer .footer-links li a:hover {
  color: #4a9eff !important;
  padding-left: 20px;
}

.truyenqq-footer .footer-links li a:hover::before {
  opacity: 1;
}

/* =====================================================
   FOOTER BOTTOM (DARK MODE)
===================================================== */
.truyenqq-footer .footer-bottom {
  background-color: #e0e0e0 !important;
  padding: 20px 0 !important;
  margin: 0 !important;
  border-top: 1px solid rgba(74, 158, 255, 0.1);
  box-sizing: border-box !important;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

body.dark-mode .truyenqq-footer .footer-bottom {
  background-color: #000000 !important;
  border-top-color: rgba(74, 158, 255, 0.15);
}

.truyenqq-footer .footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.truyenqq-footer .copyright {
  font-size: 14px;
  color: #666666 !important;
  transition: color 0.3s ease;
}

body.dark-mode .truyenqq-footer .copyright {
  color: #666666 !important;
}

.truyenqq-footer .copyright p {
  margin: 0;
}

.truyenqq-footer .copyright strong {
  color: #4a9eff !important;
  font-weight: 600;
}

/* =====================================================
   SOCIAL LINKS (DARK MODE)
===================================================== */
.truyenqq-footer .social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.truyenqq-footer .social-link {
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.05) !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666 !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

body.dark-mode .truyenqq-footer .social-link {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #999999 !important;
}

.truyenqq-footer .social-link:hover {
  background: linear-gradient(135deg, #4a9eff 0%, #2b7ee6 100%) !important;
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
}

.truyenqq-footer .social-link i {
  font-size: 18px;
}

/* =====================================================
   BACK TO TOP BUTTON
===================================================== */
.truyenqq-footer .back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.truyenqq-footer .back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.truyenqq-footer .back-to-top button {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #4a9eff 0%, #2b7ee6 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.truyenqq-footer .back-to-top button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(74, 158, 255, 0.4);
}

.truyenqq-footer .back-to-top button i {
  font-size: 18px;
}

/* =====================================================
   RESPONSIVE - TABLET (1024px - 768px)
===================================================== */
@media (max-width: 1023px) {
  .truyenqq-footer .container {
    padding: 0 20px;
  }

  .truyenqq-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .truyenqq-footer .footer-about {
    grid-column: 1 / -1;
    max-width: none;
  }

  .truyenqq-footer .footer-stats {
    justify-content: flex-start;
  }

  .truyenqq-footer .stat-item {
    flex: 0 1 auto;
    min-width: 100px;
  }

  .truyenqq-footer .newsletter-section {
    gap: 25px;
  }

  .truyenqq-footer .newsletter-form {
    max-width: 450px;
  }
}

/* =====================================================
   RESPONSIVE - MOBILE (767px - 480px)
===================================================== */
@media (max-width: 767px) {
  .truyenqq-footer {
    margin-top: 40px;
  }

  .truyenqq-footer .container {
    padding: 0 15px;
  }

  .truyenqq-footer .footer-top {
    padding: 30px 0;
  }

  .truyenqq-footer .newsletter-section {
    flex-direction: column;
    gap: 25px;
  }

  .truyenqq-footer .newsletter-content {
    flex-direction: column;
    text-align: center;
    min-width: 100%;
  }

  .truyenqq-footer .newsletter-icon {
    width: 50px;
    height: 50px;
  }

  .truyenqq-footer .newsletter-icon i {
    font-size: 24px;
  }

  .truyenqq-footer .newsletter-text h3 {
    font-size: 20px;
  }

  .truyenqq-footer .newsletter-text p {
    font-size: 13px;
  }

  .truyenqq-footer .newsletter-form {
    flex-direction: column;
    width: 100%;
    max-width: none;
  }

  .truyenqq-footer .newsletter-btn {
    width: 100%;
    justify-content: center;
  }

  .truyenqq-footer .footer-main {
    padding: 40px 0 30px;
  }

  .truyenqq-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .truyenqq-footer .footer-about {
    grid-column: 1;
  }

  .truyenqq-footer .footer-stats {
    gap: 15px;
    flex-wrap: wrap;
  }

  .truyenqq-footer .stat-item {
    flex: 0 1 calc(33.333% - 10px);
    min-width: 80px;
  }

  .truyenqq-footer .stat-number {
    font-size: 20px;
  }

  .truyenqq-footer .stat-label {
    font-size: 11px;
  }

  .truyenqq-footer .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .truyenqq-footer .copyright {
    font-size: 13px;
  }

  .truyenqq-footer .social-links {
    justify-content: center;
  }

  .truyenqq-footer .back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
  }

  .truyenqq-footer .back-to-top.show {
    opacity: 1;
    visibility: visible;
  }
}

/* =====================================================
   RESPONSIVE - SMALL MOBILE (≤480px)
===================================================== */
@media (max-width: 480px) {
  .truyenqq-footer .footer-top {
    padding: 25px 0;
  }

  .truyenqq-footer .newsletter-text h3 {
    font-size: 18px;
  }

  .truyenqq-footer .newsletter-input {
    padding: 12px 16px;
    font-size: 13px;
  }

  .truyenqq-footer .newsletter-btn {
    padding: 12px 24px;
    font-size: 13px;
  }

  .truyenqq-footer .footer-logo img {
    height: 40px;
  }

  .truyenqq-footer .footer-description {
    font-size: 13px;
  }

  .truyenqq-footer .footer-heading {
    font-size: 15px;
  }

  .truyenqq-footer .footer-links li a {
    font-size: 13px;
  }

  .truyenqq-footer .social-link {
    width: 36px;
    height: 36px;
  }

  .truyenqq-footer .social-link i {
    font-size: 16px;
  }

  .truyenqq-footer .back-to-top button {
    width: 36px;
    height: 36px;
  }

  .truyenqq-footer .back-to-top button i {
    font-size: 16px;
  }
}

/* =====================================================
   ANIMATION - STATS COUNTER
===================================================== */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.truyenqq-footer .stat-item[data-animated="true"] {
  animation: countUp 0.6s ease;
}
