/* Card tổng thể */
.exchange-card {
    border-radius: 1.5rem;
    box-shadow: 0 2px 12px #0001;
    border: none;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    position: relative;
    background: #232946;
    color: #e5e7eb;
}
body.light-mode .exchange-card {
    background: #fff;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

/* Logo */
.exchange-logo {
    width: 90%;
    max-width: 250px;
    aspect-ratio: 1/1;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 1px 8px #0001;
    background: transparent;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Tên sàn */
.exchange-title {
    font-weight: bold;
    font-size: 1.35rem;
    text-align: left;
    margin-bottom: 0.5rem;
}

/* Dòng thông tin */
.exchange-info-row {
    display: flex;
    align-items: center;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.exchange-info-label {
    min-width: 100px;
    color: #919FB4;
}
body.light-mode .exchange-info-label {
    color: #5A6980;
}

/* Light mode text color adjustments - chỉ chuyển text màu trắng thành đen */
body.light-mode *[style*="color: #fff"],
body.light-mode *[style*="color: #ffffff" ],
body.light-mode *[style*="color: white"],
body.light-mode .text-white,
body.light-mode .text-light,
body.light-mode .hero-title,
body.light-mode .hero-desc,
body.light-mode .about-card,
body.light-mode .feature-card,
body.light-mode .testimonial-card,
body.light-mode .faq-card,
body.light-mode .stats-card,
body.light-mode .hero-card,
body.light-mode .exchange-card,
body.light-mode .news-card,
body.light-mode .event-card,
body.light-mode .exchange-section{
    color: #2c3e50 !important;
}

/* Giữ nguyên các màu khác trong light mode */
body.light-mode .highlight,
body.light-mode .text-warning,
body.light-mode .text-success,
body.light-mode .text-primary,
body.light-mode .text-danger,
body.light-mode .text-info,
body.light-mode .text-secondary,
body.light-mode .rebate-badge-full,
body.light-mode .btn-warning {
    /* Giữ nguyên màu gốc - không override */
}
.exchange-info-value {
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 8px;
    display: flex;
    align-items: center;
    text-align: right;
}
.exchange-info-row .exchange-info-label + .exchange-info-value {
    text-align: left;
    width: 100%;
    justify-content: flex-start;
}
.exchange-info-row.justify-content-between .exchange-info-value {
    justify-content: flex-end;
    width: 100%;
}

/* Đảm bảo label card danh sách sàn giao dịch đúng màu */
.exchange-card .exchange-info-label {
    color: #919FB4 !important;
}
body.light-mode .exchange-card .exchange-info-label {
    color: #5A6980 !important;
}

/* Badge hoàn phí */
.rebate-badge-full {
    width: 120%;
    margin-top: -3.5%;
    margin-left: -6%;
    margin-right: -6%;
    margin-bottom: -6%;
    background: #FFD600;
    color: #232946;
    border: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px #FFD60033;
    border-radius: 0.5rem;
    padding: 0.5rem 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rebate-badge-full .percent {
    text-align: right;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
}
.rebate-badge-full span:first-child {
    text-align: left;
    flex: 1;
    align-items: center;
}
body.light-mode .rebate-badge-full {
    background: #FFD600;
    color: #232946;
    border: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px #FFD60033;
}

/* Nút copy */
.copy-btn {
    padding: 2px 6px;
    font-size: 0.9rem;
    border-radius: 0.4rem;
    background: transparent;
    color: #FFD600;
    margin-left: 4px;
    transition: background 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
}
.copy-btn:hover {
    background: #334155 !important;
}

.tab-btn {
    color: #fff;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.2s, border-bottom 0.2s;
}
.tab-btn.active, .tab-btn:focus {
    border-bottom: 3px solid #FFD600;
    color: #FFD600;
    background: none;
}
body.light-mode .tab-btn {
    color: #232946;
}
body.light-mode .tab-btn.active,
body.light-mode .tab-btn:focus {
    color: #FFD600;
    border-bottom: 3px solid #FFD600;
}

.navbar {
    height: 60px;
    min-height: 60px;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
}
.navbar .navbar-brand {
    margin-left: 0;
    padding-left: 0;
    display: flex;
    align-items: center;
    height: 100%;
}
.navbar .navbar-brand img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin-right: 0;
}

.accordion-button::after {
    color: #fff;
    filter: brightness(2);
}
body.light-mode .accordion-button::after {
    color: #232946;
    filter: none;
}

/* Mobile responsive improvements */
@media (max-width: 575.98px) {
  .exchange-card {
    padding: 12px 8px 8px 8px !important;
    font-size: 0.9rem !important;
    border-radius: 12px !important;
  }

  .exchange-card .logo {
    max-width: 60px !important;
    height: auto !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
  }

  .exchange-card .ref-code {
    text-align: right !important;
    font-size: 0.8rem !important;
  }

  .exchange-card .value {
    font-size: 0.9rem !important;
  }

  .exchange-card .fee-box {
    font-size: 0.85rem !important;
    padding: 4px 6px !important;
  }

  .exchange-card .fee-box .percent {
    font-size: 0.85rem !important;
  }

  .header-logo img {
    height: 35px !important;
    max-width: 100px !important;
    width: auto !important;
    object-fit: contain !important;
    padding: 4px !important;
  }

  .header-logo {
    height: 35px !important;
    padding: 0 8px !important;
  }

  .filter-tabs {
    font-size: 0.85rem !important;
    gap: 4px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 0 4px !important;
  }

  .about-card-img {
    max-width: 100px !important;
    width: 100% !important;
  }

  .about-card-img.bg {
    left: -8px !important;
    top: 8px !important;
    width: 70px !important;
    height: 70px !important;
  }

  .feature-card .bi {
    font-size: 24px !important;
  }

  /* Improve text readability on small screens */
  .exchange-info-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    margin-bottom: 0.5rem !important;
  }

  .exchange-info-label {
    min-width: auto !important;
    margin-bottom: 2px !important;
    font-size: 0.8rem !important;
  }

  .exchange-info-value {
    margin-left: 0 !important;
    font-size: 0.85rem !important;
  }

  /* Better spacing for mobile */
  .exchange-card > * {
    margin-bottom: 8px !important;
  }

  .exchange-card > *:last-child {
    margin-bottom: 0 !important;
  }
}

/* Dropdown menu dark mode fix cứng */
.dropdown-menu {
  background: #232946 !important;
  color: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 32px #0008 !important;
  border: none !important;
  padding: 0.5rem 0.5rem !important;
  min-width: 220px !important;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 1s cubic-bezier(.4,0,.2,1), transform 1s cubic-bezier(.4,0,.2,1);
  display: block;
  pointer-events: none;
}
.dropdown-item {
  color: #fff !important;
  background: transparent !important;
  border-radius: 8px !important;
  transition: background 0.15s, color 0.15s;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dropdown-item img {
  background: #232946 !important;
  border-radius: 50% !important;
  border: 1px solid #444 !important;
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: #FFD600 !important;
  color: #232946 !important;
}
.dropdown-item:hover img, .dropdown-item:focus img {
  background: #FFD600 !important;
  border-color: #FFD600 !important;
}

.navbar .dropdown.show .dropdown-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

body {
    background: #101828;
    color: #e5e7eb;
    font-family: Arial, sans-serif;
}

.exchange-card,
.exchange-header,
.exchange-section,
.feature-card,
.faq-card,
.footer,
.about-card,
.testimonial-card,
.tab-btn,
.dropdown-menu,
.dropdown-item {
    color: #e5e7eb;
}

.exchange-section img {
  max-width: 100%;
  height: auto;
  display: block;
}
