/* ============================================
   DEVTI 程序员人格测试 - 样式文件
   主题色：终端绿 + 暗夜黑
   ============================================ */

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

:root {
  --bg-primary: #0a0e12;
  --bg-secondary: #0f1419;
  --bg-card: #151c24;
  --bg-card-hover: #1c2632;
  --text-primary: #d4e0ec;
  --text-secondary: #7e8f9f;
  --text-dim: #4a5a6a;
  --accent: #00c896;
  --accent-glow: rgba(0, 200, 150, 0.3);
  --accent-light: #33e0b0;
  --accent-secondary: #00ff88;
  --danger: #ff4757;
  --success: #2ed573;
  --warning: #ffa502;
  --gradient-1: linear-gradient(135deg, #00c896 0%, #00ff88 100%);
  --gradient-2: linear-gradient(135deg, #0a0e12 0%, #151c24 100%);
  --border-color: rgba(0, 200, 150, 0.15);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 20px; --radius-xl: 24px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 200, 150, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body { font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', monospace, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; line-height: 1.6; }

.page { display: none; min-height: 100vh; animation: fadeIn 0.5s ease; }
.page.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

#home { justify-content: center; align-items: center; position: relative; overflow: hidden; background: radial-gradient(ellipse at center, #0f1e1a 0%, #0a0e12 70%); }
.home-container { text-align: center; z-index: 2; padding: 2rem; max-width: 620px; }
.badge { display: inline-block; padding: 6px 16px; background: rgba(0, 200, 150, 0.08); border: 1px solid var(--border-color); border-radius: 20px; font-size: 0.8rem; color: var(--accent-light); margin-bottom: 2rem; letter-spacing: 2px; }
.glitch { font-size: clamp(4rem, 13vw, 8rem); font-weight: 900; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 0.08em; line-height: 1; margin-bottom: 0.5rem; position: relative; animation: float 6s ease-in-out infinite; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; right: 0; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; opacity: 0; }
.glitch:hover::before { animation: glitch1 0.3s ease infinite; opacity: 0.8; }
.glitch:hover::after { animation: glitch2 0.3s ease infinite; opacity: 0.8; }
@keyframes glitch1 { 0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px, 2px); } 20% { clip-path: inset(92% 0 1% 0); transform: translate(2px, -1px); } 40% { clip-path: inset(43% 0 1% 0); transform: translate(-1px, 3px); } 60% { clip-path: inset(25% 0 58% 0); transform: translate(3px, 1px); } 80% { clip-path: inset(54% 0 7% 0); transform: translate(-3px, -2px); } 100% { clip-path: inset(58% 0 43% 0); transform: translate(2px, 2px); } }
@keyframes glitch2 { 0% { clip-path: inset(65% 0 13% 0); transform: translate(2px, -2px); } 20% { clip-path: inset(10% 0 85% 0); transform: translate(-2px, 1px); } 40% { clip-path: inset(72% 0 15% 0); transform: translate(1px, -3px); } 60% { clip-path: inset(30% 0 40% 0); transform: translate(-3px, -1px); } 80% { clip-path: inset(85% 0 5% 0); transform: translate(3px, 2px); } 100% { clip-path: inset(12% 0 62% 0); transform: translate(-2px, -2px); } }

.subtitle { font-size: clamp(1rem, 2.5vw, 1.5rem); font-weight: 300; color: var(--text-secondary); letter-spacing: 0.6em; margin-bottom: 2rem; }
.tagline { font-size: clamp(1rem, 2.5vw, 1.4rem); color: var(--text-secondary); margin-bottom: 1rem; }
.highlight { color: var(--accent); font-weight: 700; text-shadow: 0 0 20px var(--accent-glow); }
.desc { font-size: 0.95rem; color: var(--text-dim); line-height: 1.8; margin-bottom: 3rem; }
.btn-start { display: inline-flex; align-items: center; gap: 10px; padding: 16px 48px; background: var(--gradient-1); border: none; border-radius: 50px; color: #0a0e12; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: var(--transition); box-shadow: 0 4px 20px var(--accent-glow); position: relative; overflow: hidden; }
.btn-start::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s; }
.btn-start:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0, 200, 150, 0.5); }
.btn-start:hover::before { left: 100%; }
.btn-start:active { transform: translateY(-1px); }
.home-footer { margin-top: 4rem; color: var(--text-dim); font-size: 0.8rem; }
.home-footer p { margin-bottom: 0.5rem; }
.disclaimer-mini { color: var(--warning); opacity: 0.7; }
.opc-note { color: var(--accent-light); opacity: 0.6; font-size: 0.75rem; margin-top: 0.3rem; }

.lazy-divider { display: flex; align-items: center; gap: 12px; margin: 1.5rem auto; width: 100%; max-width: 300px; }
.lazy-divider-line { flex: 1; height: 1px; background: var(--border-color); }
.lazy-divider-text { color: var(--text-dim); font-size: 0.8rem; white-space: nowrap; }
.btn-lazy { display: inline-flex; align-items: center; gap: 8px; padding: 12px 32px; background: transparent; border: 1px solid var(--border-color); border-radius: 50px; color: var(--text-secondary); font-size: 0.9rem; cursor: pointer; transition: var(--transition); }
.btn-lazy:hover { border-color: var(--accent); color: var(--accent-light); background: rgba(0, 200, 150, 0.05); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0, 200, 150, 0.15); }
.quiz-lazy-exit { text-align: center; margin-top: 1.5rem; padding-bottom: 1rem; }
.btn-lazy-exit { background: transparent; border: none; color: var(--text-dim); font-size: 0.82rem; cursor: pointer; padding: 8px 16px; transition: var(--transition); opacity: 0.7; }
.btn-lazy-exit:hover { color: var(--accent-light); opacity: 1; }

#picker { flex-direction: column; align-items: center; padding: 2rem 1rem; background: var(--bg-primary); }
.picker-container { width: 100%; max-width: 800px; margin: 0 auto; }
.picker-header { text-align: center; padding: 2rem 0 1.5rem; }
.picker-title { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.8rem; }
.picker-subtitle { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.picker-hint { font-size: 0.85rem; color: var(--text-dim); font-style: italic; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 1rem 0 2rem; }
.picker-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.5rem 1rem; text-align: center; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; animation: slideUp 0.4s ease both; }
.picker-card::before { content: ''; position: absolute; inset: 0; background: var(--gradient-1); opacity: 0; transition: opacity 0.3s; }
.picker-card:hover { border-color: var(--accent); transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0, 200, 150, 0.2); }
.picker-card:hover::before { opacity: 0.06; }
.picker-card-code { font-size: 1.6rem; font-weight: 900; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 0.08em; position: relative; z-index: 1; margin-bottom: 0.3rem; }
.picker-card-name { font-size: 1rem; font-weight: 600; color: var(--text-primary); position: relative; z-index: 1; margin-bottom: 0.6rem; }
.picker-card-hint { font-size: 0.72rem; color: var(--text-dim); line-height: 1.4; position: relative; z-index: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.picker-footer { text-align: center; padding: 1rem 0 3rem; }

.bg-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.particle { position: absolute; width: 3px; height: 3px; background: var(--accent); border-radius: 50%; opacity: 0; animation: particleFloat 8s linear infinite; }
@keyframes particleFloat { 0% { opacity: 0; transform: translateY(100vh) scale(0); } 10% { opacity: 0.6; } 90% { opacity: 0.6; } 100% { opacity: 0; transform: translateY(-100vh) scale(1); } }

#quiz { flex-direction: column; align-items: center; padding: 2rem 1rem; background: var(--bg-primary); }
.quiz-container { width: 100%; max-width: 700px; margin: 0 auto; }
.quiz-header { text-align: center; margin-bottom: 3rem; padding-top: 2rem; }
.progress-info { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.progress-info #currentQ { color: var(--accent); }
.progress-info #totalQ { color: var(--text-dim); }
.progress-bar { width: 100%; height: 6px; background: var(--bg-card); border-radius: 3px; overflow: hidden; margin-bottom: 1rem; }
.progress-fill { width: 0%; height: 100%; background: var(--gradient-1); border-radius: 3px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.progress-hint { font-size: 0.85rem; color: var(--text-dim); font-style: italic; font-family: 'SF Mono', 'Fira Code', monospace; }
.question-area { margin-bottom: 2rem; animation: slideUp 0.4s ease; }
.question-text { font-size: 1.2rem; font-weight: 600; margin-bottom: 2rem; line-height: 1.8; text-align: center; min-height: 3.2em; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.question-tag { display: inline-block; padding: 2px 10px; background: rgba(0, 200, 150, 0.12); border: 1px solid rgba(0, 200, 150, 0.3); border-radius: 12px; font-size: 0.7rem; color: var(--accent-light); letter-spacing: 1px; margin-bottom: 0.5rem; vertical-align: middle; }
.question-tag.dim { background: rgba(255, 165, 2, 0.1); border-color: rgba(255, 165, 2, 0.3); color: var(--warning); }
.options { display: flex; flex-direction: column; gap: 12px; }
.option { display: flex; align-items: center; padding: 16px 20px; background: var(--bg-card); border: 2px solid transparent; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); font-size: 1rem; text-align: left; color: var(--text-primary); position: relative; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.option::before { content: ''; position: absolute; inset: 0; background: var(--gradient-1); opacity: 0; transition: opacity 0.3s; }
.option:hover { border-color: var(--border-color); background: var(--bg-card-hover); transform: translateX(4px); }
.option.selected { border-color: var(--accent); background: rgba(0, 200, 150, 0.08); }
.option.selected::before { opacity: 0.04; }
.option-letter { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-secondary); color: var(--text-secondary); font-weight: 700; font-size: 0.85rem; margin-right: 14px; flex-shrink: 0; transition: var(--transition); position: relative; z-index: 1; }
.option.selected .option-letter { background: var(--accent); color: #0a0e12; }
.option-text { position: relative; z-index: 1; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 2rem; }
.btn-nav { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-card); color: var(--text-primary); font-size: 0.95rem; cursor: pointer; transition: var(--transition); }
.btn-nav:hover:not(:disabled) { border-color: var(--accent); background: var(--bg-card-hover); }
.btn-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-submit { background: var(--gradient-1); border: none; color: #0a0e12; font-weight: 700; font-family: 'SF Mono', 'Fira Code', monospace; }
.btn-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 20px var(--accent-glow); }

#result { flex-direction: column; align-items: center; padding: 2rem 1rem; background: var(--bg-primary); }
.result-container { width: 100%; max-width: 700px; margin: 0 auto; }
.result-header { text-align: center; padding: 3rem 0; }
.result-greeting { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2rem; font-style: italic; }
.result-type-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 3rem 2rem; box-shadow: var(--shadow-card), var(--shadow-glow); position: relative; overflow: hidden; }
.result-type-card::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(from 0deg, transparent, rgba(0, 200, 150, 0.08), transparent, rgba(0, 255, 136, 0.05), transparent); animation: rotate 10s linear infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }
.result-code { font-size: clamp(3rem, 10vw, 5rem); font-weight: 900; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 0.1em; position: relative; z-index: 1; font-family: 'SF Mono', 'Fira Code', monospace; }
.result-name { font-size: 1.5rem; color: var(--text-secondary); margin: 0.5rem 0 1.5rem; position: relative; z-index: 1; }
.result-match { display: inline-flex; align-items: center; gap: 10px; padding: 8px 20px; background: rgba(0, 200, 150, 0.08); border-radius: 20px; font-size: 0.9rem; color: var(--text-secondary); position: relative; z-index: 1; }
.match-value { font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.result-section { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 2rem; margin-top: 1.5rem; animation: slideUp 0.5s ease; }
.result-section h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text-primary); }
.system-note { color: var(--accent-light); font-style: italic; padding: 1rem; background: rgba(0, 200, 150, 0.04); border-radius: var(--radius-sm); border-left: 3px solid var(--accent); font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.9rem; line-height: 1.7; }
.personality-desc { color: var(--text-secondary); line-height: 1.8; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.radar-container { display: flex; justify-content: center; margin: 1rem 0; }
#radarChart { max-width: 100%; height: auto; }
.dimensions-list { display: flex; flex-direction: column; gap: 8px; margin-top: 1.5rem; }
.dimension-item { display: flex; align-items: center; padding: 10px 14px; background: var(--bg-secondary); border-radius: var(--radius-sm); font-size: 0.85rem; gap: 12px; }
.dimension-name { color: var(--text-secondary); min-width: 90px; flex-shrink: 0; }
.dimension-bar-container { flex: 1; height: 6px; background: rgba(0, 200, 150, 0.06); border-radius: 3px; overflow: hidden; }
.dimension-bar { height: 100%; border-radius: 3px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.dimension-bar.score-high { background: var(--gradient-1); }
.dimension-bar.score-mid { background: linear-gradient(135deg, #00c896 0%, #5c9cfc 100%); }
.dimension-bar.score-low { background: linear-gradient(135deg, #4a5a6a 0%, #00c896 100%); }
.dimension-score { font-weight: 700; font-size: 0.85rem; min-width: 40px; text-align: right; flex-shrink: 0; }
.dimension-score.score-high { color: var(--accent); }
.dimension-score.score-mid { color: var(--accent-light); }
.dimension-score.score-low { color: var(--text-dim); }
.friendly-tip { color: var(--success); padding: 1rem; background: rgba(46, 213, 115, 0.05); border-radius: var(--radius-sm); border-left: 3px solid var(--success); line-height: 1.8; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.disclaimer-section { border-color: rgba(255, 71, 87, 0.2); }
.disclaimer-section p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 0.5rem; line-height: 1.6; }
.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.btn-action { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-card); color: var(--text-primary); font-size: 1rem; cursor: pointer; transition: var(--transition); }
.btn-action:hover { border-color: var(--accent); background: var(--bg-card-hover); transform: translateY(-2px); }
.btn-retry { background: var(--gradient-1); border: none; color: #0a0e12; font-weight: 700; }
.btn-retry:hover { box-shadow: 0 4px 20px var(--accent-glow); }
.result-footer { text-align: center; margin-top: 3rem; padding: 2rem; color: var(--text-dim); font-size: 0.8rem; }
.result-footer p { margin-bottom: 0.3rem; }
.home-footer a, .result-footer a { color: var(--accent-light); text-decoration: none; border-bottom: 1px dashed var(--accent-light); transition: var(--transition); }
.home-footer a:hover, .result-footer a:hover { color: var(--accent); border-bottom-style: solid; }

@media (max-width: 768px) {
  .subtitle { letter-spacing: 0.3em; }
  .quiz-container { padding: 0 0.5rem; }
  .question-text { font-size: 1.1rem; }
  .option { padding: 14px 16px; font-size: 0.95rem; }
  .quiz-nav { flex-direction: column; }
  .btn-nav { justify-content: center; }
  .result-type-card { padding: 2rem 1.5rem; }
  .result-actions { flex-direction: column; }
  .btn-action { justify-content: center; }
  .picker-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .picker-card { padding: 1.2rem 0.8rem; }
  .picker-card-code { font-size: 1.3rem; }
  .picker-card-name { font-size: 0.9rem; }
  .btn-lazy { font-size: 0.82rem; padding: 10px 24px; }
  .dimension-name { min-width: 75px; font-size: 0.75rem; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-card-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::selection { background: var(--accent); color: #0a0e12; }
