/* Hash tool — split layout + fingerprint dashboard */

.hash-app {
  margin-top: 8px;
  --hash-accent: #6366f1;
  --hash-accent-soft: #a78bfa;
}

.hash-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  min-height: 560px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.07);
}

.hash-panel--form {
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(100% 80% at 100% 0%, rgba(99, 102, 241, 0.06), transparent 50%),
    linear-gradient(180deg, #fff 0%, #fafbfd 100%);
}

.hash-head__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  color: var(--lx-ink);
}

.hash-head__sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--lx-ink-soft);
}

.hash-tabs {
  display: flex;
  gap: 8px;
}

.hash-tab {
  flex: 1;
  height: 40px;
  border: 1px solid var(--lx-border);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--lx-ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.hash-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.28);
}

.hash-pane textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--lx-border);
  background: #fff;
  font: inherit;
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hash-pane textarea:focus {
  outline: none;
  border-color: var(--lx-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.hash-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hash-field span {
  font-size: 12px;
  font-weight: 800;
  color: var(--lx-ink-soft);
}

.hash-field input {
  height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--lx-border);
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.hash-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 160px;
  padding: 20px;
  border-radius: 16px;
  border: 2px dashed rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.04);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.hash-drop.is-dragover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}

.hash-drop__icon {
  font-size: 28px;
  opacity: 0.7;
}

.hash-drop strong {
  font-size: 14px;
  color: var(--lx-ink);
}

.hash-drop__sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--lx-ink-soft);
}

.hash-drop__name {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--lx-purple);
  direction: ltr;
}

.hash-algos__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--lx-ink-soft);
}

.hash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hash-chip {
  cursor: pointer;
}

.hash-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hash-chip span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--lx-border);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  color: var(--lx-ink-soft);
  transition: all 0.15s ease;
}

.hash-chip input:checked + span {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.hash-more {
  border-radius: 14px;
  border: 1px dashed rgba(99, 102, 241, 0.22);
  background: rgba(99, 102, 241, 0.03);
  padding: 0 12px;
}

.hash-more summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--lx-purple);
}

.hash-more summary::-webkit-details-marker {
  display: none;
}

.hash-more__grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.hash-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--lx-ink-soft);
  cursor: pointer;
}

.hash-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.hash-btn {
  flex: 1;
  position: relative;
  height: 48px;
  border-radius: 14px;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hash-btn--primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  color: #fff;
}

.hash-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.hash-btn--ghost {
  flex: 0 0 auto;
  padding: 0 18px;
  border: 1px solid var(--lx-border);
  background: #fff;
  color: var(--lx-ink-soft);
}

.hash-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.hash-btn__spin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  opacity: 0;
}

.hash-btn.is-loading .hash-btn__text {
  opacity: 0;
}

.hash-btn.is-loading .hash-btn__spin {
  opacity: 1;
  animation: hash-spin 0.7s linear infinite;
}

/* Viz panel */
.hash-panel--viz {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  background: #0c0f1a;
  overflow: hidden;
}

.hash-dash {
  position: relative;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 1;
}

.hash-dash__orbs {
  position: absolute;
  inset: -50% -40%;
  pointer-events: none;
  z-index: 0;
}

.hash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.5;
  animation: hash-orb-float 9s ease-in-out infinite;
}

.hash-orb--1 {
  width: 200px;
  height: 200px;
  top: 0;
  right: 0;
  background: var(--hash-accent, #6366f1);
}

.hash-orb--2 {
  width: 150px;
  height: 150px;
  bottom: 10%;
  left: 0;
  background: #38bdf8;
  opacity: 0.35;
  animation-delay: -4s;
}

.hash-fp {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: min(100%, 240px);
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  z-index: 1;
}

.hash-fp span {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.45s ease, transform 0.35s ease;
}

.hash-app.is-updated .hash-fp span {
  animation: hash-cell-pop 0.4s ease backwards;
}

.hash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  z-index: 1;
}

.hash-stat {
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.hash-stat__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
}

.hash-stat__val {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}

.hash-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  z-index: 1;
}

/* Results */
.hash-results {
  margin-top: 20px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
}

.hash-results[hidden] {
  display: none;
}

.hash-results__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hash-results__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.hash-copy-all {
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  padding: 8px 14px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--lx-purple);
  cursor: pointer;
}

.hash-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hash-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--lx-border);
  background: #fff;
}

.hash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.hash-card__algo {
  font-size: 12px;
  font-weight: 900;
  color: var(--lx-purple);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hash-card__copy {
  border: 0;
  border-radius: 8px;
  padding: 5px 10px;
  background: rgba(99, 102, 241, 0.1);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  color: var(--lx-purple);
  cursor: pointer;
}

.hash-card__copy.is-done {
  background: rgba(52, 211, 153, 0.15);
  color: #059669;
}

.hash-card__val {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
  direction: ltr;
  text-align: left;
  color: var(--lx-ink);
}

@keyframes hash-spin {
  to { transform: rotate(360deg); }
}

@keyframes hash-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10px, -14px) scale(1.05); }
}

@keyframes hash-cell-pop {
  0% { transform: scale(0.6); opacity: 0.2; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 900px) {
  .hash-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hash-panel--viz {
    order: -1;
    padding: 24px 18px;
  }
}

@media (max-width: 520px) {
  .hash-panel--form {
    padding: 20px 16px 22px;
  }

  .hash-actions {
    flex-direction: column;
  }

  .hash-btn--ghost {
    flex: 1;
  }
}
