.tip-button-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  z-index: 300;
}

:root {
  --tip-topbar-height: 64px;
}

.tip-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px calc(16px + var(--tip-scrollbar, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(10, 10, 20, 0.85);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  z-index: 400;
  box-sizing: border-box;
  min-height: var(--tip-topbar-height);
}

.tip-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(232, 237, 255, 0.92);
  text-decoration: none;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(70, 90, 170, 0.25);
  background: rgba(9, 12, 26, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  transition: transform 0.08s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  flex: 0 0 auto;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.tip-home:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35), 0 0 26px rgba(0, 229, 255, 0.08);
}

.tip-bar-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #fff;
  font-family: inherit;
  max-width: 70%;
  flex: 1 1 auto;
  min-width: 0;
}

.tip-title {
  font-size: 0.95rem;
  color: #0ff;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 16rem;
  flex: 1 1 auto;
  min-width: 0;
}

.tip-float {
  position: fixed;
  top: 12px;
  right: calc(16px + var(--tip-scrollbar, 0px));
}

.tip-button {
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(70, 90, 170, 0.25);
  background: rgba(9, 12, 26, 0.55);
  color: rgba(232, 237, 255, 0.92);
  padding: 10px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  transition: transform 0.08s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.tip-button::after,
.tip-home::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: -2px -30%;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.18), transparent);
  transform: translateX(-60%);
  filter: blur(0.2px);
  transition: transform 0.6s ease;
}

.tip-button:hover,
.tip-home:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35), 0 0 26px rgba(0, 229, 255, 0.08);
}

.tip-button:hover::after,
.tip-home:hover::after {
  transform: translateX(60%);
}

.tip-button:focus-visible {
  outline: none;
}

.tip-emoji {
  font-size: 1.1rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

.tip-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #0ff;
}

.tip-icon svg {
  width: 100%;
  height: 100%;
}

.tip-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tip-topbar .tip-controls {
  position: static !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.tip-topbar .tip-controls button {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.tip-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 400;
  padding: 16px;
  box-sizing: border-box;
}

.tip-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.tip-modal__content {
  background: #050510;
  color: #ffffff;
  border: 1px solid #0ff;
  border-radius: 12px;
  padding: 24px;
  width: min(560px, 92vw);
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 0 24px rgba(0, 255, 255, 0.3);
  position: relative;
  font-family: inherit;
}

.tip-modal__content h2 {
  margin: 0 0 12px;
  color: #0ff;
}

.tip-modal__content h3 {
  margin: 16px 0 8px;
  color: #7fffd4;
}

.tip-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

.tip-modal__close:hover {
  border-color: #0ff;
  color: #0ff;
}

.tip-modal__section {
  margin-top: 16px;
}

.tip-wallet {
  padding: 12px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 10px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.4);
}

.tip-wallet__label {
  font-weight: 600;
  color: #0ff;
}

.tip-wallet__address {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  word-break: break-all;
  color: #ffffff;
}

.tip-wallet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tip-copy,
.tip-action {
  border: 1px solid #0ff;
  background: transparent;
  color: #0ff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
}

.tip-copy:hover,
.tip-action:hover {
  background: rgba(0, 255, 255, 0.15);
}

.tip-link {
  color: #0ff;
}

.tip-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

body.tip-modal-open {
  overflow: hidden;
}

body.tip-has-topbar {
  padding-top: var(--tip-topbar-height);
}

body.tip-has-topbar #app {
  min-height: calc(100dvh - var(--tip-topbar-height));
}

@media (max-width: 640px) {
  :root {
    --tip-topbar-height: 56px;
  }

  .tip-topbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 8px calc(10px + var(--tip-scrollbar, 0px));
  }

  .tip-bar-right {
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
  }

  .tip-title {
    max-width: 30vw;
    font-size: 0.85rem;
  }

  .tip-home {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .tip-button {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .tip-modal__content {
    padding: 16px;
    max-height: 80vh;
  }

  .tip-float {
    top: 10px;
    right: calc(12px + var(--tip-scrollbar, 0px));
  }

  body.tip-has-topbar {
    padding-top: var(--tip-topbar-height);
  }
}
