@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  --primary-color: #f7a4c3;
  --primary-light: #ffdee9;
  --primary-dark: #e77ea3;
  --text-color: #333;
  --accent-color: #9c88ff;
  --light-color: #f8f9fa;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 15px;
}

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

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #ffeef8 100%);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 500px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  margin: 20px 0;
}

.quiz-header {
  background: linear-gradient(to right, var(--primary-color), var(--primary-light));
  color: white;
  padding: 25px 20px;
  text-align: center;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.quiz-header h1 {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 2.2rem;
  margin-bottom: 5px;
  font-weight: normal;
  letter-spacing: 1px;
}

.subtitle {
  font-size: 1rem;
  margin-bottom: 15px;
  font-weight: 300;
  opacity: 0.9;
}

.progress-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 10%;
  background-color: white;
  border-radius: 10px;
  transition: width 0.3s ease-in-out;
}

.question-counter {
  font-size: 0.9rem;
  color: white;
}

.quiz-content {
  padding: 25px;
}

.intro-content, .question-content, .result-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro-content h2, .question-content h2, .result-content h2 {
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-weight: 500;
}

.intro-content ul {
  list-style-type: none;
  margin-bottom: 30px;
  text-align: left;
  width: 100%;
}

.intro-content li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.intro-content li:before {
  content: "♡";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.options {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.option {
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
  display: flex;
  align-items: center;
}

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

.option.selected {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.option-label {
  font-weight: 500;
  margin-right: 10px;
  color: var(--primary-dark);
  min-width: 25px;
}

.option.selected .option-label {
  color: white;
}

.btn {
  background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 25px;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(247, 164, 195, 0.3);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(247, 164, 195, 0.5);
}

.score {
  font-size: 1.2rem;
  margin: 15px 0;
}

#final-score {
  color: var(--primary-dark);
  font-weight: bold;
  font-size: 1.5rem;
}

.result-interpretation {
  background-color: var(--primary-light);
  padding: 20px;
  border-radius: var(--border-radius);
  margin: 15px 0;
  width: 100%;
}

.result-interpretation h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.result-interpretation p {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.6;
}

.result-tag {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary-dark);
  margin: 5px 0;
}

/* 弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: var(--border-radius);
  max-width: 80%;
  width: 400px;
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow);
  text-align: center;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.close-btn:hover {
  color: var(--primary-dark);
}

.contact-text {
  margin-bottom: 15px;
  color: var(--primary-dark);
  font-weight: 500;
}

.wx-image-container {
  margin-top: 20px;
  max-width: 100%;
}

.wx-image {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* 管理链接 */
.admin-link {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 0.8rem;
  color: #ddd;
  text-decoration: none;
  opacity: 0.6;
}

.admin-link:hover {
  opacity: 1;
}

/* 统计页面样式 */
.stats-container {
  padding: 30px;
  text-align: center;
}

.stats-card {
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin: 20px auto;
  max-width: 500px;
}

.stats-header {
  margin-bottom: 30px;
}

.stats-title {
  color: var(--primary-dark);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.stats-item {
  margin: 20px 0;
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background-color: var(--primary-light);
  border-radius: 10px;
  align-items: center;
}

.stats-label {
  font-weight: 500;
  color: var(--text-color);
}

.stats-value {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.stats-percentage {
  font-size: 0.9rem;
  color: #555;
  margin-top: 5px;
}

.refresh-btn, .reset-btn {
  margin-top: 20px;
  margin-right: 10px;
}

.reset-btn {
  background-color: #f0f0f0;
  color: #666;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
}

.reset-btn:hover {
  background-color: #e0e0e0;
}

.back-to-test {
  margin-top: 30px;
  text-decoration: none;
  color: var(--primary-dark);
  display: inline-block;
}

.back-to-test:hover {
  text-decoration: underline;
}

.message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
  display: none;
}

.success {
  background-color: #d4edda;
  color: #155724;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
}

.visit-log {
  margin-top: 30px;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  background: #f5f5f5;
  padding: 15px;
  border-radius: 10px;
}

.log-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--primary-dark);
}

.log-entry {
  font-size: 0.9rem;
  margin-bottom: 5px;
  padding: 5px;
  border-bottom: 1px solid #eee;
}

.visit {
  color: #666;
}

.complete {
  color: var(--primary-dark);
  font-weight: 500;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-screen, .question-screen, .result-screen {
  animation: fadeIn 0.5s ease-out;
}

/* 响应式调整 */
@media (max-width: 480px) {
  .container {
    width: 95%;
    margin: 10px 0;
  }
  
  .quiz-header h1 {
    font-size: 1.8rem;
  }
  
  .subtitle {
    font-size: 0.9rem;
  }
  
  .option {
    padding: 12px;
  }
  
  .modal-content {
    width: 90%;
    padding: 20px;
  }
} 