/* ============================================
   WEB技術選定ナビ - Black Industrial
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans',
    'Noto Sans JP', 'Yu Gothic', sans-serif;
  line-height: 1.7;
  color: #999;
  background: #000;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Screen System --- */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===========================
   START SCREEN
   =========================== */
.start-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
}

.start-inner {
  text-align: center;
  padding: 2rem;
  max-width: 600px;
}

.start-label {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: #444;
  font-weight: 600;
  margin-bottom: 2rem;
  font-family: 'Consolas', 'Monaco', monospace;
}

.start-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #e0e0e0;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.start-desc {
  font-size: 1rem;
  color: #555;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.btn-start {
  display: inline-block;
  background: #e0e0e0;
  color: #000;
  border: none;
  padding: 0.9rem 3rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}

.btn-start:hover {
  background: #fff;
}

.start-time {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: #333;
  font-family: 'Consolas', 'Monaco', monospace;
}

/* ===========================
   QUESTION SCREEN
   =========================== */
#screen-questions {
  background: #000;
}

.question-header {
  padding: 1.5rem 2rem 0;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.progress-wrap {
  height: 2px;
  background: #1a1a1a;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: #e0e0e0;
  transition: width 0.4s ease;
}

.progress-text {
  text-align: right;
  font-size: 0.7rem;
  color: #333;
  margin-top: 0.5rem;
  font-family: 'Consolas', 'Monaco', monospace;
  font-variant-numeric: tabular-nums;
}

.question-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.question-card {
  max-width: 640px;
  width: 100%;
  animation: slideIn 0.25s ease;
}

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

.question-number {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: #444;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-family: 'Consolas', 'Monaco', monospace;
}

.question-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e0e0e0;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.question-hint {
  font-size: 0.8rem;
  color: #444;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Options */
.options-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  color: #888;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.5;
}

.option-btn:hover {
  background: #111;
  border-color: #333;
  color: #ccc;
}

.option-btn.selected {
  background: #111;
  border-color: #e0e0e0;
  color: #e0e0e0;
}

.multi-note {
  font-size: 0.75rem;
  color: #555;
  margin-bottom: 1rem;
  font-family: 'Consolas', 'Monaco', monospace;
}

.btn-next {
  display: inline-block;
  margin-top: 1rem;
  background: #e0e0e0;
  color: #000;
  border: none;
  padding: 0.6rem 2rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s;
}

.btn-next:hover {
  background: #fff;
}

.btn-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.question-footer {
  padding: 1rem 2rem 2rem;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.btn-back {
  background: transparent;
  border: 1px solid #222;
  color: #555;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.15s, border-color 0.15s;
}

.btn-back:hover {
  color: #ccc;
  border-color: #444;
}

/* ===========================
   RESULT SCREEN
   =========================== */
#screen-result {
  background: #000;
  align-items: center;
  padding: 2rem 1rem;
}

.result-wrap {
  max-width: 800px;
  width: 100%;
}

.result-header {
  text-align: center;
  margin-bottom: 3rem;
}

.result-label {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: #333;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-family: 'Consolas', 'Monaco', monospace;
}

.result-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e0e0e0;
}

/* Primary Recommendation */
.result-primary {
  margin-bottom: 2rem;
}

.rec-card-primary {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 0;
  padding: 2rem;
  position: relative;
}

.rec-card-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #e0e0e0;
}

.rec-rank {
  display: inline-block;
  background: #e0e0e0;
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  padding: 0.2rem 0.6rem;
  border-radius: 0;
  margin-bottom: 1rem;
  font-family: 'Consolas', 'Monaco', monospace;
}

.rec-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: #e0e0e0;
  margin-bottom: 0.25rem;
}

.rec-tagline {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.rec-score-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rec-score-track {
  flex: 1;
  height: 4px;
  background: #1a1a1a;
}

.rec-score-fill {
  height: 100%;
  transition: width 1s ease;
}

.rec-score-fill.fill-primary {
  background: #e0e0e0;
}

.rec-score-num {
  font-size: 0.8rem;
  color: #555;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
  font-family: 'Consolas', 'Monaco', monospace;
  font-variant-numeric: tabular-nums;
}

.rec-description {
  color: #FFF;
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.rec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rec-tag {
  background: #111;
  color: #FFF;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0;
  border: 1px solid #1a1a1a;
  font-family: 'Consolas', 'Monaco', monospace;
}

/* Weaknesses */
.rec-weaknesses {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1a1a1a;
}

.rec-weaknesses-compact {
  margin-top: 1rem;
  padding-top: 1rem;
}

.weaknesses-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #a04040;
  margin-bottom: 0.6rem;
  font-family: 'Consolas', 'Monaco', monospace;
}

.weaknesses-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.weaknesses-list li {
  font-size: 0.8rem;
  color: #FFF;
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}

.weaknesses-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #a04040;
}

.rec-weaknesses-compact .weaknesses-list li {
  font-size: 0.75rem;
}

/* Other recommendations */
.result-others {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 2rem;
}

.rec-card-other {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 0;
  padding: 1.5rem;
}

.rec-card-other .rec-rank {
  background: #222;
  color: #fff;
  font-size: 0.6rem;
}

.rec-card-other .rec-name {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.rec-card-other .rec-tagline {
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.rec-card-other .rec-score-fill {
  background: #333;
}

.rec-card-other .rec-score-num {
  color: #444;
}

/* ===========================
   RADAR CHART
   =========================== */
.result-chart {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 0;
  padding: 2rem;
  margin-bottom: 2rem;
}

.chart-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: 'Consolas', 'Monaco', monospace;
}

.chart-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

#radar-canvas {
  max-width: 100%;
  height: auto;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #555;
  font-family: 'Consolas', 'Monaco', monospace;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 0;
  flex-shrink: 0;
}

/* ===========================
   SUMMARY
   =========================== */
.result-summary {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 0;
  padding: 2rem;
  margin-bottom: 2rem;
}

.summary-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 1.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: 'Consolas', 'Monaco', monospace;
}

.summary-axis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.axis-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.axis-label {
  font-size: 0.7rem;
  color: #444;
  font-weight: 500;
  font-family: 'Consolas', 'Monaco', monospace;
}

.axis-value {
  font-size: 0.85rem;
  color: #999;
  font-weight: 600;
}

/* ===========================
   JSON OUTPUT
   =========================== */
.result-json {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 0;
  padding: 2rem;
  margin-bottom: 2rem;
}

.json-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: 'Consolas', 'Monaco', monospace;
}

.json-output {
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 0;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.json-output code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #fff;
  white-space: pre;
}

.json-key     { color: #888; }
.json-string  { color: #5a5; }
.json-number  { color: #a85; }
.json-boolean { color: #85a; }
.json-null    { color: #a55; }

.json-actions {
  display: flex;
  gap: 2px;
}

.btn-json {
  background: #111;
  border: 1px solid #222;
  color: #555;
  padding: 0.45rem 1.2rem;
  font-size: 0.75rem;
  font-family: 'Consolas', 'Monaco', monospace;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.05em;
}

.btn-json:hover {
  background: #1a1a1a;
  color: #ccc;
}

.copy-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #e0e0e0;
  color: #000;
  padding: 0.6rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  z-index: 1000;
  animation: toastAnim 2s ease forwards;
  font-family: 'Consolas', 'Monaco', monospace;
}

@keyframes toastAnim {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Retry */
.result-actions {
  text-align: center;
  padding: 2rem 0 3rem;
}

.btn-retry {
  background: transparent;
  border: 1px solid #222;
  color: #444;
  padding: 0.65rem 2rem;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.15s, border-color 0.15s;
}

.btn-retry:hover {
  color: #ccc;
  border-color: #555;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .start-title {
    font-size: 2rem;
  }

  .start-desc br {
    display: none;
  }

  .question-text {
    font-size: 1.15rem;
  }

  .result-title {
    font-size: 1.3rem;
  }

  .result-others {
    grid-template-columns: 1fr;
  }

  .summary-axis {
    grid-template-columns: 1fr;
  }

  .rec-name {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .start-title {
    font-size: 1.6rem;
  }

  .btn-start {
    padding: 0.8rem 2rem;
    font-size: 0.85rem;
  }

  .question-header {
    padding: 1rem 1rem 0;
  }

  .question-body {
    padding: 1.5rem 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .question-footer {
    padding: 0.75rem 1rem 1.5rem;
  }

  .chart-container {
    overflow-x: auto;
  }
}
