@use "sass:color";
@use '../../styles/_ios-theme.scss' as ios;
@use '../../../../styles/variables' as vars;

:host { display: block; height: 100%; }

.customer-review-card {
  padding: ios.$ios-spacing-md;
  background: ios.$ios-background;
  border-radius: 12px;
  border: 1px solid ios.$ios-border;

  // 统计数据概览
  .stats-overview {
    margin-bottom: ios.$ios-spacing-lg;
    background: linear-gradient(135deg, rgba(ios.$ios-primary, 0.05), rgba(ios.$ios-primary, 0.02));
    border-radius: 16px;
    padding: ios.$ios-spacing-lg;
    border: 1px solid rgba(ios.$ios-primary, 0.1);
    
    .stats-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: ios.$ios-spacing-lg;

      h4 {
        margin: 0;
        font-size: ios.$ios-font-size-xl;
        font-weight: ios.$ios-font-weight-bold;
        color: ios.$ios-text-primary;
        background: linear-gradient(135deg, ios.$ios-primary, color.adjust(ios.$ios-primary, $lightness: -20%));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }

      .view-controls {
        display: flex;
        gap: ios.$ios-spacing-sm;

        .view-toggle-btn,
        .export-btn {
          padding: ios.$ios-spacing-sm ios.$ios-spacing-md;
          border: 1px solid ios.$ios-primary;
          background: transparent;
          color: ios.$ios-primary;
          border-radius: 24px;
          font-size: ios.$ios-font-size-sm;
          font-weight: ios.$ios-font-weight-medium;
          cursor: pointer;
          transition: all 0.3s ease;

          &:hover {
            background: ios.$ios-primary;
            color: white;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(ios.$ios-primary, 0.3);
          }
        }
      }
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: ios.$ios-spacing-lg;

      .stat-item {
        text-align: center;
        padding: ios.$ios-spacing-lg;
        background: ios.$ios-background;
        border-radius: 16px;
        border: 1px solid rgba(ios.$ios-border, 0.5);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          height: 3px;
          background: linear-gradient(90deg, transparent, ios.$ios-primary, transparent);
          opacity: 0;
          transition: opacity 0.3s ease;
        }

        &:hover {
          transform: translateY(-4px);
          box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
          border-color: ios.$ios-primary;

          &::before {
            opacity: 1;
          }
        }

        .stat-value {
          font-size: ios.$ios-font-size-large-title;
          font-weight: ios.$ios-font-weight-bold;
          color: ios.$ios-text-primary;
          margin-bottom: ios.$ios-spacing-sm;
          line-height: 1.2;

          .score-suffix {
            font-size: ios.$ios-font-size-md;
            color: ios.$ios-text-secondary;
            font-weight: ios.$ios-font-weight-medium;
          }
        }

        .stat-label {
          font-size: ios.$ios-font-size-sm;
          color: ios.$ios-text-secondary;
          margin-bottom: ios.$ios-spacing-sm;
          font-weight: ios.$ios-font-weight-medium;
        }

        .star-display {
          .star {
            color: #FFD700;
            font-size: ios.$ios-font-size-md;
            margin: 0 1px;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
          }
        }

        &.total {
          .stat-value { 
            background: linear-gradient(135deg, ios.$ios-primary, color.adjust(ios.$ios-primary, $lightness: -20%));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
          }
        }
        
        &.score {
          .stat-value { 
            background: linear-gradient(135deg, #FF6B35, color.adjust(#FF6B35, $lightness: -20%));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
          }
        }
        
        &.satisfied {
          .stat-value { 
            background: linear-gradient(135deg, ios.$ios-success, color.adjust(ios.$ios-success, $lightness: -20%));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
          }
        }
        
        &.pending {
          .stat-value { 
            background: linear-gradient(135deg, ios.$ios-warning, color.adjust(ios.$ios-warning, $lightness: -20%));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
          }
        }
      }
    }
  }

  // 分类统计
  .category-stats {
    margin-bottom: ios.$ios-spacing-lg;
    padding: ios.$ios-spacing-lg;
    background: linear-gradient(135deg, rgba(ios.$ios-success, 0.05), rgba(ios.$ios-success, 0.02));
    border-radius: 16px;
    border: 1px solid rgba(ios.$ios-success, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

    h5 {
      margin: 0 0 ios.$ios-spacing-lg 0;
      font-size: ios.$ios-font-size-lg;
      font-weight: ios.$ios-font-weight-bold;
      background: linear-gradient(135deg, ios.$ios-success, color.adjust(ios.$ios-success, $lightness: -20%));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .category-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: ios.$ios-spacing-md;

      .category-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: ios.$ios-spacing-md;
        background: ios.$ios-background;
        border-radius: 12px;
        border: 1px solid rgba(ios.$ios-border, 0.5);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          width: 3px;
          height: 100%;
          background: ios.$ios-success;
          opacity: 0;
          transition: opacity 0.3s ease;
        }

        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
          border-color: ios.$ios-success;

          &::before {
            opacity: 1;
          }
        }

        .category-label {
          font-size: ios.$ios-font-size-sm;
          color: ios.$ios-text-primary;
          font-weight: ios.$ios-font-weight-medium;
        }

        .category-count {
          font-size: ios.$ios-font-size-md;
          font-weight: ios.$ios-font-weight-bold;
          background: linear-gradient(135deg, ios.$ios-success, color.adjust(ios.$ios-success, $lightness: -15%));
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          background-clip: text;
          padding: 4px 8px;
          border-radius: 12px;
          background-color: rgba(ios.$ios-success, 0.1);
          min-width: 24px;
          text-align: center;
        }
      }
    }
  }

  // 筛选区域
  .filter-section {
    margin-bottom: ios.$ios-spacing-lg;
    padding: ios.$ios-spacing-lg;
    background: linear-gradient(135deg, rgba(ios.$ios-color-system-gray-1-light, 0.05), rgba(ios.$ios-color-system-gray-1-light, 0.02));
    border-radius: 16px;
    border: 1px solid rgba(ios.$ios-border, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

    .filter-row {
      display: flex;
      flex-wrap: wrap;
      gap: ios.$ios-spacing-lg;
      margin-bottom: ios.$ios-spacing-md;

      &:last-child {
        margin-bottom: 0;
      }

      .filter-group {
        display: flex;
        align-items: center;
        gap: ios.$ios-spacing-md;

        label {
          font-size: ios.$ios-font-size-sm;
          color: ios.$ios-text-primary;
          white-space: nowrap;
          font-weight: ios.$ios-font-weight-semibold;
          min-width: 80px;
        }

        .filter-buttons {
          display: flex;
          gap: ios.$ios-spacing-xs;
          background: ios.$ios-background;
          padding: 4px;
          border-radius: 20px;
          border: 1px solid rgba(ios.$ios-border, 0.5);
          box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);

          .filter-btn {
            padding: ios.$ios-spacing-sm ios.$ios-spacing-md;
            border: none;
            background: transparent;
            color: ios.$ios-text-secondary;
            border-radius: 16px;
            font-size: ios.$ios-font-size-sm;
            font-weight: ios.$ios-font-weight-medium;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 60px;
            position: relative;

            &:hover {
              background: rgba(ios.$ios-primary, 0.1);
              color: ios.$ios-primary;
            }

            &.active {
              background: ios.$ios-primary;
              color: white;
              box-shadow: 0 2px 4px rgba(ios.$ios-primary, 0.3);
              transform: translateY(-1px);

              &.pending {
                background: ios.$ios-warning;
                box-shadow: 0 2px 4px rgba(ios.$ios-warning, 0.3);
              }

              &.satisfied {
                background: ios.$ios-success;
                box-shadow: 0 2px 4px rgba(ios.$ios-success, 0.3);
              }

              &.unsatisfied {
                background: ios.$ios-danger;
                box-shadow: 0 2px 4px rgba(ios.$ios-danger, 0.3);
              }
            }
          }
        }

        .filter-select {
          padding: ios.$ios-spacing-sm ios.$ios-spacing-md;
          border: 1px solid rgba(ios.$ios-border, 0.5);
          border-radius: 12px;
          background: ios.$ios-background;
          color: ios.$ios-text-primary;
          font-size: ios.$ios-font-size-sm;
          font-weight: ios.$ios-font-weight-medium;
          min-width: 140px;
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
          transition: all 0.3s ease;

          &:focus {
            outline: none;
            border-color: ios.$ios-primary;
            box-shadow: 0 0 0 3px rgba(ios.$ios-primary, 0.1);
          }

          &:hover {
            border-color: ios.$ios-primary;
          }
        }

        .btn {
          padding: ios.$ios-spacing-sm ios.$ios-spacing-md;
          border: 1px solid ios.$ios-color-system-gray-1-light;
          background: ios.$ios-background;
          color: ios.$ios-color-system-gray-1-light;
          border-radius: 12px;
          font-size: ios.$ios-font-size-sm;
          font-weight: ios.$ios-font-weight-medium;
          cursor: pointer;
          transition: all 0.3s ease;
          min-width: 80px;

          &:hover {
            background: ios.$ios-color-system-gray-1-light;
            color: white;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(ios.$ios-color-system-gray-1-light, 0.3);
          }
        }
      }
    }
  }

  // 评价列表
  .reviews-list {
    .list-body {
      display: grid;
      gap: ios.$ios-spacing-lg;
    }

    .review-item {
      background: ios.$ios-background;
      border: 1px solid ios.$ios-border;
      border-radius: 16px;
      padding: ios.$ios-spacing-lg;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;

      &:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
        border-color: ios.$ios-primary;
      }

      // 状态指示条
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: ios.$ios-border;
        transition: background 0.3s ease;
      }

      &.pending::before {
        background: ios.$ios-warning;
      }

      &.satisfied::before {
        background: ios.$ios-success;
      }

      &.unsatisfied::before {
        background: ios.$ios-danger;
      }

      &.processing::before {
        background: ios.$ios-primary;
      }

      .review-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: ios.$ios-spacing-md;
        padding-bottom: ios.$ios-spacing-sm;
        border-bottom: 1px solid rgba(ios.$ios-border, 0.5);

        .customer-info {
          display: flex;
          flex-direction: column;
          gap: ios.$ios-spacing-xs;

          .customer-name {
            font-size: ios.$ios-font-size-lg;
            font-weight: ios.$ios-font-weight-bold;
            color: ios.$ios-text-primary;
            margin-bottom: ios.$ios-spacing-xs;
          }

          .category-tag {
            display: inline-block;
            padding: 4px 12px;
            background: rgba(ios.$ios-primary, 0.1);
            color: ios.$ios-primary;
            border-radius: 20px;
            font-size: ios.$ios-font-size-xs;
            font-weight: ios.$ios-font-weight-medium;
            width: fit-content;
          }
        }

        .review-meta {
          display: flex;
          flex-direction: column;
          align-items: flex-end;
          gap: ios.$ios-spacing-xs;

          .score-display {
            display: flex;
            align-items: center;
            gap: ios.$ios-spacing-xs;
            padding: 6px 12px;
            background: rgba(#FFD700, 0.1);
            border-radius: 20px;

            .score-stars {
              display: flex;
              gap: 2px;

              .star {
                font-size: ios.$ios-font-size-sm;
                color: #FFD700;
              }
            }

            .score-number {
              font-size: ios.$ios-font-size-sm;
              font-weight: ios.$ios-font-weight-semibold;
              color: ios.$ios-text-primary;
            }

            &.high-score {
              background: rgba(ios.$ios-success, 0.1);
              .score-number { color: ios.$ios-success; }
            }

            &.medium-score {
              background: rgba(ios.$ios-warning, 0.1);
              .score-number { color: ios.$ios-warning; }
            }

            &.low-score {
              background: rgba(ios.$ios-danger, 0.1);
              .score-number { color: ios.$ios-danger; }
            }
          }

          .status-badge {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: ios.$ios-font-size-xs;
            font-weight: ios.$ios-font-weight-medium;
            text-align: center;
            min-width: 60px;

            &.pending {
              background: rgba(ios.$ios-warning, 0.1);
              color: ios.$ios-warning;
              border: 1px solid rgba(ios.$ios-warning, 0.3);
            }

            &.satisfied {
              background: rgba(ios.$ios-success, 0.1);
              color: ios.$ios-success;
              border: 1px solid rgba(ios.$ios-success, 0.3);
            }

            &.unsatisfied {
              background: rgba(ios.$ios-danger, 0.1);
              color: ios.$ios-danger;
              border: 1px solid rgba(ios.$ios-danger, 0.3);
            }

            &.processing {
              background: rgba(ios.$ios-primary, 0.1);
              color: ios.$ios-primary;
              border: 1px solid rgba(ios.$ios-primary, 0.3);
            }
          }
        }
      }

      .review-content {
        margin-bottom: ios.$ios-spacing-md;

        .feedback-text {
          font-size: ios.$ios-font-size-md;
          line-height: 1.6;
          color: ios.$ios-text-primary;
          margin-bottom: ios.$ios-spacing-md;
          padding: ios.$ios-spacing-md;
          background: rgba(ios.$ios-background-secondary, 0.5);
          border-radius: 12px;
          border-left: 3px solid ios.$ios-primary;
        }

        .problem-location,
        .reference-case {
          display: flex;
          align-items: flex-start;
          gap: ios.$ios-spacing-sm;
          margin-bottom: ios.$ios-spacing-sm;
          padding: ios.$ios-spacing-sm ios.$ios-spacing-md;
          background: ios.$ios-background-secondary;
          border-radius: 8px;
          font-size: ios.$ios-font-size-sm;

          strong {
            color: ios.$ios-text-secondary;
            font-weight: ios.$ios-font-weight-semibold;
            min-width: 80px;
            flex-shrink: 0;
          }
        }

        .problem-location {
          border-left: 3px solid ios.$ios-warning;
        }

        .reference-case {
          border-left: 3px solid ios.$ios-primary;
        }
      }

      .review-footer {
        .time-info {
          display: flex;
          flex-direction: column;
          gap: ios.$ios-spacing-xs;
          margin-bottom: ios.$ios-spacing-md;
          font-size: ios.$ios-font-size-xs;
          color: ios.$ios-text-secondary;

          .created-time {
            font-weight: ios.$ios-font-weight-medium;
          }

          .updated-time {
            opacity: 0.8;
          }
        }

        .response-section {
          margin-top: ios.$ios-spacing-md;
          padding: ios.$ios-spacing-md;
          background: rgba(ios.$ios-success, 0.05);
          border-radius: 12px;
          border-left: 3px solid ios.$ios-success;

          strong {
            color: ios.$ios-success;
            font-size: ios.$ios-font-size-sm;
            font-weight: ios.$ios-font-weight-semibold;
          }

          .response-text {
            margin-top: ios.$ios-spacing-xs;
            font-size: ios.$ios-font-size-sm;
            line-height: 1.5;
            color: ios.$ios-text-primary;
          }
        }
      }
    }
  }

  // 空状态
  .empty-state {
    padding: ios.$ios-spacing-xl;
    text-align: center;
    color: ios.$ios-text-secondary;

    .empty-icon {
      font-size: 3rem;
      margin-bottom: ios.$ios-spacing-md;
      opacity: 0.5;
    }

    .empty-title {
      font-size: ios.$ios-font-size-lg;
      font-weight: ios.$ios-font-weight-semibold;
      color: ios.$ios-text-primary;
      margin-bottom: ios.$ios-spacing-sm;
    }

    .empty-desc {
      font-size: ios.$ios-font-size-sm;
      color: ios.$ios-text-secondary;
    }
  }

  // 操作按钮样式
  .action-buttons {
    display: flex;
    gap: ios.$ios-spacing-sm;
    margin-top: ios.$ios-spacing-md;
    flex-wrap: wrap;
    justify-content: flex-end;

    .action-btn {
      padding: ios.$ios-spacing-sm ios.$ios-spacing-md;
      border: none;
      border-radius: 24px;
      font-size: ios.$ios-font-size-sm;
      font-weight: ios.$ios-font-weight-semibold;
      cursor: pointer;
      transition: all 0.3s ease;
      min-width: 90px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: ios.$ios-spacing-xs;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
      }

      &:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
      }

      &.process-btn {
        background: linear-gradient(135deg, ios.$ios-primary, color.adjust(ios.$ios-primary, $lightness: -10%));
        color: white;

        &:hover {
          background: linear-gradient(135deg, color.adjust(ios.$ios-primary, $lightness: -5%), color.adjust(ios.$ios-primary, $lightness: -15%));
        }
      }

      &.reply-btn {
        background: linear-gradient(135deg, ios.$ios-success, color.adjust(ios.$ios-success, $lightness: -10%));
        color: white;

        &:hover {
          background: linear-gradient(135deg, color.adjust(ios.$ios-success, $lightness: -5%), color.adjust(ios.$ios-success, $lightness: -15%));
        }
      }

      &.complete-btn {
        background: linear-gradient(135deg, ios.$ios-warning, color.adjust(ios.$ios-warning, $lightness: -10%));
        color: white;

        &:hover {
          background: linear-gradient(135deg, color.adjust(ios.$ios-warning, $lightness: -5%), color.adjust(ios.$ios-warning, $lightness: -15%));
        }
      }

      &.view-btn {
        background: linear-gradient(135deg, ios.$ios-color-system-gray-1-light, color.adjust(ios.$ios-color-system-gray-1-light, $lightness: -10%));
        color: white;

        &:hover {
          background: linear-gradient(135deg, color.adjust(ios.$ios-color-system-gray-1-light, $lightness: -5%), color.adjust(ios.$ios-color-system-gray-1-light, $lightness: -15%));
        }
      }

      // 添加图标样式
      i {
        font-size: ios.$ios-font-size-xs;
      }
    }
  }

  // 响应式设计
  @media (max-width: 768px) {
    .action-buttons {
      .action-btn {
        flex: 1;
        min-width: auto;
      }
    }
  }

  // 详细评价区域样式
  .detailed-review-section {
    margin-top: ios.$ios-spacing-lg;
    
    .detailed-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: ios.$ios-spacing-lg;
      padding: ios.$ios-spacing-lg;
      background: linear-gradient(135deg, rgba(ios.$ios-primary, 0.08), rgba(ios.$ios-primary, 0.03));
      border-radius: 16px;
      border: 1px solid rgba(ios.$ios-primary, 0.15);
      
      h4 {
        margin: 0;
        font-size: ios.$ios-font-size-xl;
        font-weight: ios.$ios-font-weight-bold;
        background: linear-gradient(135deg, ios.$ios-primary, color.adjust(ios.$ios-primary, $lightness: -20%));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }
    }
  }

  // 详细评价表单样式
  .detailed-form {
    background: linear-gradient(135deg, rgba(#f8f9fa, 0.8), rgba(#ffffff, 0.9));
    border-radius: 16px;
    padding: ios.$ios-spacing-xl;
    margin-bottom: ios.$ios-spacing-lg;
    border: 1px solid rgba(ios.$ios-border, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);

    h4 {
      color: ios.$ios-text-primary;
      margin-bottom: ios.$ios-spacing-lg;
      font-size: ios.$ios-font-size-lg;
      font-weight: ios.$ios-font-weight-bold;
      display: flex;
      align-items: center;
      gap: ios.$ios-spacing-sm;
      
      &::before {
        content: '';
        width: 4px;
        height: 24px;
        background: linear-gradient(180deg, ios.$ios-primary, color.adjust(ios.$ios-primary, $lightness: -20%));
        border-radius: 2px;
      }
    }
  }

  // 多维度评价表单
  .dimension-form {
    margin-bottom: 24px;

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

    .dimension-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px;
      background: white;
      border-radius: 6px;
      border: 1px solid #dee2e6;

      label {
        font-weight: 500;
        color: #495057;
        min-width: 100px;
      }

      .star-rating {
        display: flex;
        gap: 2px;
        margin: 0 12px;

        .star {
          font-size: 18px;
          color: #ddd;
          cursor: pointer;
          transition: color 0.2s;

          &:hover,
          &.active {
            color: #ffc107;
          }
        }
      }

      .rating-text {
        font-size: 14px;
        color: #6c757d;
        min-width: 40px;
        text-align: center;
      }
    }
  }

  // 场景评价
  .scene-evaluation {
    margin-bottom: 24px;

    .scene-grid {
      display: grid;
      gap: 16px;
    }

    .scene-item {
      background: white;
      border-radius: 6px;
      border: 1px solid #dee2e6;
      overflow: hidden;

      .scene-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: #f8f9fa;
        border-bottom: 1px solid #dee2e6;

        .scene-name {
          font-weight: 500;
          color: #495057;
        }

        .star-rating {
          display: flex;
          gap: 2px;
          margin: 0 12px;

          .star {
            font-size: 16px;
            color: #ddd;
            cursor: pointer;
            transition: color 0.2s;

            &:hover,
            &.active {
              color: #ffc107;
            }
          }
        }

        .rating-text {
          font-size: 14px;
          color: #6c757d;
          min-width: 40px;
          text-align: center;
        }
      }

      .scene-feedback {
        width: 100%;
        min-height: 80px;
        padding: 12px 16px;
        border: none;
        resize: vertical;
        font-size: 14px;
        line-height: 1.5;

        &:focus {
          outline: none;
          background: #f8f9fa;
        }

        &::placeholder {
          color: #adb5bd;
        }
      }
    }
  }

  // 优化建议
  .optimization-suggestions {
    margin-bottom: 24px;

    .suggestion-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }

    .suggestion-item {
      display: flex;
      align-items: flex-start;
      padding: 12px;
      background: white;
      border-radius: 6px;
      border: 1px solid #dee2e6;
      cursor: pointer;
      transition: all 0.2s;

      &:hover {
        border-color: #007bff;
        background: #f8f9ff;
      }

      input[type="checkbox"] {
        margin-right: 12px;
        margin-top: 2px;
      }

      .checkmark {
        width: 16px;
        height: 16px;
        border: 2px solid #dee2e6;
        border-radius: 3px;
        margin-right: 12px;
        margin-top: 2px;
        position: relative;
        transition: all 0.2s;

        &::after {
          content: '';
          position: absolute;
          left: 4px;
          top: 1px;
          width: 4px;
          height: 8px;
          border: solid white;
          border-width: 0 2px 2px 0;
          transform: rotate(45deg);
          opacity: 0;
          transition: opacity 0.2s;
        }
      }

      input[type="checkbox"]:checked + .checkmark {
        background: #007bff;
        border-color: #007bff;

        &::after {
          opacity: 1;
        }
      }

      .suggestion-content {
        flex: 1;

        .suggestion-label {
          display: block;
          font-weight: 500;
          color: #495057;
          margin-bottom: 4px;
        }

        .suggestion-desc {
          display: block;
          font-size: 12px;
          color: #6c757d;
          line-height: 1.4;
        }
      }
    }

    .custom-suggestion {
      label {
        display: block;
        font-weight: 500;
        color: #495057;
        margin-bottom: 8px;
      }

      textarea {
        width: 100%;
        min-height: 80px;
        padding: 12px;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        resize: vertical;
        font-size: 14px;
        line-height: 1.5;

        &:focus {
          outline: none;
          border-color: #007bff;
          box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
        }

        &::placeholder {
          color: #adb5bd;
        }
      }
    }
  }

  // 表单操作按钮
  .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #dee2e6;

    .btn {
      padding: 8px 20px;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
      border: none;
      cursor: pointer;
      transition: all 0.2s;

      &.btn-primary {
        background: #007bff;
        color: white;

        &:hover {
          background: #0056b3;
        }
      }

      &.btn-secondary {
        background: #6c757d;
        color: white;

        &:hover {
          background: #545b62;
        }
      }
    }
  }

  // 创建评价按钮区域
  .create-review-section {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin-bottom: 20px;

    .btn {
      padding: 12px 24px;
      font-size: 16px;
      font-weight: 500;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      transition: all 0.2s;

      &.btn-primary {
        background: #007bff;
        color: white;

        &:hover {
          background: #0056b3;
          transform: translateY(-1px);
        }
      }

      i {
        margin-right: 8px;
      }
    }
  }

  // 详细评价列表样式优化
  .detailed-reviews-list {
    margin-top: ios.$ios-spacing-xl;
    
    .list-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: ios.$ios-spacing-lg;
      padding: ios.$ios-spacing-md ios.$ios-spacing-lg;
      background: linear-gradient(135deg, rgba(ios.$ios-success, 0.08), rgba(ios.$ios-success, 0.03));
      border-radius: 12px;
      border: 1px solid rgba(ios.$ios-success, 0.15);
      
      h5 {
        margin: 0;
        font-size: ios.$ios-font-size-lg;
        font-weight: ios.$ios-font-weight-bold;
        background: linear-gradient(135deg, ios.$ios-success, color.adjust(ios.$ios-success, $lightness: -20%));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }
      
      .review-count {
        padding: 6px 16px;
        background: rgba(ios.$ios-success, 0.1);
        color: ios.$ios-success;
        border-radius: 20px;
        font-size: ios.$ios-font-size-sm;
        font-weight: ios.$ios-font-weight-semibold;
        border: 1px solid rgba(ios.$ios-success, 0.2);
      }
    }
    
    .review-items {
      display: grid;
      gap: ios.$ios-spacing-lg;
      
      .review-item {
        background: linear-gradient(135deg, rgba(#ffffff, 1), rgba(#f8f9fa, 0.5));
        border: 1px solid rgba(ios.$ios-border, 0.3);
        border-radius: 20px;
        padding: ios.$ios-spacing-xl;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
        
        // 装饰性渐变背景
        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          height: 4px;
          background: linear-gradient(90deg, 
            ios.$ios-primary 0%, 
            ios.$ios-success 50%, 
            ios.$ios-warning 100%
          );
          opacity: 0;
          transition: opacity 0.4s ease;
        }
        
        &:hover {
          transform: translateY(-4px) scale(1.01);
          box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
          border-color: ios.$ios-primary;
          
          &::before {
            opacity: 1;
          }
        }
        
        .review-header {
          display: flex;
          justify-content: space-between;
          align-items: flex-start;
          margin-bottom: ios.$ios-spacing-lg;
          padding-bottom: ios.$ios-spacing-md;
          border-bottom: 2px solid rgba(ios.$ios-border, 0.2);
          
          .customer-info {
            display: flex;
            flex-direction: column;
            gap: ios.$ios-spacing-xs;
            
            .customer-name {
              font-size: ios.$ios-font-size-xl;
              font-weight: ios.$ios-font-weight-bold;
              background: linear-gradient(135deg, ios.$ios-text-primary, color.adjust(ios.$ios-text-primary, $lightness: 20%));
              -webkit-background-clip: text;
              -webkit-text-fill-color: transparent;
              background-clip: text;
            }
            
            .review-date {
              font-size: ios.$ios-font-size-sm;
              color: ios.$ios-text-secondary;
              font-weight: ios.$ios-font-weight-medium;
              display: flex;
              align-items: center;
              gap: 6px;
              
              &::before {
                content: '📅';
                font-size: 14px;
              }
            }
          }
          
          .overall-rating {
            display: flex;
            align-items: center;
            gap: ios.$ios-spacing-sm;
            padding: ios.$ios-spacing-sm ios.$ios-spacing-lg;
            background: linear-gradient(135deg, rgba(#FFD700, 0.15), rgba(#FFA500, 0.1));
            border-radius: 30px;
            border: 2px solid rgba(#FFD700, 0.3);
            box-shadow: 0 4px 12px rgba(#FFD700, 0.2);
            
            .rating-label {
              font-size: ios.$ios-font-size-sm;
              font-weight: ios.$ios-font-weight-semibold;
              color: ios.$ios-text-secondary;
            }
            
            .stars {
              display: flex;
              gap: 2px;
              
              span {
                font-size: ios.$ios-font-size-lg;
                color: #FFD700;
                text-shadow: 0 2px 4px rgba(#FFD700, 0.3);
                animation: starPulse 2s ease-in-out infinite;
                
                @for $i from 1 through 5 {
                  &:nth-child(#{$i}) {
                    animation-delay: #{$i * 0.1}s;
                  }
                }
              }
            }
            
            .rating-number {
              font-size: ios.$ios-font-size-lg;
              font-weight: ios.$ios-font-weight-bold;
              background: linear-gradient(135deg, #FFD700, #FFA500);
              -webkit-background-clip: text;
              -webkit-text-fill-color: transparent;
              background-clip: text;
            }
          }
        }
        
        .review-dimensions {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
          gap: ios.$ios-spacing-md;
          margin-bottom: ios.$ios-spacing-lg;
          padding: ios.$ios-spacing-lg;
          background: linear-gradient(135deg, rgba(ios.$ios-primary, 0.03), rgba(ios.$ios-primary, 0.01));
          border-radius: 16px;
          border: 1px solid rgba(ios.$ios-primary, 0.1);
          
          .dimension-summary {
            display: flex;
            flex-direction: column;
            gap: ios.$ios-spacing-xs;
            padding: ios.$ios-spacing-md;
            background: ios.$ios-background;
            border-radius: 12px;
            border: 1px solid rgba(ios.$ios-border, 0.3);
            transition: all 0.3s ease;
            
            &:hover {
              transform: translateY(-2px);
              box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
              border-color: ios.$ios-primary;
            }
            
            .dim-label {
              font-size: ios.$ios-font-size-sm;
              font-weight: ios.$ios-font-weight-semibold;
              color: ios.$ios-text-secondary;
              text-transform: uppercase;
              letter-spacing: 0.5px;
            }
            
            .dim-rating {
              display: flex;
              align-items: center;
              justify-content: space-between;
              gap: ios.$ios-spacing-sm;
              
              .stars.mini {
                display: flex;
                gap: 1px;
                
                span {
                  font-size: ios.$ios-font-size-sm;
                  color: #FFD700;
                }
              }
              
              .dim-score {
                font-size: ios.$ios-font-size-md;
                font-weight: ios.$ios-font-weight-bold;
                padding: 4px 10px;
                border-radius: 12px;
                
                &.high-score {
                  background: rgba(ios.$ios-success, 0.15);
                  color: ios.$ios-success;
                  border: 1px solid rgba(ios.$ios-success, 0.3);
                }
                
                &.medium-score {
                  background: rgba(ios.$ios-warning, 0.15);
                  color: ios.$ios-warning;
                  border: 1px solid rgba(ios.$ios-warning, 0.3);
                }
                
                &.low-score {
                  background: rgba(ios.$ios-danger, 0.15);
                  color: ios.$ios-danger;
                  border: 1px solid rgba(ios.$ios-danger, 0.3);
                }
              }
            }
          }
        }
        
        .scene-reviews {
          margin-bottom: ios.$ios-spacing-lg;
          padding: ios.$ios-spacing-lg;
          background: linear-gradient(135deg, rgba(ios.$ios-success, 0.05), rgba(ios.$ios-success, 0.02));
          border-radius: 16px;
          border: 1px solid rgba(ios.$ios-success, 0.15);
          
          h6 {
            margin: 0 0 ios.$ios-spacing-md 0;
            font-size: ios.$ios-font-size-md;
            font-weight: ios.$ios-font-weight-bold;
            color: ios.$ios-success;
            display: flex;
            align-items: center;
            gap: ios.$ios-spacing-sm;
            
            &::before {
              content: '🏠';
              font-size: ios.$ios-font-size-lg;
            }
          }
          
          .scene-summary {
            margin-bottom: ios.$ios-spacing-md;
            padding: ios.$ios-spacing-md;
            background: ios.$ios-background;
            border-radius: 12px;
            border: 1px solid rgba(ios.$ios-border, 0.3);
            
            &:last-child {
              margin-bottom: 0;
            }
            
            .scene-info {
              display: flex;
              justify-content: space-between;
              align-items: center;
              margin-bottom: ios.$ios-spacing-sm;
              
              .scene-name {
                font-size: ios.$ios-font-size-md;
                font-weight: ios.$ios-font-weight-semibold;
                color: ios.$ios-text-primary;
              }
              
              .scene-rating {
                display: flex;
                align-items: center;
                gap: ios.$ios-spacing-xs;
                
                .stars.mini {
                  display: flex;
                  gap: 1px;
                  
                  span {
                    font-size: ios.$ios-font-size-sm;
                    color: #FFD700;
                  }
                }
                
                .scene-score {
                  font-size: ios.$ios-font-size-sm;
                  font-weight: ios.$ios-font-weight-bold;
                  color: ios.$ios-text-secondary;
                }
              }
            }
            
            .scene-feedback {
              font-size: ios.$ios-font-size-sm;
              line-height: 1.6;
              color: ios.$ios-text-primary;
              padding: ios.$ios-spacing-sm ios.$ios-spacing-md;
              background: rgba(ios.$ios-background-secondary, 0.5);
              border-radius: 8px;
              border-left: 3px solid ios.$ios-success;
            }
          }
        }
        
        .optimization-suggestions {
          margin-bottom: ios.$ios-spacing-lg;
          padding: ios.$ios-spacing-lg;
          background: linear-gradient(135deg, rgba(ios.$ios-warning, 0.05), rgba(ios.$ios-warning, 0.02));
          border-radius: 16px;
          border: 1px solid rgba(ios.$ios-warning, 0.15);
          
          h6 {
            margin: 0 0 ios.$ios-spacing-md 0;
            font-size: ios.$ios-font-size-md;
            font-weight: ios.$ios-font-weight-bold;
            color: ios.$ios-warning;
            display: flex;
            align-items: center;
            gap: ios.$ios-spacing-sm;
            
            &::before {
              content: '💡';
              font-size: ios.$ios-font-size-lg;
            }
          }
          
          .suggestions-list {
            display: flex;
            flex-wrap: wrap;
            gap: ios.$ios-spacing-sm;
            margin-bottom: ios.$ios-spacing-md;
            
            .suggestion-tag {
              padding: 6px 14px;
              background: linear-gradient(135deg, rgba(ios.$ios-warning, 0.15), rgba(ios.$ios-warning, 0.08));
              color: color.adjust(ios.$ios-warning, $lightness: -20%);
              border-radius: 20px;
              font-size: ios.$ios-font-size-sm;
              font-weight: ios.$ios-font-weight-medium;
              border: 1px solid rgba(ios.$ios-warning, 0.3);
              transition: all 0.3s ease;
              
              &:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 8px rgba(ios.$ios-warning, 0.3);
                background: linear-gradient(135deg, rgba(ios.$ios-warning, 0.25), rgba(ios.$ios-warning, 0.15));
              }
            }
          }
          
          .custom-suggestion {
            padding: ios.$ios-spacing-md;
            background: ios.$ios-background;
            border-radius: 12px;
            border: 1px solid rgba(ios.$ios-border, 0.3);
            font-size: ios.$ios-font-size-sm;
            line-height: 1.6;
            color: ios.$ios-text-primary;
            
            strong {
              color: ios.$ios-warning;
              font-weight: ios.$ios-font-weight-bold;
              margin-right: ios.$ios-spacing-xs;
            }
          }
        }
        
        .review-actions {
          display: flex;
          gap: ios.$ios-spacing-sm;
          justify-content: flex-end;
          padding-top: ios.$ios-spacing-md;
          border-top: 1px solid rgba(ios.$ios-border, 0.2);
          
          .btn {
            padding: ios.$ios-spacing-sm ios.$ios-spacing-lg;
            border: none;
            border-radius: 24px;
            font-size: ios.$ios-font-size-sm;
            font-weight: ios.$ios-font-weight-semibold;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: ios.$ios-spacing-xs;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            
            &:hover {
              transform: translateY(-2px);
              box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            }
            
            &.btn-primary {
              background: linear-gradient(135deg, ios.$ios-primary, color.adjust(ios.$ios-primary, $lightness: -10%));
              color: white;
              
              &:hover {
                background: linear-gradient(135deg, color.adjust(ios.$ios-primary, $lightness: -5%), color.adjust(ios.$ios-primary, $lightness: -15%));
              }
            }
            
            &.btn-secondary {
              background: linear-gradient(135deg, ios.$ios-color-system-gray-1-light, color.adjust(ios.$ios-color-system-gray-1-light, $lightness: -10%));
              color: white;
              
              &:hover {
                background: linear-gradient(135deg, color.adjust(ios.$ios-color-system-gray-1-light, $lightness: -5%), color.adjust(ios.$ios-color-system-gray-1-light, $lightness: -15%));
              }
            }
            
            i {
              font-size: ios.$ios-font-size-xs;
            }
          }
        }
      }
    }
  }
  
  // 星星闪烁动画
  @keyframes starPulse {
    0%, 100% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.1);
      opacity: 0.8;
    }
  }
}