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

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  background: linear-gradient(160deg, #bfdbfe 0%, #dbeafe 40%, #e0f2fe 100%);
  color: #1e3a5f;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.5);
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
}

.logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.logo-text h1 {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  line-height: 1.2;
}

.logo-text p {
  font-size: 11px;
  color: #4b82b7;
}

main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  padding: 60px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.hero { text-align: center; }

.hero-emoji {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 16px;
  display: block;
}

.hero h2 {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  color: #1e3a5f;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.hero p {
  margin-top: 10px;
  font-size: 15px;
  color: #3b6ea5;
  font-style: italic;
}

.search-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-row {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.8);
  border: 1.5px solid rgba(147, 197, 253, 0.8);
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.12);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-row:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: rgba(255,255,255,0.95);
}

#tx-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Inter', monospace;
  font-size: 13px;
  color: #1e3a5f;
  outline: none;
  min-width: 0;
}

#tx-input::placeholder { color: #94b8d8; }

.input-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}

#clear-btn {
  display: none;
  background: #c8ddf5;
  border: none;
  cursor: pointer;
  color: #4b82b7;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  line-height: 0;
  flex-shrink: 0;
}

#clear-btn:hover { background: #a8c8e8; color: #1e3a5f; }

#search-btn {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border: none;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  transition: opacity 0.15s, transform 0.1s;
  flex-shrink: 0;
}

#search-btn:hover { opacity: 0.9; transform: scale(1.04); }
#search-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.error-msg {
  font-size: 13px;
  color: #dc2626;
  display: none;
}

.result-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.loading-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(147, 197, 253, 0.5);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  color: #4b82b7;
  font-size: 14px;
  display: none;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}

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

.message-card {
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(147, 197, 253, 0.6);
  border-radius: 16px;
  padding: 28px;
  display: none;
  animation: fadeUp 0.3s ease;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message-label {
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.message-text {
  font-family: 'Inter', monospace;
  font-size: 14px;
  line-height: 1.7;
  color: #1e3a5f;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
}

.no-message-text {
  font-size: 14px;
  color: #4b82b7;
  font-style: italic;
}

.verify-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(147, 197, 253, 0.4);
}

.verify-link {
  font-size: 12px;
  color: #1d4ed8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: opacity 0.15s;
}

.verify-link:hover { opacity: 0.7; text-decoration: underline; }

.share-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(147, 197, 253, 0.5);
  border-radius: 14px;
  padding: 16px 20px;
  display: none;
  animation: fadeUp 0.3s ease;
}

.share-label {
  font-size: 11px;
  font-weight: 600;
  color: #4b82b7;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-url {
  font-family: monospace;
  font-size: 12px;
  color: #1e3a5f;
  word-break: break-all;
  flex: 1;
}

#copy-btn {
  flex-shrink: 0;
  background: rgba(219, 234, 254, 0.8);
  border: 1px solid rgba(147, 197, 253, 0.7);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

#copy-btn:hover { background: rgba(191, 219, 254, 0.9); }

footer {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #7fafd4;
}
