/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f5f5;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

#app {
  width: 100%;
  min-height: 100vh;
  padding-bottom: 70px;
}

/* 顶部导航 */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 56px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff9a3d, #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.record-btn {
  font-size: 14px;
  color: #ff9500;
  font-weight: 500;
  cursor: pointer;
}

/* 主内容 */
.main-content {
  padding: 72px 16px 16px;
}

/* 测评卡片 */
.test-cards {
  position: relative;
  overflow: hidden;
}

.card-section {
  display: none;
  animation: slideIn 0.3s ease;
}

.card-section.active {
  display: block;
}

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

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card:active {
  transform: scale(0.98);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.card-icon {
  font-size: 24px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.card-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  padding-left: 34px;
}

.card-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #ccc;
}

/* 切换提示 */
.switch-hint {
  text-align: center;
  padding: 16px;
  color: #999;
  font-size: 13px;
  animation: fadeInOut 3s ease infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* 宠物切换按钮 */
.pet-switch {
  display: flex;
  gap: 12px;
  padding: 16px;
  justify-content: center;
}

.switch-btn {
  flex: 1;
  max-width: 140px;
  padding: 12px 20px;
  border: 2px solid #eee;
  border-radius: 24px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.switch-btn.active {
  background: linear-gradient(135deg, #ff9a3d, #ff7b00);
  border-color: transparent;
  color: #fff;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  z-index: 1000;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: #ff9500;
}

.nav-icon {
  font-size: 20px;
}

.nav-text {
  font-size: 11px;
  font-weight: 500;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 20px 16px 16px;
  text-align: center;
  position: relative;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #f0f0f0;
}

.modal-body {
  padding: 0 20px 24px;
}

.modal-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  text-align: center;
}

.code-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  text-align: center;
  letter-spacing: 2px;
  transition: all 0.2s;
}

.code-input:focus {
  outline: none;
  border-color: #ff9500;
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}

.submit-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #ff9a3d, #ff7b00);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:active {
  transform: scale(0.98);
}

/* 记录列表 */
.records-list {
  max-height: 300px;
  overflow-y: auto;
}

.empty-tip {
  text-align: center;
  color: #999;
  padding: 40px 0;
  font-size: 14px;
}

.record-item {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.record-item:last-child {
  border-bottom: none;
}

.record-info h4 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.record-info span {
  font-size: 12px;
  color: #999;
}

.record-view {
  font-size: 13px;
  color: #ff9500;
}

/* 测评页面 */
.test-page {
  min-height: 100vh;
  background: #f5f5f5;
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.back-btn {
  color: #ff9500;
  cursor: pointer;
  font-size: 15px;
}

.progress {
  color: #999;
  font-size: 14px;
}

.progress-bar {
  height: 4px;
  background: #eee;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 99;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #ff9a3d, #ff7b00);
  transition: width 0.3s ease;
}

.question-box {
  padding-top: 80px;
}

.question-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.6;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  padding: 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.option:hover {
  border-color: #ff9500;
  background: #fff8f0;
}

.option:active {
  transform: scale(0.98);
}

/* 结果页面 */
.result-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #fff5eb 0%, #fff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.result-header h2 {
  font-size: 18px;
  color: #666;
  font-weight: 500;
}

.result-score {
  margin: 24px 0;
}

.score-number {
  font-size: 72px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff9a3d, #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-label {
  font-size: 24px;
  color: #999;
}

.result-level {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

.result-desc {
  color: #666;
  text-align: center;
  margin-bottom: 32px;
}

.result-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  padding: 14px;
  background: linear-gradient(135deg, #ff9a3d, #ff7b00);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  padding: 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  color: #666;
  font-size: 16px;
  cursor: pointer;
}

/* 响应式 */
@media (max-width: 360px) {
  .card-title {
    font-size: 15px;
  }
  .card-desc {
    font-size: 12px;
  }
}