/* ===== 全域：深色賽博龐克風格 ===== */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #0f172a 0%, #020617 50%, #000 100%);
  color: #e2e8f0;
  font-family: system-ui, "Microsoft JhengHei", sans-serif;
}

/* ===== 頂部標題列 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #1e293b;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-icon {
  width: 2rem;
  height: 2rem;
  background: #22d3ee;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(34,211,238,0.5);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  50% { opacity: 0.8; }
}
.logo-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.logo-accent { color: #22d3ee; }
.logo-line {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #22d3ee, transparent);
  margin-top: 2px;
}
.status-badge {
  font-size: 0.75rem;
  font-family: monospace;
  color: rgba(34,211,238,0.9);
  border: 1px solid rgba(6,182,212,0.3);
  padding: 0.25rem 0.75rem;
  background: rgba(6,182,212,0.08);
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: ping 1.5s ease-in-out infinite;
}
@keyframes ping {
  75%, 100% { transform: scale(1.2); opacity: 0.5; }
}

/* ===== 主內容區：左右兩欄 ===== */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .main { grid-template-columns: 1fr 2fr; }
}

/* ===== 左側控制面板 ===== */
.panel-control { min-width: 0; }
.panel-box {
  background: rgba(15,23,42,0.9);
  border: 1px solid #1e293b;
  padding: 1.25rem;
  position: relative;
}
.panel-box::before,
.panel-box::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: #22d3ee;
  border-style: solid;
  border-width: 0;
}
.panel-box::before {
  top: 0; left: 0;
  border-top-width: 2px; border-left-width: 2px;
}
.panel-box::after {
  bottom: 0; right: 0;
  border-bottom-width: 2px; border-right-width: 2px;
}
.panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: #22d3ee;
  font-family: monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1e293b;
}

/* 切換列：E/I、S/N、T/F、J/P */
.toggles { display: flex; flex-direction: column; gap: 1rem; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(17,24,39,0.6);
  border: 1px solid #374151;
  border-radius: 2px;
  gap: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.toggle-row:hover { border-color: #6b7280; }
.toggle-label {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #4b5563;
  transition: color 0.3s;
}
.toggle-row[data-active="left"] .toggle-label:first-child,
.toggle-row[data-active="right"] .toggle-label:last-child {
  color: #22d3ee;
  text-shadow: 0 0 8px rgba(34,211,238,0.8);
}
.toggle-row.toggle-pink[data-active="left"] .toggle-label:first-child,
.toggle-row.toggle-pink[data-active="right"] .toggle-label:last-child {
  color: #ec4899;
  text-shadow: 0 0 8px rgba(236,72,153,0.8);
}
.toggle-switch {
  position: relative;
  width: 5rem;
  height: 2rem;
  background: #000;
  border: 1px solid #4b5563;
  transform: skewX(-10deg);
  flex-shrink: 0;
}
.toggle-knob {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 2rem;
  background: #06b6d4;
  box-shadow: 0 0 10px rgba(6,182,212,0.6);
  transition: left 0.3s, right 0.3s;
}
.toggle-row[data-active="left"] .toggle-knob { left: 4px; right: auto; }
.toggle-row[data-active="right"] .toggle-knob { left: auto; right: 4px; }
.toggle-pink .toggle-knob {
  background: #db2777;
  box-shadow: 0 0 10px rgba(219,39,119,0.6);
}

/* 類型顯示區 */
.type-display {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #020617;
  border: 1px solid #1e293b;
  text-align: center;
  position: relative;
}
.type-display::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
  opacity: 0.5;
}
.type-label {
  font-family: monospace;
  font-size: 0.75rem;
  color: #6b7280;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
}
.type-value {
  margin: 0;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  background: linear-gradient(90deg, #22d3ee, #fff, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(34,211,238,0.5);
}

/* 匯出按鈕區 */
.export-section { margin-top: 2rem; }
.export-title {
  font-size: 0.75rem;
  font-family: monospace;
  color: #6b7280;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
  padding-left: 0.5rem;
  border-left: 2px solid #ec4899;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
  margin-top: 0.75rem;
  border: 1px solid #374151;
  background: #0f172a;
  color: #22d3ee;
}
.btn:hover {
  border-color: #22d3ee;
  color: #67e8f9;
  box-shadow: 0 0 15px rgba(34,211,238,0.2);
}
.btn-png {
  border-color: rgba(6,182,212,0.4);
  background: rgba(6,182,212,0.1);
  color: #67e8f9;
}
.btn-png:hover {
  background: rgba(6,182,212,0.2);
  color: #fff;
  box-shadow: 0 0 20px rgba(34,211,238,0.4);
}

/* ===== 右側報告區 ===== */
.panel-report { min-width: 0; }
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}
.report-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  font-family: monospace;
  color: #e2e8f0;
}
.report-badge {
  font-size: 0.75rem;
  font-family: monospace;
  color: #f472b6;
  border: 1px solid rgba(236,72,153,0.3);
  background: rgba(236,72,153,0.08);
  padding: 0.25rem 0.5rem;
}
.report-content {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 2px;
  padding: 2rem;
  min-height: 800px;
  position: relative;
  overflow: hidden;
}
.report-content::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ec4899, #a855f7, #22d3ee);
}
.report-content .report-title-text {
  color: #22d3ee;
  text-shadow: 0 0 10px rgba(34,211,238,0.3);
}
.report-content h1 {
  font-size: 1.75rem;
  text-align: center;
  margin: 0 0 2rem 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1e293b;
}
.report-content .intro-box {
  background: rgba(2,6,23,0.9);
  padding: 1.5rem;
  border-left: 4px solid #ec4899;
  color: #9ca3af;
  font-style: italic;
  margin-bottom: 2rem;
}
.report-content section {
  margin-bottom: 2rem;
}
.report-content section h3 {
  font-size: 1rem;
  font-family: monospace;
  color: #22d3ee;
  border-bottom: 1px solid rgba(6,182,212,0.3);
  padding-bottom: 0.5rem;
  margin: 0 0 1rem 0;
  display: inline-block;
}
.report-content section h3.pink {
  color: #f472b6;
  border-bottom-color: rgba(236,72,153,0.3);
}
.report-content section p {
  color: #d1d5db;
  line-height: 1.7;
  white-space: pre-line;
  margin: 0;
}
.report-content .section5-box {
  background: rgba(2,6,23,0.5);
  padding: 2rem;
  border: 1px solid #374151;
  margin-top: 2rem;
}
.report-content .section5-box h3 {
  font-size: 1.25rem;
  color: #fff;
  border: none;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}
.report-content .section5-box h3::before {
  content: "";
  width: 4px;
  height: 2rem;
  background: linear-gradient(180deg, #22d3ee, #ec4899);
  margin-right: 1rem;
}
.report-content .section5-box h4 {
  font-size: 1.1rem;
  color: #67e8f9;
  font-family: monospace;
  margin: 0 0 0.75rem 0;
  padding-left: 1rem;
  border-left: 1px solid #1e293b;
}
.report-content .section5-box h4.pink { color: #f9a8d4; }
.report-content .section5-box .sub-block {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 1px solid #1e293b;
}
.report-content .conclusion-wrap {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
}
.report-content .conclusion-wrap p {
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}
.report-content .footer-line {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0.7;
}
.report-content .footer-line span {
  width: 6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, #22d3ee);
}
.report-content .footer-line span:last-child {
  background: linear-gradient(90deg, #22d3ee, transparent);
}
.report-content .footer-mono {
  font-size: 0.75rem;
  font-family: monospace;
  color: #22d3ee;
  letter-spacing: 0.2em;
}
