/* Starfield canvas background (moved from inline style in index.html) */
#starfield-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}
/* Dashboard Inline Style Migrations */
.global-loading-bg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: rgba(10, 10, 10, 0.7);
  align-items: center;
  justify-content: center;
}
.global-loading-center {
  margin: auto;
  text-align: center;
}
.global-loading-text {
  color: #00d4ff;
  margin-top: 12px;
  font-size: 1.2em;
}
.coinbase-btn {
  background: linear-gradient(135deg, #0052ff, #00d4ff) !important;
  margin-left: 10px !important;
}
.refresh-btn {
  background: linear-gradient(135deg, #00d4ff, #8a2be2) !important;
  margin-left: 10px !important;
}
.copy-account-btn {
  width: auto;
  padding: 4px 10px;
  font-size: 0.9em;
  margin-left: 8px;
}
.payment-history-card {
  margin-top: 32px;
}
.payment-history-title {
  color: #00d4ff;
  margin-bottom: 12px;
}
.payment-history-table-wrap {
  overflow-x: auto;
}
.payment-history-table {
  width: 100%;
  background: rgba(26, 26, 46, 0.9);
  border-radius: 10px;
}
.payment-history-header-row {
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
}
/* ===================================
   SHARED MOBILE & POLISH STYLES
   Include this in all pages for consistent mobile experience
   =================================== */

/* Mobile Touch Optimization */
* {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
}

/* Prevent double-tap zoom on buttons */
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

/* Enhanced Viewport Support */
@viewport {
  width: device-width;
  zoom: 1;
  user-zoom: zoom;
}

/* Pointer Events Management */
.overlay,
.toast-container,
.progress-bar,
.notification-container,
.loading-overlay {
  pointer-events: none;
}

.modal,
.modal-content,
button,
a,
input,
select,
textarea,
.clickable,
.interactive {
  pointer-events: auto;
}

/* Polish Enhancements - Transitions */
button,
a,
.card,
.nav-link,
.tab,
.btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Ripple Effect */
button,
.btn {
  position: relative;
  overflow: hidden;
}

button::before,
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

button:active::before,
.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Enhanced Shadows */

.card,
.modal,
.dropdown {
  box-shadow:
    0 8px 32px rgba(0, 212, 255, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08);
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.95) 0%,
    rgba(0, 212, 255, 0.08) 100%
  );
  border: 1px solid rgba(0, 212, 255, 0.18);
  color: #fff;
  padding: 1.5rem;
  border-radius: 18px;
  margin-bottom: 1rem;
}
.card:hover {
  box-shadow:
    0 20px 40px rgba(0, 212, 255, 0.18),
    0 10px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-6px) scale(1.01);
}

/* Focus Glow Rings */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(0, 212, 255, 0.3),
    0 0 20px rgba(0, 212, 255, 0.2);
}

/* Navigation Link Underline Animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #8a2be2);
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Card Scale Effect */
.card {
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
}

/* Button Hover States */
button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
}

button:active,
.btn:active {
  transform: translateY(0);
}

/* Loading Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Mobile Hamburger Menu */
.hamburger {
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger:hover {
  transform: scale(1.1);
}

.hamburger:active {
  transform: scale(0.95);
}

/* Mobile Overlay */
.mobile-menu-overlay {
  pointer-events: none;
  transition:
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
  pointer-events: auto;
}

/* Toast Notifications */
.toast {
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

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

/* Global Announcement Banner */
.global-announcement {
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.15),
    rgba(118, 75, 162, 0.15)
  );
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #ffffff;
}

.global-announcement-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.global-announcement-text {
  color: rgba(255, 255, 255, 0.85);
}

.global-announcement-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.global-announcement-dismiss {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 520px;
  width: calc(100% - 2rem);
  z-index: 1000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.pwa-install-title {
  font-weight: 700;
}

.pwa-install-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.pwa-install-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Global Toast */
.global-toast-container {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1100;
}

.global-toast {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.4);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.global-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Theme Toggle */
.theme-toggle {
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
  transform: scale(1.15) rotate(15deg);
}

.theme-toggle:active {
  transform: scale(1.05) rotate(0deg);
}

/* Responsive Grid */
@media (max-width: 768px) {
  .dashboard-grid,
  .stats-grid,
  .features-grid,
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card,
  .modal,
  .dropdown {
    padding: 1rem;
    border-radius: 14px;
  }
  .header,
  .wallet-section {
    padding: 1rem;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .card,
  button,
  .nav-link {
    border: 2px solid currentColor;
  }
}

/* Print Styles */
@media print {
  .hamburger,
  .mobile-menu-overlay,
  .theme-toggle,
  button,
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 0.85rem !important;
  }

  .navbar {
    padding: 0.7rem 0.85rem !important;
  }

  .navbar-content {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.8rem !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
  }

  .logo {
    align-items: center !important;
    gap: 0.7rem !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  .logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .logo-text {
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }

  .logo-caption {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }

  .hamburger {
    order: 3;
    margin-left: auto;
    flex: 0 0 auto;
  }

  .nav-links {
    display: none;
  }

  .nav-links.active {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    display: grid !important;
    gap: 0.55rem !important;
    padding: 0.85rem;
    border: 1px solid rgba(110, 231, 255, 0.12);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(5, 12, 28, 0.98), rgba(8, 18, 40, 0.94));
    box-shadow:
      0 20px 44px rgba(0, 0, 0, 0.34),
      0 0 0 1px rgba(0, 212, 255, 0.05);
    z-index: 40;
  }

  .nav-link,
  #connectBtn,
  .nav-status-pill {
    width: 100%;
    justify-content: center;
  }

  .nav-link {
    min-height: 44px;
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem !important;
  }

  #connectBtn {
    margin-bottom: 0 !important;
  }

  .nav-status-pill {
    display: inline-flex !important;
    min-height: 42px;
  }

  .mobile-menu-overlay.active {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 20, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    z-index: 20;
  }

  .hero {
    padding: 1.2rem !important;
    border-radius: 24px !important;
  }

  .hero-grid {
    gap: 1rem !important;
  }

  .hero h1 {
    font-size: clamp(2.05rem, 11vw, 2.7rem) !important;
    line-height: 1 !important;
  }

  .hero p {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
  }

  .hero-kicker {
    min-height: 30px;
    padding: 0.32rem 0.65rem;
    font-size: 0.68rem;
  }

  .hero-tags {
    gap: 0.45rem !important;
    margin-top: 1rem !important;
  }

  .hero-tag {
    width: auto !important;
    min-height: 34px;
    padding: 0.42rem 0.7rem;
    font-size: 0.78rem;
  }

  .quick-actions {
    gap: 0.55rem !important;
    margin-top: 1rem !important;
  }

  .quick-action-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px !important;
    padding: 0.72rem 0.9rem !important;
    font-size: 0.84rem !important;
  }

  #copyBtnText {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stats-grid,
  .features-grid,
  .quick-links,
  .staking-pools {
    gap: 0.75rem !important;
  }

  .main-grid {
    gap: 0.85rem !important;
  }

  .card {
    padding: 0.9rem !important;
    margin-bottom: 0.9rem !important;
    border-radius: 18px !important;
  }

  .card-header {
    margin-bottom: 0.8rem !important;
  }

  .stat-card {
    min-height: auto !important;
    padding: 1rem !important;
  }

  .stat-card .value {
    font-size: 1.55rem !important;
  }

  .stat-card .change {
    width: 100%;
    justify-content: center;
  }

  .wallet-section,
  .wallet-connected,
  .balance-display,
  .input-group,
  .pool-card {
    padding: 0.85rem !important;
  }

  .quick-link {
    grid-template-columns: 48px 1fr !important;
    gap: 0.8rem !important;
  }

  .newsletter-panel {
    padding: 0.9rem !important;
    gap: 0.85rem !important;
    border-radius: 22px !important;
  }

  .newsletter-copy h2 {
    font-size: 1.45rem !important;
  }

  .newsletter-card,
  .footer-shell {
    padding: 0.85rem !important;
  }

  .notification-options label {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-shell {
    border-radius: 22px !important;
  }

  .footer-chip {
    width: 100%;
    justify-content: center;
    min-height: 34px;
    padding: 0.4rem 0.75rem;
    font-size: 0.76rem;
  }

  .footer-socials {
    width: 100%;
    justify-content: flex-start;
  }

  .theme-toggle {
    right: 12px !important;
    bottom: 12px !important;
  }
}
