.gcr-directory {
  --gcr-bg-1: #f8fbff;
  --gcr-bg-2: #eef4ff;
  --gcr-text: #0f172a;
  --gcr-muted: #64748b;
  --gcr-muted-2: #7c879d;
  --gcr-line: rgba(148, 163, 184, 0.22);
  --gcr-line-soft: rgba(148, 163, 184, 0.14);
  --gcr-white: rgba(255, 255, 255, 0.86);
  --gcr-shadow: 0 24px 70px rgba(15, 23, 42, 0.09);
  --gcr-shadow-soft: 0 12px 34px rgba(15, 23, 42, 0.06);
  --gcr-radius-xl: 30px;
  --gcr-radius-lg: 24px;
  --gcr-radius-md: 16px;
  --gcr-accent: #2563eb;
  --gcr-accent-2: #7c3aed;
  --gcr-green: #16a34a;
  --gcr-red: #dc2626;

  position: relative;
  overflow: hidden;
  padding: 50px 20px 80px;
  color: var(--gcr-text);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.07), transparent 30%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 30%),
    linear-gradient(180deg, var(--gcr-bg-2) 0%, #ffffff 42%, #ffffff 100%);
}

.gcr-directory *,
.gcr-directory *::before,
.gcr-directory *::after {
  box-sizing: border-box;
}

.gcr-directory__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.65;
  background:
    radial-gradient(700px 320px at 0% 0%, rgba(255, 255, 255, 0.78), transparent 60%),
    radial-gradient(600px 280px at 100% 5%, rgba(255, 255, 255, 0.74), transparent 60%);
}

.gcr-directory__container {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
}


/* =========================
   Hero
========================= */

.gcr-directory__hero {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 26px;
  padding: 34px 28px 24px;
  border-radius: var(--gcr-radius-xl);
  border: 1px solid var(--gcr-line-soft);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--gcr-shadow-soft);
}

.gcr-directory__hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gcr-accent);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.gcr-directory__hero h1 {
  margin: 14px 0 12px;
  color: var(--gcr-text);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.gcr-directory__hero p {
  margin: 0 auto;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--gcr-muted);
}

.gcr-directory__hero-search {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}


/* =========================
   Search
========================= */

.gcr-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 460px);
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.035);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gcr-search:focus-within {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}

.gcr-search svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex: 0 0 auto;
}

.gcr-search-input,
.gcr-directory input[type="text"] {
  width: 100%;
  height: 52px;
  padding: 0;
  margin: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--gcr-text);
  font-size: 14px;
  line-height: 1.2;
}

.gcr-search-input::placeholder {
  color: #94a3b8;
}


/* =========================
   Filters
========================= */

.gcr-directory__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 24px;
}

.gcr-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
  cursor: pointer;
}

.gcr-filter:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.95);
}

.gcr-filter.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gcr-accent), var(--gcr-accent-2));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}


/* =========================
   Table Header
   重要：你的 HTML 是 4 列，不是 5 列
========================= */

.gcr-directory__table-head {
  display: grid;
  grid-template-columns: minmax(340px, 2.2fr) minmax(130px, 0.9fr) minmax(140px, 0.9fr) minmax(120px, 0.7fr);
  align-items: center;
  gap: 22px;
  padding: 0 22px 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}


/* =========================
   List / Row
========================= */

.gcr-directory__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gcr-rate-row {
  display: grid;
  grid-template-columns: minmax(340px, 2.2fr) minmax(130px, 0.9fr) minmax(140px, 0.9fr) minmax(120px, 0.7fr);
  align-items: center;
  gap: 22px;
  padding: 20px 22px;
  border-radius: var(--gcr-radius-lg);
  border: 1px solid var(--gcr-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78));
  box-shadow: var(--gcr-shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gcr-rate-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--gcr-shadow);
  border-color: rgba(37, 99, 235, 0.22);
}

.gcr-rate-row__card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.gcr-rate-row__logo {
  width: 72px;
  height: 72px;
  border-radius: 19px;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.1), transparent 55%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.1), transparent 55%),
    rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.gcr-rate-row__logo img {
  display: block;
  max-width: 52px;
  max-height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.08));
}

.gcr-rate-row__info {
  min-width: 0;
}

.gcr-rate-row__info h3 {
  margin: 0 0 6px;
  color: var(--gcr-text);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.gcr-rate-row__info p {
  margin: 0;
  color: var(--gcr-muted);
  font-size: 14px;
  line-height: 1.6;
}


/* =========================
   Rate Column
========================= */

.gcr-rate-row__rate,
.gcr-rate-row__updated {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.gcr-rate-row__rate strong,
.gcr-rate-row__updated strong,
.gcr-live-rate-value {
  color: var(--gcr-text);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.025em;
}

/* Apple 当前使用这个包裹 shortcode */
.gcr-live-rate-value {
  display: flex;
  align-items: center;
}

/* 数据库输出的价格颜色 */
.gcr-live-rate-value .price-up,
.gcr-rate-row__rate strong .price-up {
  color: var(--gcr-green) !important;
}

.gcr-live-rate-value .price-down,
.gcr-rate-row__rate strong .price-down {
  color: var(--gcr-red) !important;
}

.gcr-live-rate-value .price-up,
.gcr-live-rate-value .price-down,
.gcr-rate-row__rate strong .price-up,
.gcr-rate-row__rate strong .price-down {
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
}

/* ₦ 符号 */
.gcr-live-rate-value .ngn,
.gcr-rate-row__rate strong .ngn {
  color: inherit !important;
  font-size: 0.58em;
  font-weight: 800;
  position: relative;
  top: 1px;
  margin-left: 1px;
}

.gcr-rate-row__rate > span,
.gcr-rate-row__updated span {
  color: var(--gcr-muted-2);
  font-size: 13px;
  line-height: 1.45;
}

.gcr-rate-row__updated strong {
  font-size: 18px;
}


/* =========================
   Button
========================= */

.gcr-rate-row__action {
  display: flex;
  justify-content: flex-start;
}

.gcr-check-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  text-decoration: none !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--gcr-accent), var(--gcr-accent-2));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.gcr-check-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
  filter: saturate(1.06);
  color: #ffffff !important;
}


/* =========================
   No Results
========================= */

.gcr-no-results {
  display: none;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  color: #64748b;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.gcr-rate-row.is-hidden {
  display: none !important;
}


/* =========================
   Responsive
========================= */

@media (max-width: 1024px) {
  .gcr-directory__container {
    max-width: 760px;
  }

  .gcr-directory__table-head {
    display: none;
  }

  .gcr-rate-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .gcr-rate-row__rate,
  .gcr-rate-row__updated {
    gap: 4px;
  }

  .gcr-rate-row__rate::before,
  .gcr-rate-row__updated::before,
  .gcr-rate-row__action::before {
    display: block;
    margin-bottom: 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .gcr-rate-row__rate::before {
    content: "Live Rate";
  }

  .gcr-rate-row__updated::before {
    content: "Updated";
  }

  .gcr-rate-row__action::before {
    content: "Action";
  }

  .gcr-rate-row__action {
    display: block;
    padding-top: 2px;
  }

  .gcr-check-btn {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .gcr-directory {
    padding: 36px 14px 60px;
  }

  .gcr-directory__hero {
    padding: 24px 16px 20px;
    border-radius: 24px;
  }

  .gcr-directory__hero-badge {
    font-size: 12px;
  }

  .gcr-directory__hero h1 {
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1.05;
  }

  .gcr-directory__hero p {
    font-size: 14px;
    line-height: 1.7;
  }

  .gcr-search {
    min-height: 50px;
    border-radius: 16px;
  }

  .gcr-search-input,
  .gcr-directory input[type="text"] {
    height: 50px;
  }

  .gcr-directory__filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
  }

  .gcr-directory__filters::-webkit-scrollbar {
    display: none;
  }

  .gcr-filter {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
  }

  .gcr-rate-row {
    border-radius: 22px;
    padding: 18px;
  }

  .gcr-rate-row__card {
    gap: 13px;
    align-items: flex-start;
  }

  .gcr-rate-row__logo {
    width: 60px;
    height: 60px;
    border-radius: 17px;
  }

  .gcr-rate-row__logo img {
    max-width: 42px;
    max-height: 42px;
  }

  .gcr-rate-row__info h3 {
    font-size: 19px;
  }

  .gcr-rate-row__info p {
    font-size: 13px;
    line-height: 1.55;
  }

  .gcr-rate-row__rate strong,
  .gcr-rate-row__updated strong,
  .gcr-live-rate-value {
    font-size: 17px;
  }

  .gcr-rate-row__rate > span,
  .gcr-rate-row__updated span {
    font-size: 13px;
  }

  .gcr-check-btn {
    min-height: 46px;
    border-radius: 14px;
  }
}

@media (max-width: 420px) {
  .gcr-directory {
    padding-left: 12px;
    padding-right: 12px;
  }

  .gcr-rate-row {
    padding: 16px;
  }

  .gcr-rate-row__logo {
    width: 56px;
    height: 56px;
  }

  .gcr-rate-row__logo img {
    max-width: 39px;
    max-height: 39px;
  }

  .gcr-rate-row__info h3 {
    font-size: 18px;
  }
}
