/* ElfMixer — Minimal Style */

@font-face {
  font-family: 'Magic Retro';
  src: url('police/magic-retro/Magic Retro.ttf') format('truetype');
}

@font-face {
  font-family: 'Consolas';
  src: url('police/Consolas-Font/CONSOLA.TTF') format('truetype');
  font-style: normal;
  font-weight: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --border: #dddddd;
  --text: #222222;
  --text-dim: #888888;
  --primary: #333333;
  --radius: 4px;
  --sans: 'Consolas', monospace;
  --mono: 'Consolas', monospace;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* WRAPPER */
.wrapper {
  width: 100%;
  max-width: 860px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* HEADER */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0 20px;
  gap: 6px;
}

.mascot {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transform: translateX(-5px);
}

.site-title {
  font-family: 'Magic Retro', cursive;
  font-size: 38px;
  font-weight: normal;
  color: var(--text);
  margin-top: 0px;
  line-height: 0.5;
  /* Cuts off the huge invisible padding of the font */
}

.site-tagline {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 0px;
}

.site-fees {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 6px;
  opacity: 0.8;
}

/* BANNER */
.banner {
  width: 100%;
  background: #fff8e1;
  border: 1px solid #e0c96e;
  border-radius: var(--radius);
  padding: 10px 16px;
  color: #7a6010;
  font-size: 12px;
  text-align: center;
  margin-bottom: 16px;
}

/* SWAP CARD */
.swap-card {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* SWAP ROW */
.swap-row {
  display: flex;
  gap: 16px;
}

.swap-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.input-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fafafa;
}

.input-group:focus-within {
  border-color: #aaa;
}

.amount-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  padding: 10px 14px;
  min-width: 0;
}

.amount-input[readonly] {
  color: var(--text-dim);
  cursor: default;
}

.amount-input::-webkit-inner-spin-button,
.amount-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.amount-input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.currency-select-wrapper {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border);
  background: #f0f0f0;
}

.currency-select {
  appearance: auto;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
}

.currency-select-wrapper::after {
  display: none;
}

.field-note {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
}

/* RECIPIENT */
.recipient-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.address-input {
  width: 100%;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  padding: 10px 14px;
  outline: none;
}

.address-input::placeholder {
  color: #bbb;
}

.address-input:focus {
  border-color: #aaa;
}

/* BUTTONS */
.action-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
}

.btn {
  padding: 12px 36px;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
}

.btn-secondary {
  background: #5a5c63;
  color: #fff;
}

.btn-secondary:hover {
  opacity: 0.9;
}

.btn-primary {
  background: #e4b84a;
  color: #111;
}

.btn-primary:hover {
  opacity: 0.9;
}



/* FOOTER */
.site-footer {
  margin-top: 16px;
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-copy {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 0px;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 400px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.modal-icon {
  font-size: 40px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.modal-body {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.6;
}

.modal-address-box {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
  text-align: center;
  width: 100%;
}

/* RESPONSIVE */
@media (max-width: 520px) {
  .swap-row {
    flex-direction: column;
  }

  .swap-card {
    padding: 16px;
  }

  .action-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

/* ── CONFIRM PAGE ──────────────────────────────────────────────────────────── */
#confirm-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

.confirm-wrapper {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confirm-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 32px;
  margin-top: 20px;
}

.confirm-id {
  font-family: var(--mono);
  font-size: 15px;
  margin-bottom: 24px;
  color: var(--text);
}

.confirm-row {
  display: flex;
  gap: 24px;
  width: 100%;
}

.confirm-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-label {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.confirm-note {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
}

.confirm-addr-box {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
  width: 100%;
  height: 100%;
  /* Force single-line look — overflow hidden keeps height uniform */
  overflow: hidden;
}

.confirm-addr-wrapper {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 42px;
  /* Fixed height so both columns look identical */
}

.copy-btn {
  flex-shrink: 0;
  background: #f0f0f0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-icon {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
}

.copy-btn:hover {
  background: #e0e0e0;
}

.copy-btn.copied {
  background: #d4edda;
  border-color: #b8d8c1;
  color: #2d6a4f;
}

.confirm-qr {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 210px;
  /* Fixed height so both QR boxes are identical */
  overflow: hidden;
}

.confirm-qr canvas,
.confirm-qr img {
  display: block;
}

/* LANGUAGE SELECTOR */
.lang-selector {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  z-index: 1000;
  gap: 8px;
  color: var(--text);
}

.lang-select {
  background: transparent;
  color: inherit;
  border: none;
  border-bottom: 2px dashed currentcolor;
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 0 2px 0;
}

.lang-select option {
  background: var(--surface);
  color: var(--text);
}

.lang-selector i {
  font-size: 12px;
}

.confirm-details {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
}

.confirm-details-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.confirm-status {
  color: #e4b84a;
  font-weight: 600;
}

@media (max-width: 600px) {
  .confirm-row {
    flex-direction: column;
  }
}

/* ── STATUS MIXING ─────────────────────────────────────────────────────────── */
.status-mixing {
  color: #3ecf8e !important;
  animation: pulse-green 1.6s ease-in-out infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

/* ── DEPOSIT DETECTION OVERLAY ────────────────────────────────────────────── */
.deposit-detect-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius);
}

/* The overlay itself – hidden by default */
.deposit-detected-overlay {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  align-items: center;
  justify-content: center;
  /* Dark charcoal – matches the image, address still faintly visible behind */
  background: rgba(30, 30, 32, 0.82);
  z-index: 10;
}

/* Show state */
.deposit-detected-overlay.active {
  display: flex;
  animation: detect-overlay-in 0.25s ease both;
}

@keyframes detect-overlay-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Thin shimmer that sweeps once, left → right, like a scan highlight */
.deposit-scan-line {
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.07) 50%,
      transparent 100%);
  animation: scan-sweep 0.9s ease-out 0s both;
  pointer-events: none;
}

@keyframes scan-sweep {
  from {
    left: -50%;
  }

  to {
    left: 120%;
  }
}

/* "Deposit Already Detected" text — white, bold, matches image */
.deposit-detected-text {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.03em;
  color: #ffffff;
  white-space: nowrap;
  animation: detect-text-in 0.3s ease 0.1s both;
  position: relative;
  z-index: 2;
}

@keyframes detect-text-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


/* ── WAITING DEPOSIT INDICATOR ─────────────────────────────────────────────── */
.waiting-deposit-indicator {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.waiting-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 4px;
}

.waiting-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  display: inline-block;
  animation: dot-bounce 1.4s ease-in-out infinite;
}

.waiting-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.waiting-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-bounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}


/* ── MIX COMPLETE OVERLAY ──────────────────────────────────────────────────── */
.mix-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: overlay-fade-in 0.4s ease;
}

@keyframes overlay-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.mix-overlay-inner {
  position: relative;
  background: #fff;
  border-radius: 2px;
  padding: 24px 20px 20px;
  max-width: 420px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  overflow: hidden;
  animation: card-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes card-pop {
  from {
    transform: scale(0.75);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── SVG Checkmark ─────────────────────────────────────────────────────────── */
.mix-checkmark {
  width: 80px;
  height: 80px;
}

.checkmark-svg {
  width: 80px;
  height: 80px;
}

.checkmark-circle {
  stroke: #3ecf8e;
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-miterlimit: 10;
  animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.1s forwards;
}

@keyframes stroke-circle {
  to {
    stroke-dashoffset: 0;
  }
}

.checkmark-path {
  stroke: #3ecf8e;
  stroke-width: 2.5;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: stroke-check 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.7s forwards;
}

@keyframes stroke-check {
  to {
    stroke-dashoffset: 0;
  }
}

.mix-overlay-title {
  font-family: 'Magic Retro', var(--sans);
  font-size: 28px;
  font-weight: normal;
  color: var(--text);
  margin: 0;
}

.mix-overlay-sub {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
}

.mix-overlay-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 16px;
  display: inline-block;
  margin: 0 auto;
  word-break: break-all;
}


/* ── MOBILE RESPONSIVENESS (DO NOT TOUCH DESKTOP) ── */
@media (max-width: 600px) {

  .mix-checkmark,
  .checkmark-svg {
    width: 60px;
    height: 60px;
  }

  .mix-overlay-title {
    font-size: 24px;
  }

  .mix-overlay-sub {
    font-size: 13px;
  }

  .mix-overlay-id {
    padding: 6px 16px;
    font-size: 12px;
  }

  .confirm-card {
    padding: 20px 16px;
  }
}