/* ----------------------------------------
   GLOBAL
---------------------------------------- */
body {
  margin: 0;
  padding: 0;
  background: #000;
  background-image: url('/img/grid.png');
  background-size: cover;
  background-attachment: fixed;
  color: #e6e6e6;
  font-family: "Inter", sans-serif;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  pointer-events: none;
  z-index: 0;
}

.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #050505; /* Deep black base */
  overflow: hidden;
  z-index: -1; /* Puts it behind everything */
}

.grid-floor {
  position: absolute;
  width: 200%;
  height: 200%;
  left: -50%;
  top: -30%; /* Adjust to move horizon up/down */
  
  /* THE GRID PATTERN */
  /* This creates 1px sharp cyan lines */
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.15) 1px, transparent 1px), 
    linear-gradient(90deg, rgba(0, 243, 255, 0.15) 1px, transparent 1px);
  
  background-size: 60px 60px; /* Adjust square size here */
  
  /* 3D PERSPECTIVE */
  transform: perspective(500px) rotateX(75deg);
  
  /* FADE OUT MASK (The horizon fade) */
  -webkit-mask-image: linear-gradient(to bottom, transparent 10%, black 90%);
  mask-image: linear-gradient(to bottom, transparent 10%, black 90%);
  
  animation: move-grid 4s linear infinite;
}

@keyframes move-grid {
  0% {
    transform: perspective(500px) rotateX(75deg) translateY(0);
  }
  100% {
    transform: perspective(500px) rotateX(75deg) translateY(60px); /* Must match background-size */
  }
}

/* ----------------------------------------
   NAVIGATION
---------------------------------------- */
.nav {
  width: 100%;
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,180,255,0.2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-title {
  font-size: 22px;
  letter-spacing: 3px;
  font-weight: 600;
  color: #b5eaff;
}

.nav-btn {
  padding: 10px 20px;
  border: 1px solid #0af;
  background: rgba(0,0,0,0.6);
  color: #0af;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.25s;
  margin-right: 124px;
}

.nav-btn:hover {
  background: #0af;
  color: #000;
}

.nav-btn.connected {
  background: #0af;
  border-color: #0af;
  color: #000;
}

.nav-logo {
  height: 32px;
  width: auto;
  opacity: 0.9;
}


/* ----------------------------------------
   LAYOUT
---------------------------------------- */
.center-wrapper {
  display: flex;
  justify-content: center;
  padding: 60px 20px;
  z-index: 2;
  position: relative;
}

.bridge-card {
  width: 420px;
  padding: 34px;
  border-radius: 14px;
  background: rgba(15, 15, 18, 0.75);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 180, 255, 0.22);
  box-shadow: 0 0 25px rgba(0, 180, 255, 0.25);
}

.bridge-title {
  font-size: 18px;
  letter-spacing: 2px;
  color: #b5eaff;
  text-transform: uppercase;
  margin-bottom: 30px;
}

/* ----------------------------------------
   CHAIN SELECT UI (Uniswap-style)
---------------------------------------- */
.chain-box {
  margin-bottom: 20px;
}

.chain-label {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chain-select {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(0, 180, 255, 0.18);
  cursor: pointer;
  transition: 0.25s;
  position: relative;
}

.chain-select:hover {
  border-color: #0af;
  box-shadow: 0 0 12px rgba(0,180,255,0.35);
}

.chain-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.token-badge {
  position: absolute;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  bottom: 7px;
  border: 2px solid #000;
}

#fromChainName,
#toChainName {
  font-size: 15px;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ----------------------------------------
   CENTER ARROW (animated)
---------------------------------------- */
.swap-button {
  width: 48px;
  height: 48px;
  margin: 12px auto;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(0,180,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.25s;
}

.swap-button:hover {
  border-color: #0af;
  box-shadow: 0 0 12px rgba(0,180,255,0.4);
  transform: scale(1.07);
}

.swap-icon {
  width: 22px;
  height: 22px;
  opacity: 0.9;
  transition: 0.35s ease-in-out;
}

/* Spin animation when clicked */
.swap-button.clicked .swap-icon {
  transform: rotate(180deg);
}


/* ----------------------------------------
   AMOUNT BOX
---------------------------------------- */
.amount-box {
  position: relative;
  margin-top: 25px;
  margin-bottom: 20px;
}

.amount-label {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.amount-input {
  width: 100%;
  padding: 16px 14px;
  background: rgba(0,0,0,0.7);
  color: #e6f7ff;
  border: 1px solid rgba(0,180,255,0.2);
  border-radius: 12px;
  font-size: 18px;
  letter-spacing: 1px;
  outline: none;
  transition: 0.25s;
}

.amount-input:focus {
  border-color: #0af;
  box-shadow: 0 0 12px rgba(0,180,255,0.3);
}

.amount-token {
  position: absolute;
  right: 16px;
  top: 36px;
  color: #0af;
  font-weight: 600;
  letter-spacing: 1px;
}

.amount-box,
.chain-box,
.amount-input {
  width: 100%;
}

.amount-input {
  width: calc(100% - 30px); /* consistent padding */
}


/* ----------------------------------------
   BUTTON
---------------------------------------- */
.bridge-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, #00aaff, #00ddff);
  border: none;
  color: #000;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 12px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.25s;
}

.bridge-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.msg {
  margin-top: 18px;
  color: #88d6ff;
  font-size: 13px;
  letter-spacing: 1px;
  min-height: 20px;
}

/* ----------------------------------------
   STATUS PAGE
---------------------------------------- */
.status-panel {
  width: 480px;
  padding: 34px;
  background: rgba(15, 15, 18, 0.72);
  backdrop-filter: blur(16px);
  border-radius: 14px;
  border: 1px solid rgba(0, 180, 255, 0.22);
  box-shadow: 0 0 25px rgba(0, 180, 255, 0.25);
}

.tx-hash {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 18px;
}

.steps {
  margin-top: 26px;
}

/* Animated status steps */
.step {
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(0,0,0,0.55);
  border-left: 4px solid rgba(0,180,255,0.3);
  margin-bottom: 14px;
  transition: 0.3s;
  letter-spacing: 1px;
}

.step.pending {
  border-left-color: #ff9900;
  background: rgba(60,35,5,0.4);
}

.step.done {
  border-left-color: #00d0ff;
  background: rgba(0,80,160,0.45);
  box-shadow: 0 0 14px rgba(0,180,255,0.4);
  animation: stepGlow 1.2s ease-out;
}

@keyframes stepGlow {
  0% { box-shadow: 0 0 0px rgba(0,180,255,0); }
  100% { box-shadow: 0 0 14px rgba(0,180,255,0.4); }
}

.step.inactive {
  opacity: 0.35;
}
