.guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: all 0.4s ease;
}

.guide-overlay.open {
  visibility: visible;
  opacity: 1;
}

.guide-modal {
  background-color: var(--black);
  width: 80%;
  max-width: 1000px;
  height: 90%;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: slideUpModal 0.5s ease forwards;
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDownModal {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .guide-modal {
    width: 90%;
    height: 90%;
  }
}

/* Sticky Modal Header with Shadow */
.guide-header {
  position: sticky;
  top: 0;
  background: var(--black);
  padding: 20px;
  padding-right: 60px;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
}

.guide-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--gold);
  color: var(--black);
  border: none;
  font-size: 22px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 20;
}

/* SCROLLABLE WRAPPER FOR TABS */
.guide-tabs-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
  margin-bottom: 10px;
  scrollbar-width: none; /* Firefox */
  position: relative;

}
.guide-tabs-scroll-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to left, var(--black), transparent);
  pointer-events: none;
}


.guide-tabs-scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* FLEXIBLE SCROLLABLE TABS */
.guide-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
}

.guide-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.guide-tab {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease;
  display: flex;
  flex-wrap: nowrap; /* No wrap even on desktop */
  gap: 10px;
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}



.guide-tab.active,
.guide-tab:hover {
  background: var(--gold);
  color: var(--black);
}

.guide-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  padding-top: 10px;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.4s ease;
  word-break: break-word;
  overflow-wrap: break-word;
}

.guide-hotlink {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  color: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: text-decoration-color 0.3s ease;
}

.guide-hotlink:hover {
  text-decoration-style: solid;
  text-decoration-color: var(--gold);
}

.guide-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-content a:hover {
  text-decoration-style: solid;
}

/* Picker modal overlay */
#wcModal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Modal grid panel */
#wcModal .grid {
  background: #000;
  padding: 1rem;
  padding-top: 4rem;
  border-radius: 8px;
  width: 80%;
  max-width: 480px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  color: #fff;
  position: relative;
}

/* Header bar inside grid */
#wcModal .grid::before {
  content: 'Installed Wallets';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5rem;
  line-height: 2.5rem;
  background: #000;
  color: gold;
  font-weight: bold;
  text-align: center;
  font-size: 1.1rem;
  border-bottom: 1px solid gold;
}

/* each wallet button */
#wcModal .wallet-btn {
  text-align: center;
  cursor: pointer;
  font-size: 0.85rem;
}

#wcModal .wallet-btn img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
}

/* close “×” */
#pickerClose {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

/* icon inside button */
.btn-icon {
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  margin-right: 0.5em;
}
