#xeno-π-core {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: 'Noto Sans SC', sans-serif;
  animation: fadeIn 0.5s ease 0.1s forwards;
  opacity: 0;
}

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

.xeno-canvas-wrapper {
  width: 100%;
  max-width: 500px;
  position: relative;
}

.xeno-canvas-container {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

#xeno-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.xeno-ui-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.xeno-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.xeno-cut-counter {
  pointer-events: all;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
  font-family: 'DM Mono', monospace;
}

.xeno-counter-label {
  opacity: 0.7;
}

.xeno-counter-value {
  font-weight: 500;
  color: #333;
}

.xeno-counter-value span:first-child {
  color: #d64933;
}

.xeno-button-group {
  display: flex;
  gap: 6px;
  pointer-events: all;
}

.xeno-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  pointer-events: all;
}

.xeno-icon-btn:hover {
  border-color: #d64933;
  color: #d64933;
  transform: translateY(-1px);
}

.xeno-icon-btn:active {
  transform: translateY(0);
}

.xeno-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.xeno-hint.hidden {
  opacity: 0;
}

.xeno-hint-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.4;
}

.xeno-hint-text {
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

.xeno-hint-sub {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.xeno-mode-selector {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 6px;
  width: 100%;
  max-width: 300px;
}

.xeno-mode-btn {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: 'Noto Sans SC', sans-serif;
}

.xeno-mode-name {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  transition: color 0.25s ease;
}

.xeno-mode-desc {
  font-size: 11px;
  color: #999;
  transition: color 0.25s ease;
}

.xeno-mode-btn.active {
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.xeno-mode-btn.active .xeno-mode-name {
  color: #333;
}

.xeno-mode-btn.active .xeno-mode-desc {
  color: #666;
}

.xeno-mode-btn:hover:not(.active) .xeno-mode-name {
  color: #333;
}

.xeno-instruction {
  font-size: 12px;
  color: #666;
  text-align: center;
  line-height: 1.5;
  max-width: 400px;
  margin-top: -4px;
}

.xeno-results-panel {
  width: 100%;
  max-width: 500px;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xeno-results-placeholder {
  text-align: center;
  color: #999;
  font-size: 13px;
  line-height: 1.6;
  padding: 20px 0;
}

.xeno-results-content {
  width: 100%;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.xeno-score-display {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.xeno-score-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xeno-score-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.xeno-score-grade {
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 8px;
  min-width: 60px;
  text-align: center;
}

.xeno-score-grade.s-plus { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.xeno-score-grade.s { background: #fef3c7; color: #92400e; }
.xeno-score-grade.a { background: #dcfce7; color: #166534; }
.xeno-score-grade.b { background: #fee2e2; color: #991b1b; }
.xeno-score-grade.c { background: #f3f4f6; color: #6b7280; }

.xeno-score-value {
  font-family: 'DM Mono', monospace;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.xeno-score-value.perfect { color: #c9a84c; }
.xeno-score-value.great { color: #16a34a; }
.xeno-score-value.good { color: #d64933; }
.xeno-score-value.ok { color: #666; }

.xeno-distribution {
  margin-bottom: 16px;
}

.xeno-distribution-bars {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 8px;
}

.xeno-dist-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.xeno-dist-bar:nth-child(1) { background: rgba(59, 130, 246, 0.6); }
.xeno-dist-bar:nth-child(2) { background: rgba(245, 158, 11, 0.6); }
.xeno-dist-bar:nth-child(3) { background: rgba(16, 185, 129, 0.6); }

.xeno-distribution-labels {
  display: flex;
  justify-content: space-between;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: #666;
}

.xeno-dist-label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.xeno-dist-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.xeno-dist-dot.a { background: rgba(59, 130, 246, 0.6); }
.xeno-dist-dot.b { background: rgba(245, 158, 11, 0.6); }
.xeno-dist-dot.c { background: rgba(16, 185, 129, 0.6); }

.xeno-rank-info {
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: #999;
}

.xeno-rank-label {
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 10px;
}

.xeno-rank-value {
  font-size: 20px;
  font-weight: 500;
  color: #333;
  transition: opacity 0.3s;
}

.xeno-rank-value.loading {
  opacity: 0.3;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  .xeno-canvas-container {
    background: rgba(255, 255, 255, 0.02);
  }
  
  .xeno-cut-counter {
    background: rgba(30, 30, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: #a0a0b8;
  }
  
  .xeno-counter-value {
    color: #e4e4ef;
  }
  
  .xeno-icon-btn {
    background: rgba(30, 30, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: #a0a0b8;
  }
  
  .xeno-icon-btn:hover {
    border-color: #ef6a56;
    color: #ef6a56;
  }
  
  .xeno-mode-selector {
    background: rgba(255, 255, 255, 0.06);
  }
  
  .xeno-mode-name {
    color: #a0a0b8;
  }
  
  .xeno-mode-desc {
    color: #7a7a8e;
  }
  
  .xeno-mode-btn.active {
    background: #1e1e2a;
  }
  
  .xeno-mode-btn.active .xeno-mode-name {
    color: #e4e4ef;
  }
  
  .xeno-mode-btn.active .xeno-mode-desc {
    color: #a0a0b8;
  }
  
  .xeno-mode-btn:hover:not(.active) .xeno-mode-name {
    color: #e4e4ef;
  }
  
  .xeno-instruction {
    color: #a0a0b8;
  }
  
  .xeno-results-panel {
    background: #1e1e2a;
    border-color: rgba(255, 255, 255, 0.08);
  }
  
  .xeno-results-placeholder {
    color: #7a7a8e;
  }
  
  .xeno-score-label {
    color: #7a7a8e;
  }
  
  .xeno-score-value.ok {
    color: #a0a0b8;
  }
  
  .xeno-score-value.great {
    color: #34d399;
  }
  
  .xeno-distribution-labels {
    color: #7a7a8e;
  }
  
  .xeno-rank-info {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #7a7a8e;
  }
  
  .xeno-rank-value {
    color: #e4e4ef;
  }
}

@media (max-width: 480px) {
  .xeno-canvas-wrapper,
  .xeno-results-panel {
    max-width: 100%;
  }
  
  .xeno-score-grade {
    font-size: 22px;
  }
  
  .xeno-score-value {
    font-size: 30px;
  }
}