/* Conflict Mediator — Courtroom aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Noto+Serif+SC:wght@700;900&family=JetBrains+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #1a1714;
  --bg-paper: #f4ecd8;
  --bg-paper-dark: #e8dcc0;
  --ink: #1a1a1a;
  --ink-light: #4a4a4a;
  --gold: #c4a35a;
  --gold-dark: #a08538;
  --red: #8b2020;
  --red-light: #c44;
  --green: #2d5a2d;
  --orange: #c47317;
  --border: #c4a35a;
  --shadow: rgba(0,0,0,0.15);
}

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

body {
  background: var(--bg);
  font-family: 'Inter', 'Noto Serif SC', sans-serif;
  color: var(--ink);
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* Header */
.header {
  text-align: center;
  padding: 30px 0 20px;
}

.header h1 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.header h1 .zh {
  font-family: 'Noto Serif SC', serif;
  display: block;
  font-size: 1.6rem;
  color: var(--bg-paper);
  margin-top: 4px;
}

.header .subtitle {
  color: var(--bg-paper-dark);
  font-size: 0.9rem;
  margin-top: 8px;
  opacity: 0.7;
}

/* Language switch */
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 16px 0 24px;
  border: 1px solid var(--gold-dark);
  border-radius: 2px;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.lang-switch a {
  flex: 1;
  padding: 6px 20px;
  text-decoration: none;
  color: var(--bg-paper-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s;
}

.lang-switch a:hover {
  background: rgba(196,163,90,0.15);
}

.lang-switch a.active {
  background: var(--gold);
  color: var(--bg);
}

/* Input section */
.input-section {
  background: var(--bg-paper);
  border: 2px solid var(--gold);
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 8px 24px var(--shadow);
  position: relative;
}

.input-section::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid var(--gold-dark);
  border-radius: 2px;
  pointer-events: none;
}

.input-label {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  display: block;
}

textarea#argument-input {
  width: 100%;
  min-height: 160px;
  padding: 14px;
  border: 1px solid var(--ink-light);
  border-radius: 2px;
  font-family: 'JetBrains Mono', 'Noto Serif SC', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}

textarea#argument-input:focus {
  outline: 2px solid var(--gold);
  outline-offset: -1px;
}

.analyze-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--ink);
  color: var(--bg-paper);
  border: none;
  border-radius: 2px;
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.analyze-btn:hover {
  background: var(--red);
}

.analyze-btn:active {
  transform: scale(0.98);
}

.analyze-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Verdict result */
.verdict-result {
  display: none;
  background: var(--bg-paper);
  border: 2px solid var(--gold);
  border-radius: 4px;
  padding: 28px;
  margin-top: 24px;
  box-shadow: 0 8px 24px var(--shadow);
  position: relative;
  animation: slideIn 0.4s ease;
}

.verdict-result.show {
  display: block;
}

.verdict-result::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid var(--gold-dark);
  border-radius: 2px;
  pointer-events: none;
}

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

/* Stamp */
.stamp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px dashed var(--gold-dark);
}

.stamp {
  display: inline-block;
  padding: 8px 20px;
  border: 3px solid var(--red);
  color: var(--red);
  font-family: 'Playfair Display', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-3deg);
  opacity: 0.9;
}

.verdict-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-light);
  text-transform: uppercase;
}

/* Verdict headline */
.verdict-headline {
  text-align: center;
  margin-bottom: 24px;
}

.verdict-emoji {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.verdict-title {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

/* Split bar */
.split-bar-container {
  margin: 20px 0;
}

.split-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
}

.side-a-label { color: var(--red); }
.side-b-label { color: var(--orange); }

.split-bar {
  display: flex;
  height: 24px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--ink-light);
}

.bar-a {
  background: var(--red);
  transition: width 0.6s ease;
}

.bar-b {
  background: var(--orange);
  transition: width 0.6s ease;
}

/* Blurb */
.verdict-blurb {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--bg-paper-dark);
  border-left: 3px solid var(--gold);
  border-radius: 0 2px 2px 0;
}

/* Commentary */
.commentary-section {
  margin: 20px 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--gold-dark);
  border-radius: 2px;
}

.commentary-section h3 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.commentary-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  font-style: italic;
}

/* Evidence */
.evidence-section {
  margin: 20px 0;
}

.evidence-section h3 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.evidence-item {
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--bg-paper-dark);
  border-left: 3px solid var(--red);
  border-radius: 0 2px 2px 0;
}

.evidence-item.side-b {
  border-left-color: var(--orange);
}

.evidence-quote {
  font-family: 'JetBrains Mono', 'Noto Serif SC', monospace;
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.5;
}

.evidence-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.75rem;
}

.evidence-tag {
  padding: 2px 8px;
  background: var(--red);
  color: #fff;
  border-radius: 2px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.evidence-tag.side-b {
  background: var(--orange);
}

.evidence-severity {
  color: var(--ink-light);
  font-family: 'JetBrains Mono', monospace;
}

/* Upgrade section */
.upgrade-section {
  margin: 24px 0;
  padding: 20px;
  background: var(--ink);
  color: var(--bg-paper);
  border-radius: 4px;
  position: relative;
}

.upgrade-section h3 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.upgrade-section p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--bg-paper-dark);
  margin-bottom: 16px;
}

.payment-box {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.payment-qr {
  flex-shrink: 0;
}

.payment-info {
  flex: 1;
  min-width: 200px;
}

.pay-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.payment-address {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--bg-paper);
  word-break: break-all;
  margin-bottom: 8px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}

.payment-copy-btn {
  padding: 6px 16px;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.payment-copy-btn:hover {
  opacity: 0.85;
}

/* Share section */
.share-section {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 2px dashed var(--gold-dark);
}

.share-section h3 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  background: var(--bg-paper-dark);
  color: var(--ink);
  border: 1px solid var(--gold-dark);
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s;
}

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

/* Judged at footer */
.judged-at {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--gold-dark);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Auto verdict hint */
.auto-verdict-hint {
  text-align: center;
  padding: 8px;
  margin-bottom: 12px;
}

.hint-label {
  font-size: 0.8rem;
  color: var(--ink-light);
  font-style: italic;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: var(--bg-paper-dark);
  font-size: 0.8rem;
  opacity: 0.5;
}

/* Loading */
.loading {
  display: none;
  text-align: center;
  padding: 40px;
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
}

.loading.show {
  display: block;
}

.loading::after {
  content: '...';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Mobile */
@media (max-width: 600px) {
  .container { padding: 12px; }
  .header h1 { font-size: 1.8rem; }
  .header h1 .zh { font-size: 1.3rem; }
  .stamp { font-size: 1rem; padding: 6px 14px; }
  .verdict-title { font-size: 1.1rem; }
  .share-btn { min-width: 100px; font-size: 0.75rem; }
}
