:root {
  --pulse-bg: #070b16;
  --pulse-card: rgba(12, 18, 40, 0.92);
  --pulse-border: rgba(0, 212, 255, 0.18);
  --pulse-primary: #00d4ff;
  --pulse-secondary: #7b2fff;
  --pulse-accent: #ff6b9d;
  --pulse-text: #e8eaf6;
  --pulse-muted: rgba(200, 210, 240, 0.7);
}

.pulse-wrapper {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 1.8rem 1.6rem 2rem;
    background: var(--pulse-card);
    border: 1px solid var(--pulse-border);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.12);
}
/* 模式选择样式 */
.pulse-mode-select {
    text-align: center;
    padding: 20px 0;
}
.mode-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--pulse-text);
    margin-bottom: 40px;
}
.mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}
.mode-card {
    background: rgba(10, 18, 36, 0.6);
    border: 1px solid var(--pulse-border);
    border-radius: 16px;
    padding: 32px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.mode-card:hover {
    border-color: var(--pulse-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.12);
}
.mode-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.mode-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--pulse-text);
    margin-bottom: 12px;
}
.mode-card p {
    font-size: 14px;
    color: var(--pulse-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}
/* 问卷样式 */
.pulse-quick-survey {
    padding: 20px 0;
}
.survey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.survey-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--pulse-text);
}

.question-item {
    margin-bottom: 32px;
}
.question-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--pulse-text);
    margin-bottom: 16px;
}
.question-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.option-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 14px 48px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid var(--pulse-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.option-item:hover {
    border-color: #7b2fff;
    background: rgba(123, 47, 255, 0.08);
}
.option-item.selected {
    border-color: #7b2fff;
    background: rgba(123, 47, 255, 0.1);
}
/* 隐藏原生选择框 */
.option-item input {
    display: none;
}
/* 自定义超清晰选中标记 */
.option-item::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
}
/* 选中状态的紫色标记 */
.option-item.selected::before {
    border-color: #7b2fff;
    background: #7b2fff;
    box-shadow: 0 0 8px rgba(123, 47, 255, 0.8);
}
/* 多选的选中标记加对勾 */
.option-item.selected:has(input[type="checkbox"])::before {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.option-item label {
    flex: 1;
    cursor: pointer;
    color: var(--pulse-text);
}
.survey-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}
.progress-text {
    font-size: 14px;
    color: var(--pulse-muted);
}
.survey-footer .pulse-btn {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
}
.survey-success {
    text-align: center;
    padding: 40px 20px;
}
.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}
.success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--pulse-text);
    margin-bottom: 12px;
}
.success-desc {
    font-size: 16px;
    color: var(--pulse-muted);
    margin-bottom: 32px;
}
.survey-success .pulse-btn {
    min-width: 120px;
}

.pulse-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.pulse-meta {
  color: var(--pulse-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.pulse-streak {
  color: var(--pulse-accent);
  font-weight: 700;
}

.pulse-progress {
  margin-bottom: 1.2rem;
}

.pulse-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.15);
  overflow: hidden;
}

.pulse-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pulse-primary), var(--pulse-secondary));
  transition: width 0.4s ease;
}

.pulse-game-area {
  position: relative;
}

.pulse-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.pulse-hud-item {
  background: rgba(10, 18, 36, 0.65);
  border: 1px solid rgba(120, 160, 255, 0.12);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  min-width: 0;
}

.pulse-hud-label {
  font-size: 0.72rem;
  color: rgba(200, 210, 240, 0.7);
  letter-spacing: 0.12em;
}

.pulse-hud-value {
  font-family: 'Audiowide', sans-serif;
  font-size: 1.05rem;
  color: #eef2ff;
  margin-top: 0.2rem;
}

.pulse-hud-center {
  text-align: center;
}

.pulse-energy-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.6rem 0 1rem;
}

.pulse-energy-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b9d, #ffb36b, #6ee7ff);
  transition: width 0.35s ease;
  border-radius: 999px;
}

.pulse-combo {
  text-align: center;
  font-family: 'Audiowide', sans-serif;
  font-size: 1rem;
  color: #ffb36b;
  margin-bottom: 0.5rem;
  min-height: 1.3rem;
}

.pulse-combo-fire {
  display: inline-block;
  animation: combo-fire 0.5s ease-in-out infinite alternate;
}

@keyframes combo-fire {
  from { transform: scale(1); }
  to { transform: scale(1.18); }
}

.pulse-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.pulse-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  animation: particle-fly 0.85s ease-out forwards;
}

@keyframes particle-fly {
  to {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

.pulse-screen-shake {
  animation: shake 0.35s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.pulse-achievement-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 7, 18, 0.82);
  z-index: 10000;
  animation: fadeIn 0.25s ease;
}

.pulse-achievement-card {
  background: linear-gradient(135deg, rgba(110,231,255,0.12), rgba(124,92,255,0.12));
  border: 1px solid rgba(110,231,255,0.4);
  border-radius: 20px;
  padding: 2.4rem 1.8rem;
  text-align: center;
  max-width: 340px;
  width: 90%;
}

.pulse-achievement-icon {
  font-size: 3.2rem;
  margin-bottom: 0.8rem;
}

.pulse-achievement-name {
  font-family: 'Audiowide', sans-serif;
  font-size: 1.2rem;
  color: var(--accent-primary);
  margin-bottom: 0.4rem;
}

.pulse-levels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin: 0.6rem 0 1rem;
}

.pulse-level-node {
  border-radius: 14px;
  border: 1px solid rgba(120, 160, 255, 0.18);
  background: rgba(10, 18, 36, 0.6);
  padding: 0.7rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: 0.25s ease;
}

.pulse-level-node.active {
  border-color: rgba(110, 231, 255, 0.55);
  background: rgba(110, 231, 255, 0.08);
  box-shadow: 0 0 18px rgba(110, 231, 255, 0.12);
}

.pulse-level-node.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.pulse-level-node .node-num {
  font-family: 'Audiowide', sans-serif;
  font-size: 1.1rem;
  color: #eef2ff;
}

.pulse-level-node .node-name {
  font-size: 0.75rem;
  color: rgba(200, 210, 240, 0.75);
  margin-top: 0.2rem;
}

.pulse-btn {
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
}

.pulse-btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}
.pulse-btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
}
.pulse-btn-secondary:hover {
  background: rgba(124, 92, 255, 0.1);
  border-color: rgba(124, 92, 255, 0.4);
}

/* 能力分析报告样式 */
.report-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}
.report-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}
.report-content {
  position: relative;
  max-width: 750px;
  max-height: 85vh;
  margin: 5vh auto;
  background: #0a1224;
  border: 1px solid rgba(120, 160, 255, 0.2);
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(110, 231, 255, 0.2);
  animation: modalFadeIn 0.3s ease-out;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(120, 160, 255, 0.1);
  background: rgba(110, 231, 255, 0.05);
}
.report-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #6ee7ff;
}
.report-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: 0.2s ease;
}
.report-close-btn:hover {
  color: #ff6b9d;
  background: rgba(255, 107, 157, 0.1);
}
.report-body {
  padding: 1.5rem;
}
.report-section {
  margin-bottom: 2rem;
}
.report-section h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}
.report-card {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(120, 160, 255, 0.18);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}
.report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.report-card-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}
.report-score {
  font-weight: 600;
  font-size: 1.1rem;
}
.report-score.high {
  color: #4ade80;
}
.report-score.mid {
  color: #facc15;
}
.report-score.low {
  color: #f87171;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.progress-fill {
  height: 100%;
  transition: width 1s ease-out;
}
.progress-fill.high {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}
.progress-fill.mid {
  background: linear-gradient(90deg, #facc15, #eab308);
}
.progress-fill.low {
  background: linear-gradient(90deg, #f87171, #ef4444);
}
.report-card-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}
.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.report-tag {
  background: rgba(110, 231, 255, 0.1);
  border: 1px solid rgba(110, 231, 255, 0.3);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #6ee7ff;
}
.report-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.report-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.5;
}
.report-list li::before {
  content: "✅";
  position: absolute;
  left: 0;
  top: 0;
}
.persona-loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem 0;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
/* 响应式适配 */
@media (max-width: 768px) {
  .report-content {
    margin: 2vh 1rem;
    max-height: 90vh;
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
  .report-header {
    padding: 1rem;
  }
  .report-body {
    padding: 1rem;
  }
}

.pulse-option {
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--pulse-border);
  background: rgba(10, 14, 26, 0.7);
  color: var(--pulse-text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.pulse-option:hover {
  border-color: var(--pulse-primary);
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-1px);
}

.pulse-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.pulse-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--pulse-border);
  background: rgba(0, 212, 255, 0.06);
}

.pulse-hidden {
  display: none;
}

.pulse-question {
  margin: 0.6rem 0 1rem;
}

.pulse-question-type {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--pulse-primary);
  border: 1px solid var(--pulse-border);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.pulse-question-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--pulse-text);
}

@media (max-width: 640px) {
  .pulse-options {
    grid-template-columns: 1fr;
  }
  .pulse-wrapper {
    padding: 1.2rem 1rem 1.4rem;
    border-radius: 16px;
  }
}
