@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* --- 1.1 Typography --- */
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  --font-sans: 'Inter', -apple-system, sans-serif;

  --text-xs: 0.64rem;
  --text-sm: 0.8rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.563rem;
  --text-2xl: 1.953rem;

  /* --- 1.2 Color System --- */
  /* Base */
  --color-bg: #FAFAF9;
  --color-bg-elevated: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-secondary: #6B6B6B;
  --color-border: #E5E5E5;

  /* Network accents (desaturated) */
  --color-eth: #627EEA;
  --color-base: #0052FF;
  --color-arb: #28A0F0;
  --color-op: #FF0420;
  --color-poly: #8247E5;
  --color-zora: #5B5BD6;
  --color-bsc: #F0B90B;
  --color-sol: #9945FF;
  --color-tezos: #2C7DF7;
  --color-btc: #F7931A;

  /* Functional */
  --color-success: #22C55E;
  --color-error: #EF4444;

  /* --- 1.3 Spacing System --- */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-12: 3rem;
  /* 48px */
  --space-16: 4rem;
  /* 64px */

  /* --- Legacy Aliases (Maintenance) --- */
  --bg: var(--color-bg);
  --bg-elevated: var(--color-bg-elevated);
  --bg-hover: #F5F5F4;
  --border: var(--color-border);
  --border-focus: var(--color-text-secondary);
  --text: var(--color-text);
  --text-muted: var(--color-text-secondary);
  --text-faint: #737373; /* Improved contrast - was #A3A3A3 */
  --accent: var(--color-text);
  --paper: var(--color-bg-elevated);
  --success: var(--color-success);
  --error: var(--color-error);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows (Updated Ambient) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.03), 0 12px 24px rgba(0, 0, 0, 0.03);

  /* Motion */
  --transition-fast: 0.15s ease;
  --transition-medium: 0.3s ease;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg: #050505;
  --bg-elevated: #111111;
  --bg-hover: #1a1a1a;
  --border: #222222;
  --border-focus: #333333;
  --text: #e5e5e5;
  --text-muted: #737373;
  --text-faint: #525252;
  --accent: #f5f5f5;
  --paper: #ffffff;

  --success: #22c55e;
  --error: #ef4444;

  --shadow-lg:
    0 12px 24px rgba(0, 0, 0, 0.4),
    0 24px 48px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Focus states for keyboard navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Layout */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Header */
header {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.counter strong {
  color: var(--text);
  font-weight: 500;
}

/* Hero */
.hero {
  padding: var(--space-16) 0 var(--space-12);
  text-align: center;
}

.hero h1 {
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto var(--space-8);
}

/* Trust badges */
.badges {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.badge svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* Main Tool */
.tool {
  padding: var(--space-12) 0;
}

.tool-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
  margin-bottom: var(--space-6);
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-wrapper {
  position: relative;
}

.input-field {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  transition: all var(--transition-fast);
}

.input-field:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.input-field::placeholder {
  color: var(--text-faint);
}

/* Chain selector */
.chain-select {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.chain-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chain-option:hover {
  border-color: var(--border-focus);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.chain-option.active {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--bg-hover);
}

.chain-option img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--text-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Wallet connect */
.wallet-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wallet-btn:hover {
  border-color: var(--border-focus);
  background: var(--bg-hover);
}

.wallet-btn svg {
  width: 18px;
  height: 18px;
}

/* Generate button */
.generate-btn {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: var(--text);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: var(--space-6);
}

.generate-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.generate-btn:active {
  transform: translateY(0) scale(0.98);
}

.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.generate-btn.loading {
  opacity: 0.8;
  cursor: wait;
  pointer-events: none;
}

.generate-btn .btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--bg);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* Status messages */
.status {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 13px;
  display: none;
}

.status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status.loading {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* How it works */
.how-it-works {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-8);
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

@media (max-width: 600px) {
  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

.step {
  text-align: center;
}

.step-number {
  width: var(--space-8);
  height: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
}

.step h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
}


/* FAQ */
.faq {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border);
}

.faq-list {
  max-width: 560px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) 0;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--radius-md);
  padding-left: var(--space-3);
  padding-right: var(--space-3);
  margin-left: calc(-1 * var(--space-3));
  margin-right: calc(-1 * var(--space-3));
}

.faq-question:hover {
  background: var(--bg-hover);
}

.faq-question svg {
  width: var(--space-4);
  height: var(--space-4);
  color: var(--text-muted);
  transition: transform var(--transition-medium);
}

.faq-item.open .faq-question svg {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding-bottom: var(--space-5);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Newsletter */
.newsletter {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.newsletter h3 {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.newsletter p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.newsletter-form {
  display: flex;
  gap: var(--space-2);
  max-width: 360px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-3) 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.newsletter-form button {
  padding: var(--space-3) var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.newsletter-form button:hover {
  border-color: var(--border-focus);
  background: var(--bg-hover);
}

/* Footer */
footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
  text-align: center;
}

footer p {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-2) 0;
}

footer p a {
  color: var(--color-text);
  text-decoration: none;
}

footer p a:hover {
  text-decoration: underline;
}

footer .footer-tagline {
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  margin-top: var(--space-1);
  margin-bottom: var(--space-4);
}

footer nav {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

footer nav a {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
}

footer nav a:hover {
  color: var(--color-text);
}

/* Receipt Preview Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: var(--space-5);
}

/* Receipt Preview */
.receipt-preview {
  background: var(--paper);
  color: #000000;
  padding: var(--space-6);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  position: relative;
  padding-bottom: var(--space-8);
  box-shadow: var(--shadow-lg);
  transition: transform 0.5s ease, opacity 0.5s ease;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-4px);
  }

  100% {
    transform: translateY(0px);
  }
}

.receipt-preview::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 10px;
  /* Zig-zag pattern */
  background: radial-gradient(circle, transparent, transparent 4px, #fff 4px, #fff 10px) repeat-x;
  background-size: 20px 20px;
}

/* Modal actions */
.modal-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.modal-actions button {
  flex: 1;
  padding: 14px var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--border-focus);
}

.btn-primary {
  background: var(--text);
  border: 1px solid var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.9;
}

/* Share buttons */
.share-section {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.share-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
  text-align: center;
}

.share-buttons {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.share-btn {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.share-btn:hover {
  border-color: var(--border-focus);
  background: var(--bg-hover);
}

.share-btn svg {
  width: 14px;
  height: 14px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(var(--space-3));
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  animation: fadeIn 0.5s ease-out;
}

.tool-card {
  opacity: 0;
  animation: fadeIn 0.5s ease-out 0.1s forwards;
}

.steps {
  opacity: 0;
  animation: fadeIn 0.5s ease-out 0.2s forwards;
}

.faq-list {
  opacity: 0;
  animation: fadeIn 0.5s ease-out 0.3s forwards;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 16px 24px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  opacity: 0;
  transform: translateY(20px);
  animation: toastIn 0.3s ease-out forwards;
  pointer-events: auto;
}

.toast.toast-out {
  animation: toastOut 0.3s ease-out forwards;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--error);
}

.toast.info {
  border-left: 3px solid #3B82F6;
}

.toast.info .toast-icon {
  color: #3B82F6;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error .toast-icon {
  color: var(--error);
}

@keyframes toastIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Loading spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

/* Trust Block */
.trust-block {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
  max-width: 480px;
  margin: 40px auto 0;
  line-height: 1.6;
}

/* Custom Chain Select */
.input-wrapper {
  position: relative;
  display: flex;
  gap: var(--space-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-1);
  transition: all var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.custom-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  padding-right: var(--space-2);
}

.custom-select {
  appearance: none;
  background: transparent;
  border: none;
  padding: 10px var(--space-8) 10px var(--space-3);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.select-arrow {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  width: var(--space-4);
  height: var(--space-4);
}

.input-field {
  border: none;
  background: transparent;
  padding: var(--space-3);
  border-radius: 0;
  box-shadow: none;
  /* Override default input focus */
}

.input-field:focus {
  box-shadow: none;
  border-color: transparent;
}

/* Recent Txs */
.recent-txs {
  margin-top: var(--space-6);
  display: none;
}

.recent-txs.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.tx-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.tx-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.tx-item:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg-hover);
}

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

/* Showcase Gallery Section */
.gallery {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: var(--space-4) 0;
}

.gallery-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.gallery-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-faint);
  transition: color var(--transition-fast);
}

.gallery-header:hover .gallery-toggle {
  color: var(--text);
}

.gallery-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium) var(--transition-medium);
}

.gallery.expanded .gallery-content {
  max-height: 1000px;
  padding-bottom: var(--space-16);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-8);
  padding: var(--space-4);
}

.showcase-card {
  background: var(--paper);
  border: none;
  border-radius: 2px;
  padding: var(--space-5);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.08),
    0 2px 2px rgba(0, 0, 0, 0.06),
    0 4px 4px rgba(0, 0, 0, 0.05),
    0 8px 8px rgba(0, 0, 0, 0.04),
    0 16px 16px rgba(0, 0, 0, 0.03);
}

/* Rotations removed for Swiss Grid */

.showcase-card:hover {
  transform: translateY(-8px) rotate(0deg) scale(1.02);
  box-shadow:
    0 2px 2px rgba(0, 0, 0, 0.1),
    0 4px 4px rgba(0, 0, 0, 0.08),
    0 8px 8px rgba(0, 0, 0, 0.06),
    0 16px 16px rgba(0, 0, 0, 0.05),
    0 32px 32px rgba(0, 0, 0, 0.04);
}

.card-preview {
  height: 140px;
  background: var(--bg-hover);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.showcase-card:hover .card-preview img {
  transform: scale(1.05);
}

.showcase-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.showcase-card .card-meta {
  font-size: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-top: -6px;
  font-weight: 600;
  text-transform: uppercase;
}

.showcase-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.showcase-card::after {
  content: "Inspect Receipt";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  color: var(--bg);
  padding: var(--space-2);
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: translateY(100%);
  transition: transform var(--transition-fast);
}

.showcase-card:hover::after {
  transform: translateY(0);
}

/* Responsive Gallery */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .showcase-card {
    padding: var(--space-3);
  }

  .card-preview {
    height: 100px;
  }
}

/* Swiss Archival Grid Override */
.showcase-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--transition-medium);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  transform: none !important;
  box-shadow: none;
}

.showcase-card:hover {
  transform: translateY(-2px) !important;
  border-color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.showcase-card h3 {
  font-size: 13px;
  letter-spacing: 0;
}

.card-preview {
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: none;
}



@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .card-preview {
    height: 140px;
  }

  .showcase-card p {
    display: block;
  }
}

/* Image fade-in */
.card-preview img {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 0.2s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Gallery entrance animation */
.gallery.expanded .gallery-content {
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card stagger entrance */
.gallery.expanded .showcase-card {
  opacity: 0;
  animation: cardEntrance 0.4s ease forwards;
}

.gallery.expanded .showcase-card:nth-child(1) {
  animation-delay: 0.1s;
}

.gallery.expanded .showcase-card:nth-child(2) {
  animation-delay: 0.15s;
}

.gallery.expanded .showcase-card:nth-child(3) {
  animation-delay: 0.2s;
}

.gallery.expanded .showcase-card:nth-child(4) {
  animation-delay: 0.25s;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Active/pressed state for touch */
.showcase-card:active {
  transform: scale(0.98);
}

/* Keyboard focus */
.showcase-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Toggle icon rotation */
.gallery.expanded #toggleIcon {
  transform: rotate(180deg);
}

/* Smart Search Omnibox */
.smart-wrapper {
  transition: box-shadow var(--transition-medium), border-color var(--transition-medium);
  position: relative;
}

.smart-wrapper:focus-within {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
  border-color: var(--text);
}

.smart-wrapper.valid-hash {
  border-color: var(--success);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--success);
}

.smart-wrapper.valid-address {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.input-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.smart-wrapper input {
  padding-right: 80px;
}

/* Technical Details Toggle */
.tech-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  padding: var(--space-4) 0 var(--space-2);
  margin-top: var(--space-2);
  width: 100%;
  text-align: left;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tech-toggle:hover {
  color: var(--text);
}

.tech-toggle::after {
  content: '+';
  font-weight: bold;
}

.tech-toggle.active::after {
  content: '−';
}

/* Technical Details Grid */
.technical-details {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  animation: slideDown 0.3s ease;
}

.tech-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.tech-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tech-mono {
  color: var(--text);
  word-break: break-all;
  text-align: right;
  max-width: 65%;
  font-feature-settings: "tnum";
}

.tech-row.full-width {
  flex-direction: column;
  gap: 4px;
}

.tech-row.full-width .tech-mono {
  text-align: left;
  max-width: 100%;
  color: var(--text-muted);
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ticker Style Networks */
.chains-section {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.chains-grid {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.chains-grid:hover {
  opacity: 1;
}

.chain-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: default;
}

.chain-icon {
  width: auto;
  height: auto;
  background: none;
  font-size: 14px;
  color: var(--text-muted);
}

.chain-name {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- EDGY / CYBER AESTHETICS --- */

/* Scanline Texture Overlay */
.card-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.15) 0px,
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px);
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* Holographic Hover Glow */
.showcase-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  /* Glass-ish */
  position: relative;
  overflow: hidden;
}

.showcase-card:hover {
  border-color: var(--text);
  /* Subtle border instead of neon green */
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px) scale(1.01) !important;
}

/* Subtle text enhancement on hover */
.showcase-card:hover h3 {
  color: var(--text);
}

/* Subtle image enhancement on hover */
.showcase-card:hover .card-preview img {
  filter: contrast(1.05) brightness(1.02);
  transform: scale(1.03);
}

/* Entrance Animation (Staggered) */
@keyframes cyberSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.showcase-card {
  animation: cyberSlideIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  /* Helper for animation */
}

.showcase-card:nth-child(1) {
  animation-delay: 0.05s;
}

.showcase-card:nth-child(2) {
  animation-delay: 0.1s;
}

.showcase-card:nth-child(3) {
  animation-delay: 0.15s;
}

.showcase-card:nth-child(4) {
  animation-delay: 0.2s;
}

.showcase-card:nth-child(5) {
  animation-delay: 0.25s;
}

.showcase-card:nth-child(6) {
  animation-delay: 0.3s;
}

/* New Value Props (PRD 3.2) */
.value-props {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  flex-wrap: wrap;
}

