/* Anchora Verification Portal — Dark Theme */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: #888;
}

/* Card */
.card {
  background: rgba(30, 30, 50, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  color: #ccc;
}

.tab.active {
  background: rgba(124, 58, 237, 0.3);
  color: #fff;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Form Elements */
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #aaa;
  margin-bottom: 8px;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus {
  border-color: #7c3aed;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.hint {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

/* File Drop Zone */
.file-drop {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #888;
}

.file-drop:hover,
.file-drop.dragover {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.05);
  color: #aaa;
}

.file-drop-content p {
  margin-top: 12px;
  font-size: 14px;
}

.file-info {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 8px;
  font-size: 13px;
  color: #c4b5fd;
}

/* Computed Hash */
.computed-hash {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hash-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 10px 14px;
}

.hash-display code {
  flex: 1;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  color: #c4b5fd;
  word-break: break-all;
}

.btn-icon {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.btn-icon:hover {
  color: #fff;
}

/* Verify Button */
.btn-verify {
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-verify:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  transform: translateY(-1px);
}

.btn-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Results */
.results {
  animation: slideIn 0.3s ease-out;
}

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

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.status-badge.verified {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.tampered {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-badge.not-found {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-message {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 20px;
}

/* Details Grid */
.details-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  gap: 12px;
}

.detail-label {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  min-width: 100px;
}

.detail-value {
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  color: #ddd;
  text-align: right;
  word-break: break-all;
}

.detail-value a {
  color: #8b5cf6;
  text-decoration: none;
}

.detail-value a:hover {
  text-decoration: underline;
}

/* Actions */
.actions {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  flex: 1;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ccc;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* QR Modal */
.qr-modal {
  margin-top: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  text-align: center;
}

.qr-modal canvas {
  border-radius: 8px;
  margin-bottom: 12px;
}

.qr-url {
  font-size: 11px;
  color: #666;
  word-break: break-all;
  margin-bottom: 12px;
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 24px;
  color: #555;
  font-size: 13px;
}

.footer strong {
  color: #8b5cf6;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

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

.footer-sub {
  font-size: 11px;
  color: #444;
  margin-top: 4px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: rgba(30, 30, 50, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  z-index: 100;
  animation: toastIn 0.3s ease-out, toastOut 0.3s ease-in 2.2s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: 20px 16px;
  }

  .header h1 {
    font-size: 20px;
  }

  .card {
    padding: 20px;
  }

  .tab {
    padding: 8px 10px;
    font-size: 12px;
  }

  .detail-row {
    flex-direction: column;
    gap: 4px;
  }

  .detail-value {
    text-align: left;
  }

  .actions {
    flex-direction: column;
  }
}
