/* ==========================================================================
   《耐人尋味：老夫子的前世今生》魅力工學問卷調查系統 v2 (面談樣本專用版)
   ========================================================================== */

:root {
  --primary-color: #1a237e;
  --primary-light: #e8eaf6;
  --secondary-color: #c2185b;
  --secondary-light: #fce4ec;
  --text-main: #263238;
  --text-muted: #546e7a;
  --border-color: #cfd8dc;
  --bg-page: #f4f6f9;
  --bg-card: #ffffff;
  --accent-gold: #ffb300;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 80px;
}

/* Header */
.survey-header {
  background: linear-gradient(135deg, #0d47a1 0%, #1a237e 60%, #311b92 100%);
  color: #ffffff;
  padding: 40px 20px 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(13, 71, 161, 0.25);
}

.survey-header .course-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.survey-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.survey-header .subtitle {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 800px;
  margin: 0 auto;
}

/* Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Section Box */
.section-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.step-badge {
  background: var(--primary-color);
  color: #fff;
  font-size: 0.9rem;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 8px;
}

.section-title {
  font-size: 1.35rem;
  color: var(--primary-color);
  font-weight: 700;
}

.section-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Reading Experience Options */
.radio-group-horizontal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-card {
  flex: 1;
  min-width: 200px;
  background: #f8fafc;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-card:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.radio-card input[type="radio"]:checked + .radio-label {
  font-weight: bold;
  color: var(--primary-color);
}

.radio-card.active {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

/* Comic Card Unit */
.comic-card-unit {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.comic-card-unit.completed {
  border-color: #4caf50;
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.12);
}

@media (min-width: 768px) {
  .comic-card-unit {
    flex-direction: row;
  }
}

/* Left Image Column */
.comic-view-col {
  position: relative;
  background: #fafafa;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .comic-view-col {
    width: 320px;
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
  }
}

.comic-view-col img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  cursor: zoom-in;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.comic-view-col img:hover {
  transform: scale(1.02);
}

.zoom-hint {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Right Action Column */
.comic-action-col {
  flex: 1;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.comic-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.comic-tag {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: bold;
}

.tag-early { background: #eceff1; color: #37474f; }
.tag-mid { background: #e8f5e9; color: #2e7d32; }
.tag-recent { background: #f3e5f5; color: #6a1b9a; }

.comic-no {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.comic-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Rating Buttons */
.rating-section {
  margin: 16px 0 20px;
}

.rating-prompt {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.score-btn-group {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.score-btn {
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.score-btn input {
  display: none;
}

.score-btn .num-label {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--text-main);
}

.score-btn .text-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.score-btn:hover {
  border-color: var(--secondary-color);
  background: var(--secondary-light);
}

.score-btn.selected {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  box-shadow: 0 4px 10px rgba(194, 24, 91, 0.3);
}

.score-btn.selected .num-label,
.score-btn.selected .text-label {
  color: #ffffff;
}

/* Text Feeling Section */
.feeling-section {
  background: #fafbfc;
  border: 1px dashed #b0bec5;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
}

.feeling-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0d47a1;
  margin-bottom: 8px;
}

.feeling-input {
  width: 100%;
  border: 1.5px solid #cfd8dc;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feeling-input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
}

/* Demographics Grid */
.demographics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .demographics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.demo-field label {
  display: block;
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.demo-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  cursor: pointer;
}

/* Submit Area */
.submit-area {
  text-align: center;
  margin: 36px 0 20px;
}

.btn-submit {
  background: linear-gradient(135deg, #1565c0 0%, #1a237e 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 14px 48px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(26, 35, 126, 0.35);
  transition: all 0.2s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 35, 126, 0.45);
}

.btn-submit:disabled {
  background: #b0bec5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Bottom Progress Bar */
.bottom-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.progress-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
}

.progress-track {
  flex: 1;
  max-width: 400px;
  height: 8px;
  background: #eceff1;
  border-radius: 4px;
  margin: 0 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c2185b, #1a237e);
  width: 0%;
  transition: width 0.3s ease;
}

/* Lightbox */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
}

