:root {
  --primary-color: #1677ff;
  --success-color: #52c41a;
  --error-color: #ff4d4f;
  --warning-color: #faad14;
  --bg-gradient-start: #667eea;
  --bg-gradient-end: #764ba2;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(
    135deg,
    var(--bg-gradient-start) 0%,
    var(--bg-gradient-end) 100%
  );
  min-height: 100vh;
  padding: 12px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  padding: 24px;
  overflow: hidden;
}

h1 {
  color: #1a1a1a;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.4;
}

.subtitle {
  color: #8c8c8c;
  font-size: 14px;
  text-align: center;
  margin-bottom: 24px;
  font-weight: 400;
}

.info-section {
  background: #fafafa;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid #f0f0f0;
}

.info-section h2 {
  color: #262626;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
}

.info-section h2::before {
  content: "📋";
  margin-right: 8px;
  font-size: 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  background: white;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.info-label {
  color: #8c8c8c;
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 500;
}

.info-value {
  color: #262626;
  font-size: 15px;
  font-weight: 600;
}

.form-section {
  margin-bottom: 24px;
}

.form-section h3 {
  color: #262626;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.form-section h3::before {
  content: "✍️";
  margin-right: 8px;
  font-size: 16px;
}

.form-group {
  margin-bottom: 24px;
  background: #fafafa;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}

.form-group label {
  display: block;
  color: #262626;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 600;
}

.question-text {
  color: #595959;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.6;
  padding-left: 4px;
}

.rating-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 14px;
}

.rating-option {
  position: relative;
  isolation: isolate;
}

.rating-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.rating-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: #434343;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
  border: 1px solid #d6dcf5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px rgba(22, 119, 255, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.rating-option label::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at center,
    rgba(22, 119, 255, 0.25),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
}

.rating-option label .rating-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.rating-option input[type="radio"]:checked + label {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #2f54eb 0%, #1677ff 45%, #4096ff 100%);
  box-shadow: 0 10px 20px rgba(64, 150, 255, 0.35);
  transform: translateY(-2px);
}

.rating-option input[type="radio"]:checked + label::after {
  opacity: 1;
}

.rating-option input[type="radio"]:hover:not(:checked) + label,
.rating-option input[type="radio"]:focus-visible:not(:checked) + label {
  border-color: #91caff;
  color: #1677ff;
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.15);
}

.rating-option input[type="radio"]:focus-visible + label {
  outline: 2px solid rgba(22, 119, 255, 0.45);
  outline-offset: 2px;
}

.rating-hint {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8c8c8c;
  margin-top: 8px;
  padding: 0 4px;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: all 0.3s;
  background: white;
  line-height: 1.6;
}

textarea:hover {
  border-color: var(--primary-color);
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

textarea::placeholder {
  color: #bfbfbf;
}

.submit-btn {
  width: 100%;
  height: 48px;
  padding: 0 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease-out,
    height 0.6s ease-out;
  pointer-events: none;
}

.submit-btn:hover::before {
  width: 300px;
  height: 300px;
}

.submit-btn:hover:not(:disabled) {
  background: #4096ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.submit-btn:disabled {
  background: #d9d9d9;
  color: #00000040;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.submit-btn:disabled::before {
  display: none;
}

.error-container {
  text-align: center;
  padding: 48px 20px;
}

.error-icon {
  font-size: 72px;
  margin-bottom: 24px;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.error-title {
  color: var(--error-color);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-message {
  color: #595959;
  font-size: 15px;
  line-height: 1.8;
}

.success-container {
  text-align: center;
  padding: 48px 20px;
}

.success-icon {
  font-size: 72px;
  margin-bottom: 24px;
  animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.success-title {
  color: var(--success-color);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.success-message {
  color: #595959;
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.view-feedback-section {
  background: #fafafa;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  border: 1px solid #f0f0f0;
}

.view-feedback-section h3 {
  color: #262626;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.view-feedback-section h3::before {
  content: "📊";
  margin-right: 8px;
  font-size: 18px;
}

.feedback-item {
  margin-bottom: 16px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.feedback-item:last-child {
  margin-bottom: 0;
}

.feedback-label {
  color: #8c8c8c;
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 500;
}

.feedback-value {
  color: #262626;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.rating-display {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.rating-progress {
  margin-top: 8px;
}

.rating-progress-track {
  background: #f0f0f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.rating-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #1677ff 0%, #4096ff 100%);
  width: calc(var(--rating-progress, 0) * 10%);
  transition: width 0.3s ease;
}

.rating-number {
  font-weight: 700;
  font-size: 32px;
  color: var(--primary-color);
  line-height: 1;
}

.rating-total {
  color: #8c8c8c;
  font-size: 16px;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid;
  display: flex;
  align-items: flex-start;
}

.alert::before {
  content: "⚠️";
  margin-right: 8px;
  font-size: 16px;
}

.alert-danger {
  background: #fff2f0;
  color: var(--error-color);
  border-color: #ffccc7;
}

.required {
  color: var(--error-color);
  margin-left: 2px;
}

/* 响应式设计 - 移动优先 */
@media (max-width: 768px) {
  body {
    padding: 8px;
  }

  .container {
    padding: 20px 16px;
    border-radius: 12px;
  }

  h1 {
    font-size: 20px;
  }

  .subtitle {
    font-size: 13px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .info-section {
    padding: 12px;
  }

  .info-section h2 {
    font-size: 15px;
  }

  .form-group {
    padding: 12px;
    margin-bottom: 16px;
  }

  .rating-scale {
    gap: 6px;
  }

  .rating-option label {
    height: 46px;
    font-size: 15px;
  }

  .rating-option label .rating-value {
    font-size: 18px;
  }

  .rating-hint {
    font-size: 10px;
  }

  textarea {
    min-height: 100px;
    font-size: 14px;
  }

  .submit-btn {
    height: 44px;
    font-size: 15px;
  }

  .feedback-item {
    padding: 12px;
  }

  .rating-number {
    font-size: 28px;
  }
}

@media (min-width: 769px) {
  body {
    padding: 24px;
  }

  .container {
    padding: 32px;
  }

  h1 {
    font-size: 26px;
  }

  .info-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* 超大屏幕优化 */
@media (min-width: 1200px) {
  .container {
    padding: 40px;
  }

  h1 {
    font-size: 28px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .rating-option label {
    height: 48px;
  }

  .submit-btn {
    height: 50px;
  }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
  /* 可以在这里添加暗色模式样式 */
}

/* 自定义确认对话框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-dialog {
  background: white;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
  will-change: transform;
}

.modal-overlay.show .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: modalIconBounce 0.4s ease;
  user-select: none;
}

@keyframes modalIconBounce {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-title {
  color: #262626;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  user-select: none;
}

.modal-body {
  padding: 20px 24px;
  color: #595959;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  user-select: none;
}

.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
}

.modal-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.modal-btn:active {
  transform: scale(0.96);
}

.modal-btn-cancel {
  background: #f5f5f5;
  color: #595959;
  border: 1px solid #d9d9d9;
}

.modal-btn-cancel:hover {
  background: #e8e8e8;
  border-color: #bfbfbf;
}

.modal-btn-cancel:active {
  background: #d9d9d9;
}

.modal-btn-confirm {
  background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.modal-btn-confirm:hover {
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
}

.modal-btn-confirm:active {
  box-shadow: 0 1px 4px rgba(22, 119, 255, 0.3);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 16px;
  }

  .modal-dialog {
    max-width: 100%;
  }

  .modal-header {
    padding: 20px 20px 12px;
  }

  .modal-icon {
    font-size: 42px;
  }

  .modal-title {
    font-size: 17px;
  }

  .modal-body {
    padding: 16px 20px;
    font-size: 14px;
  }

  .modal-footer {
    padding: 12px 20px 20px;
    gap: 10px;
  }

  .modal-btn {
    height: 46px;
    font-size: 14px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .modal-btn {
    height: 48px;
  }
}
