/*
Theme Name: risk
Theme URI: https://www.chausdt.online/
Description: 风险查 - USDT及波场/以太坊地址风险查询与完整交易记录明细系统，支持 PC 端与手机端双端自适应与举报/申诉交互。
Version: 1.0
Author: Antigravity
Text Domain: risk
*/

:root {
  --teal: #14B8A6;
  --teal-dark: #0D9488;
  --teal-bg: #D9F7EF;
  --blue: #3B82F6;
  --blue-bg: #DBEAFE;
  --red: #EF4444;
  --red-dark: #DC2626;
  --red-bg: #FEE2E2;
  --orange: #F59E0B;
  --orange-bg: #FEF3C7;
  --purple: #8B5CF6;
  --purple-bg: #EDE9FE;
  --green: #059669;
  --green-bg: #D1FAE5;
  --ink: #1F2937;
  --muted: #6B7280;
  --line: #E5E7EB;
  --bg: #FFFFFF;
  --bg-soft: #F6F7F9;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, Menlo, monospace;
}

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* Shared site header */
header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1160px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo, .header-right, .back-link, .lang-trigger, .lang-option {
  display: flex;
  align-items: center;
}
.logo { gap: 9px; font-weight: 800; }
.logo .mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
}
.logo .name { font-size: 20px; color: var(--ink); }
.header-right { gap: 16px; margin-left: auto; }
.back-link {
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.back-link:hover { color: var(--teal-dark); }
.lang-select { position: relative; }
.lang-trigger {
  min-height: 36px;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.lang-trigger:hover { border-color: var(--teal); }
.lang-trigger .chev { color: var(--muted); font-size: 10px; }
.lang-trigger .flag-emoji, .lang-option .flag-emoji {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex: 0 0 auto;
}
.lang-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1200;
  width: 158px;
  max-height: 300px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(31, 41, 55, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.lang-select.open .lang-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.lang-option .lname { flex: 1; }
.lang-option .check { color: var(--teal-dark); opacity: 0; }
.lang-option.selected .check { opacity: 1; }
.lang-option:hover, .lang-option.selected { background: var(--teal-bg); color: var(--teal-dark); }

/* Global Toast */
.risk-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #EF4444;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9999;
}
.risk-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.risk-toast.success {
  background: #10B981;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

/* Modals */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 16px;
}
.modal-mask.open {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.25);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.modal-mask.open .modal-card {
  transform: scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.modal-close:hover {
  background: #E5E7EB;
}

/* Form controls */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.form-input[readonly] {
  background: #F3F4F6;
  color: #6B7280;
  cursor: not-allowed;
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
}
.captcha-row {
  display: flex;
  gap: 10px;
}
.captcha-box {
  width: 110px;
  height: 38px;
  background: #E2E8F0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 4px;
  color: #1E293B;
  user-select: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 9px;
  transition: all 0.15s ease;
}
.btn-secondary {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-secondary:hover {
  background: #E5E7EB;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--teal-dark);
}
.btn-red {
  background: var(--red);
  color: #fff;
}
.btn-red:hover {
  background: var(--red-dark);
}

/* Lightbox Modal */
.lightbox-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 24px;
}
.lightbox-mask.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  object-fit: contain;
}
@media (max-width: 768px) {
  .lightbox-mask { padding: 12px; }
  .lightbox-img { max-width: 96vw; max-height: 80vh; }
}

/* Evidence Thumbnails */
.evidence-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.evidence-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.evidence-thumb:hover {
  transform: scale(1.04);
  border-color: var(--teal);
}
@media (max-width: 768px) {
  .evidence-thumb { width: 56px; height: 56px; }
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
  .header-inner { min-height: 58px; padding: 0 16px; gap: 10px; }
  .logo .logo-text .name { font-size: 19px; }
  .header-right { gap: 8px; }
  .back-link { font-size: 12px; }
  .lang-trigger { padding: 5px 7px; }
  #risk-lang-name, .lang-trigger .chev { display: none; }
  main { padding: 20px 14px 50px; }
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--line);
  }
}
