/* ==================== Download Hub Refresh ==================== */
.download-hub-panel {
  overflow: hidden;
  position: relative;
}

.download-hub-panel::before {
  background:
    radial-gradient(circle at 92% 8%, rgba(45, 212, 191, 0.12), transparent 30%),
    radial-gradient(circle at 4% 100%, rgba(59, 130, 246, 0.09), transparent 34%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.download-hub-panel > h2,
.download-hub-panel > .card-panel-desc,
.download-hub-panel > .member-tools-grid {
  position: relative;
  z-index: 1;
}

.download-hub-panel > h2 {
  align-items: center;
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 750;
  gap: 10px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.download-hub-panel > h2 i {
  align-items: center;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(94, 234, 212, 0.34);
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(2, 132, 199, 0.12);
  color: #67e8f9;
  display: inline-flex;
  font-size: 15px;
  height: 34px;
  justify-content: center;
  text-shadow: none;
  width: 34px;
}

.download-hub-panel > .card-panel-desc {
  color: rgba(203, 213, 225, 0.74);
  margin-bottom: 22px;
  max-width: 720px;
}

.download-hub-panel .member-tools-grid {
  gap: 0;
  margin-top: 0;
}

.download-hub-panel .member-tool-box {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

.download-hub-panel .member-tool-box::before,
.download-hub-panel .member-tool-box > h3 {
  display: none;
}

.download-hub-panel .member-download-section {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.download-hub-panel .member-download-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(145deg, rgba(15, 31, 54, 0.86), rgba(10, 20, 38, 0.72));
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 12px 26px rgba(0, 0, 0, 0.16);
  gap: 12px;
  padding: 18px;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out, transform 180ms ease-out;
}

.download-hub-panel .member-download-group p {
  align-items: center;
  color: #e2e8f0;
  font-size: 14px;
  gap: 8px;
  letter-spacing: 0.02em;
  margin: 0 0 3px;
}

.download-hub-panel .member-download-group p::before {
  background: #2dd4bf;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.45);
  height: 16px;
  width: 4px;
}

.download-hub-panel .member-download-btn {
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 12px;
  box-shadow: none;
  color: #99f6e4;
  font-size: 13px;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
  min-height: 46px;
  padding: 10px 12px;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out;
}

.download-hub-panel .member-download-btn i {
  color: #5eead4;
  font-size: 14px;
}

.download-hub-panel .member-download-btn--ghost {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow: none;
  color: #bfdbfe;
}

.download-hub-panel .member-download-btn--ghost i {
  color: #93c5fd;
}

.download-hub-panel .member-download-group--mobile .member-download-btn--ghost {
  grid-column: 1 / -1;
  align-self: stretch;
}

.download-hub-panel :is(.member-download-btn--android-app, .member-download-btn--ios-app) {
  grid-column: 1 / -1;
  min-height: 50px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.92), rgba(5, 150, 105, 0.9));
  border-color: rgba(110, 231, 183, 0.52);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.18);
  color: #ecfdf5;
  font-size: 14px;
}

.download-hub-panel :is(.member-download-btn--android-app, .member-download-btn--ios-app) i {
  color: #d1fae5;
  font-size: 15px;
}

.download-hub-panel .member-download-btn--single {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.27);
  color: #c7d2fe;
}

.download-hub-panel #memberDownloadBaccarat {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fde68a;
}

.download-hub-panel #memberDownloadBaccarat i {
  color: #fbbf24;
}

@media (hover: hover) and (pointer: fine) {
  .download-hub-panel .member-download-group:hover {
    border-color: rgba(45, 212, 191, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 30px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
  }

  .download-hub-panel .member-download-btn:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(94, 234, 212, 0.62);
    color: #ccfbf1;
    transform: translateY(-1px);
  }

  .download-hub-panel :is(.member-download-btn--android-app, .member-download-btn--ios-app):hover {
    background: linear-gradient(135deg, #14b8a6, #059669);
    border-color: rgba(167, 243, 208, 0.72);
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.26);
    color: #fff;
  }

  .download-hub-panel .member-download-btn--ghost:hover {
    background: rgba(59, 130, 246, 0.19);
    border-color: rgba(147, 197, 253, 0.6);
    color: #dbeafe;
  }

  .download-hub-panel .member-download-btn--single:hover,
  .download-hub-panel #memberDownloadBaccarat:hover {
    background: rgba(129, 140, 248, 0.18);
    border-color: rgba(165, 180, 252, 0.58);
  }
}

.download-hub-panel .member-download-btn:active {
  transform: scale(0.98);
}

.download-hub-panel .member-security-verify {
  align-items: center;
  background: rgba(15, 23, 42, 0.38);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-top: 2px;
  padding: 12px 14px;
}

html[data-theme="light"] .card-panel.download-hub-panel {
  background: #f8fafc !important;
}

html[data-theme="light"] .download-hub-panel > .card-panel-desc {
  color: #64748b;
}

html[data-theme="light"] .download-hub-panel .member-download-group {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(241, 245, 249, 0.72));
  border-color: rgba(37, 99, 235, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 24px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .download-hub-panel .member-download-group p {
  color: #1e293b;
}

html[data-theme="light"] .download-hub-panel .member-download-btn {
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
}

html[data-theme="light"] .download-hub-panel .member-download-btn--ghost {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

html[data-theme="light"] .download-hub-panel :is(.member-download-btn--android-app, .member-download-btn--ios-app) {
  background: linear-gradient(135deg, #0d9488, #059669);
  border-color: rgba(4, 120, 87, 0.34);
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.16);
  color: #fff;
}

html[data-theme="light"] .download-hub-panel .member-app-version {
  border-color: rgba(13, 148, 136, 0.28);
  background: rgba(20, 184, 166, 0.1);
  color: #0f766e;
}

html[data-theme="light"] .download-hub-panel .member-download-btn i {
  color: inherit;
}

html[data-theme="light"] .download-hub-panel .member-security-verify {
  background: rgba(241, 245, 249, 0.9);
  border-color: #cbd5e1;
}

html[data-theme="light"] .download-hub-panel .member-security-verify > span {
  color: #475569;
}

html[data-theme="light"] .download-hub-panel .member-security-verify a {
  color: #0f766e;
}

/* 電腦與腳本各占一列，原生 App 並排，避免不同高度留下大片空白。 */
.download-hub-panel .member-download-group--desktop,
.download-hub-panel [data-download-group="gm-scripts"] {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-hub-panel .member-download-label {
  flex-wrap: wrap;
}

.download-hub-panel .member-download-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.download-hub-panel .script-retirement-notice {
  position: relative;
  margin: 0 0 18px;
  font-size: 13px;
}

@media (max-width: 700px) {
  .download-hub-panel .member-download-section {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .download-hub-panel > h2 { font-size: 19px; }
  .download-hub-panel .member-download-group {
    padding: 14px;
  }
  .download-hub-panel .member-download-group--desktop,
  .download-hub-panel [data-download-group="gm-scripts"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .download-hub-panel .member-security-verify {
    align-items: flex-start;
    flex-direction: column;
  }
}
