.tool-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.overlay-content {
  background: #fff;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 0 10px #00000033;
}
body {
  font-size: 15px;
  background-color: #e9ecef;
}

.btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
}

.tool-overlay input {
  font-size: 1rem;
  padding: 0.5rem;
}

@media (max-width: 576px) {
  .card-body {
    padding: 1rem;
  }
}
#content { padding-bottom: 90px; }

.scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}


.scroll-container .card {
  min-width: 250px;
  max-width: 280px;
  flex: 0 0 auto;
  margin-right: 1rem;
}


#floating-view {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 16px;
  border-radius: 12px;
  width: 200px;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  cursor: move;
}

.floating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 10px;
}

#close-floating {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  line-height: 1;
}



.gateway-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 100%;
}
.gateway-card:hover {
  transform: translateY(-4px);
}
.gateway-card img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 8px;
}

#header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#ios-install-guide .guide-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}
#ios-install-guide .guide-box {
  background: #fff;
  padding: 20px;
  max-width: 320px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
#ios-install-guide .guide-box img.icon-share {
  width: 20px;
  vertical-align: middle;
}
#ios-install-guide .guide-box button {
  margin-top: 12px;
  padding: 8px 16px;
  border: none;
  background: #007aff;
  color: #fff;
  border-radius: 8px;
}

/* Hiệu ứng nhấn nút bottom như app native */
.menu-btn {
  position: relative;
  overflow: hidden;
  color: #555;
  transition: background 0.2s ease, transform 0.1s ease;
  border-radius: 8px;
}

.menu-btn.active {
  color: #007bff;
}

.menu-btn:active {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(0.97);
}

/* Hiệu ứng ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(0, 123, 255, 0.3);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Khi giữ lâu trên mobile */
.menu-btn.pressed {
  background: rgba(0, 0, 0, 0.08);
}

.blink-text {
  animation: blink 600ms infinite alternate;
}

@keyframes blink {
  from { opacity: 1; }
  to   { opacity: 0; }
}