/* Checkout Frenzy - Reviews and Modal Styles */

/* Reviews Section Styles */
.reviews-section {
  padding: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.reviews-section .container {
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.reviews-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  height: 600px;
  position: relative;
  overflow: hidden;
}

/* PC Optimization for reviews grid */
@media (min-width: 1400px) {
  .reviews-grid {
    max-width: 1400px;
    height: 650px;
  }
}

@media (min-width: 1600px) {
  .reviews-grid {
    max-width: 1600px;
    height: 700px;
  }
}

/* No gradient overlays to allow cards to be fully visible */

.reviews-column {
  width: 32%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.reviews-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: scrollUp linear infinite;
}

.reviews-column:nth-child(1) .reviews-track {
  animation-duration: 40s;
}

.reviews-column:nth-child(2) .reviews-track {
  animation-duration: 45s;
}

.reviews-column:nth-child(3) .reviews-track {
  animation-duration: 50s;
}

/* 暂停动画当鼠标悬停在卡片上 */
.reviews-column:hover .reviews-track {
  animation-play-state: paused;
}

.review-card {
  background-color: var(--card-bg-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: left;
  border: 1px solid var(--card-border-color);
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  margin-bottom: 20px;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  background-color: rgba(255, 255, 255, 0.2);
}

/* PC Optimization for review cards */
@media (min-width: 1400px) {
  .review-card {
    padding: 1.75rem;
    border-radius: 16px;
    margin-bottom: 25px;
  }

  .review-stars {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .review-quote {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .review-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .review-author {
    font-size: 0.9rem;
  }
}

@keyframes scrollUp {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* 确保滚动动画平滑 - 优化硬件加速 */
.reviews-track {
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  perspective: 1000px;
  -webkit-perspective: 1000px;
}

.review-stars {
  color: #ffcc00;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.review-quote {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.75rem;
}

.review-text {
  line-height: 1.5;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.review-author {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
  margin: 0;
  font-style: italic;
}

@media (max-width: 992px) {
  .reviews-grid {
    height: 500px;
  }

  .review-card {
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  .section-title h2 {
    font-size: 2rem;
  }

  .reviews-grid {
    height: 400px;
  }

  .review-card {
    padding: 1rem;
    margin-bottom: 15px;
  }

  .review-quote {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .review-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  .reviews-grid {
    height: 350px;
  }

  .review-card {
    padding: 0.8rem;
    margin-bottom: 10px;
  }

  .review-quote {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }

  .review-text {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .review-author {
    font-size: 0.75rem;
  }
}

/* Review Modal Styles */
.review-modal {
  display: none;
  position: fixed;
  z-index: 1100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.review-modal-content {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.8) 0%, rgba(155, 89, 182, 0.8) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: 5% auto; /* 减少顶部间距 */
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%; /* 控制宽度 */
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.review-modal-content h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: white;
}

.close-modal {
  position: absolute;
  right: 1.25rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: white;
}

/* 优化表单组样式 - 减少重复 */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-base);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: white;
  font-size: var(--font-sm);
  font-family: var(--font-main);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.3);
  background-color: rgba(255, 255, 255, 0.2);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.rating-container {
  display: flex;
  align-items: center;
}

.rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.rating input {
  display: none;
}

.rating label {
  cursor: pointer;
  width: 25px;
  height: 25px;
  margin: 0 2px;
  position: relative;
}

.rating label:before {
  content: '\f005';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s ease, transform 0.3s ease;
}

.rating input:checked ~ label:before,
.rating label:hover ~ label:before,
.rating label:hover:before {
  color: #ffcc00;
  transform: scale(1.2);
}

/* Share Experience Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: 20px;
  padding: 2rem;
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* PC端取消滚动条并缩短高度 */
@media (min-width: 769px) {
  .modal-content {
    max-height: none;
    overflow-y: visible;
    height: auto;
    padding: 1rem; /* 大幅减少内边距 */
  }

  .modal-header {
    margin-bottom: 0.5rem; /* 大幅减少底部间距 */
    padding-bottom: 0.25rem; /* 大幅减少底部内边距 */
  }

  .modal-header h2 {
    font-size: 1.3rem; /* 减小标题字体 */
    margin: 0;
  }

  .experience-form {
    gap: 0.5rem; /* 大幅减少表单元素间距 */
  }

  .form-group {
    margin-bottom: 0.25rem; /* 大幅减少表单组间距 */
  }

  .form-group label {
    margin-bottom: 0.25rem; /* 减少标签底部间距 */
    font-size: 0.9rem; /* 减小标签字体 */
  }

  .form-group input,
  .form-group textarea {
    padding: 0.4rem 0.6rem; /* 大幅减少输入框内边距 */
    font-size: 0.9rem; /* 减小输入框字体 */
  }

  .form-group textarea {
    min-height: 50px; /* 大幅减少文本域高度 */
  }

  .submit-btn {
    padding: 0.5rem 1rem; /* 大幅减少按钮内边距 */
    margin-top: 0.125rem; /* 大幅减少按钮顶部间距 */
    font-size: 0.9rem; /* 减小按钮字体 */
  }

  .star-rating {
    margin: 0.125rem 0; /* 大幅减少星级评分的上下间距 */
    gap: 0.125rem; /* 减少星星之间的间距 */
  }

  .star {
    font-size: 1.5rem; /* 减小星星大小 */
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 1rem;
}

.modal-header h2 {
  color: white;
  font-size: 1.5rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Form Styles */
.experience-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 体验分享表单特定样式 */
.experience-form .form-group input,
.experience-form .form-group textarea {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: var(--font-base);
  font-family: var(--font-main);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
  opacity: 0.8;
}

/* Star Rating Styles */
.star-rating {
  display: flex;
  gap: 0.25rem;
  margin: 0.5rem 0;
}

.star {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.star:hover,
.star.active {
  color: #ffcc00;
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

/* 优化提交按钮样式 */
.submit-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: 50px;
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
  transform: var(--gpu-acceleration);
  will-change: var(--will-change-transform);
}

.submit-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* Responsive Design for Modal - 移动端优化缩短1/5 */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0.8rem; /* 减少外边距 */
  }

  .modal-content {
    width: 95%;
    padding: 1rem; /* 大幅减少内边距 */
    margin: 0;
    max-height: calc(100vh - 1.6rem); /* 减少高度限制 */
    border-radius: 12px; /* 减小圆角 */
    overflow-y: auto;
  }

  .modal-header {
    margin-bottom: 0.6rem; /* 减少底部间距 */
    padding-bottom: 0.4rem; /* 减少底部内边距 */
  }

  .modal-header h2 {
    font-size: 1.1rem; /* 减小标题字体 */
    line-height: 1.1;
    margin: 0;
  }

  .modal-close {
    width: 30px; /* 减小关闭按钮 */
    height: 30px;
    font-size: 1.3rem;
  }

  .experience-form {
    gap: 0.8rem; /* 大幅减少表单元素间距 */
  }

  .form-group {
    gap: 0.25rem; /* 减少内部间距 */
    margin-bottom: 0.4rem; /* 减少底部间距 */
  }

  .form-group label {
    font-size: 0.85rem; /* 减小标签字体 */
    margin-bottom: 0.2rem; /* 减少标签底部间距 */
  }

  .form-group input,
  .form-group textarea {
    padding: 0.45rem 0.6rem; /* 减少输入框内边距 */
    font-size: 0.8rem; /* 减小输入框字体 */
    border-radius: 6px; /* 减小圆角 */
  }

  .form-group textarea {
    min-height: 60px; /* 减少文本域高度 */
  }

  .star-rating {
    gap: 0.1rem; /* 减少星星间距 */
    margin: 0.2rem 0; /* 减少上下间距 */
    justify-content: center;
  }

  .star {
    font-size: 1.4rem; /* 减小星星大小 */
  }

  .submit-btn {
    padding: 0.6rem 1.2rem; /* 减少按钮内边距 */
    font-size: 0.8rem; /* 减小按钮字体 */
    border-radius: 30px; /* 减小圆角 */
    margin-top: 0.4rem; /* 减少顶部间距 */
  }
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 0.3rem; /* 进一步减少外边距 */
  }

  .modal-content {
    width: 100%;
    padding: 0.8rem; /* 大幅减少内边距 */
    margin: 0;
    max-height: calc(100vh - 0.6rem); /* 减少高度限制 */
    border-radius: 8px; /* 减小圆角 */
    overflow-y: auto;
  }

  .modal-header {
    margin-bottom: 0.4rem; /* 减少底部间距 */
    padding-bottom: 0.25rem; /* 减少底部内边距 */
  }

  .modal-header h2 {
    font-size: 1rem; /* 进一步减小标题字体 */
    line-height: 1;
    margin: 0;
  }

  .modal-close {
    width: 25px; /* 进一步减小关闭按钮 */
    height: 25px;
    font-size: 1.1rem;
  }

  .experience-form {
    gap: 0.6rem; /* 进一步减少表单元素间距 */
  }

  .form-group {
    margin-bottom: 0.3rem; /* 减少底部间距 */
  }

  .form-group label {
    font-size: 0.8rem; /* 进一步减小标签字体 */
    margin-bottom: 0.15rem; /* 减少标签底部间距 */
  }

  .form-group input,
  .form-group textarea {
    padding: 0.35rem 0.5rem; /* 进一步减少输入框内边距 */
    font-size: 0.75rem; /* 进一步减小输入框字体 */
    border-radius: 4px; /* 减小圆角 */
  }

  .form-group textarea {
    min-height: 50px; /* 大幅减少文本域高度 */
  }

  .star-rating {
    gap: 0.05rem; /* 进一步减少星星间距 */
    margin: 0.15rem 0; /* 减少上下间距 */
  }

  .star {
    font-size: 1.2rem; /* 进一步减小星星大小 */
  }

  .submit-btn {
    padding: 0.5rem 1rem; /* 进一步减少按钮内边距 */
    font-size: 0.75rem; /* 进一步减小按钮字体 */
    border-radius: 25px; /* 减小圆角 */
    margin-top: 0.3rem; /* 减少顶部间距 */
  }
}

@media (max-width: 360px) {
  .modal-overlay {
    padding: 0;
  }

  .modal-content {
    width: 100%;
    padding: 0.6rem; /* 大幅减少内边距 */
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
    overflow-y: auto;
  }

  .modal-header {
    margin-bottom: 0.3rem; /* 减少底部间距 */
    padding-bottom: 0.2rem; /* 减少底部内边距 */
  }

  .modal-header h2 {
    font-size: 0.9rem; /* 进一步减小标题字体 */
    line-height: 1;
    margin: 0;
  }

  .modal-close {
    width: 22px; /* 减小关闭按钮 */
    height: 22px;
    font-size: 1rem;
  }

  .experience-form {
    gap: 0.4rem; /* 减少表单元素间距 */
  }

  .form-group {
    margin-bottom: 0.2rem; /* 减少底部间距 */
  }

  .form-group label {
    font-size: 0.75rem; /* 减小标签字体 */
    margin-bottom: 0.1rem; /* 减少标签底部间距 */
  }

  .form-group input,
  .form-group textarea {
    padding: 0.3rem 0.4rem; /* 减少输入框内边距 */
    font-size: 0.7rem; /* 减小输入框字体 */
    border-radius: 3px; /* 减小圆角 */
  }

  .form-group textarea {
    min-height: 40px; /* 减少文本域高度 */
  }

  .star-rating {
    gap: 0.03rem; /* 减少星星间距 */
    margin: 0.1rem 0; /* 减少上下间距 */
  }

  .star {
    font-size: 1rem; /* 大幅减小星星大小 */
  }

  .submit-btn {
    padding: 0.4rem 0.8rem; /* 减少按钮内边距 */
    font-size: 0.7rem; /* 减小按钮字体 */
    border-radius: 20px; /* 减小圆角 */
    margin-top: 0.2rem; /* 减少顶部间距 */
  }
}
