<template>
  <div id="report_container">

    <!-- 头部信息 -->
    <view class="user_info">
      <img :src="userinfo.portrait" />
      <view class="info_wrap">
        <view class="box_wrap">
          <text>{{ record.user_name }}</text>
          <text>{{ record.phone }}</text>
        </view>
        <view class="box_wrap info_right">
          <text>{{ record.start_time }}</text>
          <text>训练时间 : {{ record.play_time }}</text>
        </view>

      </view>
    </view>
    <div class="bran_wrap">
      <img
        src="http://img.shuimuai.com/report_ brain_coefficient.png"
        alt=""
      >
      <div class="bran">
        <p class="p_num">{{record.ratio}}</p>
        <p class="p_text">智脑系数</p>
      </div>
    </div>
    <!--    训练时长和训练设备  -->
    <!-- <view class="po1 padding-lr margin-top-xl">
      <van-row>
        <van-col span="11">
          <view>
            <text>训练时长</text>
            <text class="text-bold text-xl"> &nbsp; {{ record.play_time }}</text>
          </view>
        </van-col>

        <van-col
          span="11"
          offset="2"
        >
          <view>
            <text>训练设备</text>
            <text class="text-bold text-xl">&nbsp; {{ record.name }}</text>
          </view>
        </van-col>
      </van-row>
    </view> -->
    <view>
      <van-divider
        contentPosition="left"
        borderColor="#E98F36"
      >
        <van-image
          src="https://img.shuimuai.com/line.png"
          alt=""
          width="40"
          height="40"
        ></van-image>
      </van-divider>
    </view>

    <!--    专注力维持区间、受干扰次数，专注力最大爆发值、专注力启动时长-->
    <view class="margin-tb">
      <!-- 高专注力占比 -->
      <view class="margin_left">
        <view class="hight_pie_chart">
          <mpvue-echarts
            :echarts="echarts"
            :onInit="hight_att_charts"
            canvasId="demo-canvas-interfere"
          />
        </view>
        <view class="left_content">
          <view class="left_num">{{ record.height_absorbed }}%</view>
          <view class="left_text">高专注力占比</view>
        </view>
      </view>
      <!-- 数据详情 -->
      <view class="margin_centent">
        <view class="detail">
          <te class="detail_num">{{ record.scope_diff }}</te>
          <view>专注力维持区间</view>
        </view>
        <view class="detail">
          <view class="detail_num">{{ record.interfere }}</view>
          <view>受干扰次数</view>
        </view>
        <view class="detail">
          <view class="detail_num">{{ record.burst }}</view>
          <view>专注力最大爆发值</view>
        </view>
        <view class="detail">
          <view class="detail_num">{{ record.start }}</view>
          <view>专注力启动时长</view>
        </view>
      </view>

      <!-- 平均专注力 -->
      <view class="margin_right ">
        <view class="right_num">{{ record.att_average }}</view>
        <view class="right_text">平均专注力</view>
      </view>

    </view>

    <view class="bar">
      <view>
        <view class="line"></view>
        <view class="title">专注力要素分析</view>
      </view>
    </view>

    <view class="radar_chart">
      <mpvue-echarts
        :echarts="echarts"
        :onInit="radar_charts"
        canvasId="demo-canvas2"
      />
    </view>

    <view class="">
      <view class="bar">
        <view>
          <view class="line"></view>
          <view class="title">报告分析</view>
        </view>
      </view>
      <view class="conclution">{{ record.content }}</view>
      <!-- <view class="conclution">{{ record.content2 }}</view> -->

      <view class="bar">
        <view>
          <view class="line"></view>
          <view class="title">训练建议</view>
        </view>
      </view>
      <view class="conclution">{{ record.advise }}</view>
    </view>

    <view class="bar">
      <view>
        <view class="line"></view>
        <view class="title">专注力数值曲线</view>
      </view>
    </view>

    <view class="chart">
      <mpvue-echarts
        :echarts="echarts"
        :onInit="attCharts"
        canvasId="demo-canvas"
      />
    </view>
    <view
      class="section_container"
      v-if="is_cut"
    >
      <van-tabs
        :active="0"
        color="#6858C4"
        type="card"
        @change="changeMin"
      >
        <van-tab
          :name="index"
          :title="(5*index)+'-'+(5*(index+1)) + '分钟'"
          v-for="(section,index) in data_section"
          :key="index"
        ></van-tab>
      </van-tabs>
    </view>

    <view class="cu-bar bg-white">
      <view class="action">
        <text class="cuIcon-titles text-primary"></text>
        <text class="">专注力数值累计比例</text>
      </view>
    </view>
    <view class="chart">
      <mpvue-echarts
        :echarts="echarts"
        :onInit="pie_charts"
        canvasId="demo-canvas-1"
      />
    </view>
    <!-- 核销详情 -->
    <view class="bar">
      <view>
        <view class="line"></view>
        <view class="title">核销详情</view>
      </view>
    </view>
    <view class="sheet">
      <view class="left">
        <view>专注力训练设备： {{ record.name }}</view>
      </view>
      <view class="right">
        <view>核销方式：
          <text v-if="record.consumption_type==1">次卡</text>
          <text v-if="record.consumption_type==2">时间卡</text>
        </view>
      </view>
    </view>
    <!-- 专注力变化看板 -->
    <view class="absorbed_change">
      <view class="interfere_title_wrap">
        <view class="line"></view>
        <view class="title">专注力变化分析</view>
      </view>
      <!-- 看板一 干扰 -->
      <view class="interfere_wrap">
        <view class="interfere">
          <img
            src="http://img.shuimuai.com/program_interfere_log.png"
            alt=""
            class="interfere_logo"
          >
          <view class="interfere_text">
            受干扰次数:
            <title class="interfere_text_num"> {{record.interfere}}</title>
            次
          </view>
        </view>
        <!-- 表图 -->
        <view class="interfere_echarts_wrap">
          <view class="interfere_echarts">
            <mpvue-echarts
              :echarts="echarts"
              :onInit="interfere_charts"
              canvasId="demo-canvas-4"
            />
          </view>
          <view class="interfere_echarts_bottom">
            <text>0</text>
            <text>2</text>
            <text>4</text>
            <text>6</text>
            <text>8</text>
            <text>10</text>
            <text>12</text>
            <text>14</text>
            <text>16</text>
            <text>18</text>
            <text>20</text>
          </view>
        </view>
        <view class="interfere_footer">
          <title class="interfere_footer_logo"></title>专注力干扰
        </view>
      </view>

      <!-- 调整能力分析 -->
      <view class="adjustment_warp">
        <view class="adjustment_title">
          <img
            src="http://img.shuimuai.com/program_rise_log.png"
            alt=""
            class="adjustment_title_logo"
          >
          <text>调整能力分析</text>
        </view>
        <!-- 表图 -->
        <view class="adjustment_echarts_wrap">
          <view class="adjustment_echarts">
            <mpvue-echarts
              :echarts="echarts"
              :onInit="adjustment_charts"
              canvasId="demo-canvas-5"
            />
          </view>
          <view class="adjustment_echarts_bottom">
            <text>0</text>
            <text>2</text>
            <text>4</text>
            <text>6</text>
            <text>8</text>
            <text>10</text>
            <text>12</text>
            <text>14</text>
            <text>16</text>
            <text>18</text>
            <text>20</text>
          </view>
        </view>
        <view class="adjustment_footer">
          <view class="adjustment_footer_logo"></view>专注力上升
        </view>
      </view>

      <!-- 爆发值和调整时间 -->
      <view class="absorbed_change_footer">
        <view class="footer_text">
          最大爆发值:
          <text class="footer_text_W">{{ record.burst }}</text>
        </view>
        <view class="footer_text">
          平均调整时间:
          <text class="footer_text_W">{{ record.burstTime}}</text>
          s
        </view>
      </view>

    </view>

    <van-toast id="van-toast" />

  </div>
</template>

<script>
import mpvueEcharts from "mpvue-echarts";
import echarts from "../../../static/echarts.min";
import util, {
  filterPieData,
  formatSeconds,
  getHightPieChartOption,
  getPieChartsOption,
  getRadarChartOption,
  timestampToTimeS,
  getInterfereChartsOption,
  interfereAction,
  getAdjustmentChartsOption,
} from "../../utils/index";
import { gameDetail, gameLineChart } from "../../requests/game";
import game_store from "../../store/game";
import Toast from "../../../static/vant/toast/toast";

var att_charts,
  hight_att_pie_charts,
  radar_charts,
  $pie_charts,
  $interfere_echarts,
  $adjustment_echarts,
  $this;

// 大脑图表初始化
function initAttChart(canvas, width, height) {
  att_charts = echarts.init(canvas, null, {
    width: width,
    height: height,
  });
  canvas.setChart(att_charts);

  var option = util.getLineOption([0], [0]); // ECharts 配置项

  att_charts.setOption(option);

  return att_charts; // 返回 chart 后可以自动绑定触摸操作
}

// 大脑图表初始化
function initHightPieChart(canvas, width, height) {
  hight_att_pie_charts = echarts.init(canvas, null, {
    width: width,
    height: height,
  });
  canvas.setChart(hight_att_pie_charts);

  var option = getHightPieChartOption(0, 0); // ECharts 配置项

  hight_att_pie_charts.setOption(option);

  return hight_att_pie_charts; // 返回 chart 后可以自动绑定触摸操作
}

// 大脑图表初始化
function initRadarChart(canvas, width, height) {
  radar_charts = echarts.init(canvas, null, {
    width: width,
    height: height,
  });
  canvas.setChart(radar_charts);

  var option = getRadarChartOption(0); // ECharts 配置项

  radar_charts.setOption(option);

  return radar_charts; // 返回 chart 后可以自动绑定触摸操作
}

function initPieChart(canvas, width, height) {
  $pie_charts = echarts.init(canvas, null, {
    width: width,
    height: height,
  });
  canvas.setChart($pie_charts);

  var option = getPieChartsOption(); // ECharts 配置项

  $pie_charts.setOption(option);

  return $pie_charts; // 返回 chart 后可以自动绑定触摸操作
}

// 干扰图表初始化 interfere_echarts
function interfereChart(canvas, width, height) {
  $interfere_echarts = echarts.init(canvas, null, {
    width: width,
    height: height,
  });
  canvas.setChart($interfere_echarts);

  var option = getInterfereChartsOption(); // ECharts 配置项

  $interfere_echarts.setOption(option);

  return $interfere_echarts; // 返回 chart 后可以自动绑定触摸操作
}
// 调整能力表初始化 interfere_echarts
function adjustmentCharts(canvas, width, height) {
  $adjustment_echarts = echarts.init(canvas, null, {
    width: width,
    height: height,
  });
  canvas.setChart($adjustment_echarts);

  var option = getAdjustmentChartsOption(); // ECharts 配置项

  $adjustment_echarts.setOption(option);

  return $adjustment_echarts; // 返回 chart 后可以自动绑定触摸操作
}

export default {
  name: "index_container",
  components: {
    mpvueEcharts,
  },
  data() {
    return {
      // 0:未选择 1：时间 2：次数
      // 折线图 表格数据
      attCharts: initAttChart,
      hight_att_charts: initHightPieChart,
      radar_charts: initRadarChart,
      pie_charts: initPieChart,
      interfere_charts: interfereChart,
      adjustment_charts: adjustmentCharts,

      echarts,
      record: {},
      userinfo: {},
      record_id: 0,

      //是否截断数据
      is_cut: false,
      //数据截断数
      data_section: 0,
      //数据集合
      data_lines: [],
      //  干扰值
      interfereData: [],
      // 调整能力值
      adjustmentData: [],
    };
  },
  methods: {
    //  获取游戏报告
    get_report($record_id) {
      $this.record = {};
      Toast.loading({
        forbidClick: true,
        message: "加载中",
        duration: 0,
      });
      setTimeout(() => {
        gameDetail($record_id).then(
          (res) => {
            Toast.clear();
            let $res = res.data;
            $this.record = $res.data;

            // console.log("成绩记录数据", $res.data.interfereArr);
            // console.log("数据长度：", $res.data.line);

            $this.record.play_time = formatSeconds($this.record.play_time);
            $this.record.start_time = timestampToTimeS($this.record.start_time);
            $this.record.height_absorbed = Math.ceil(
              $this.record.height / $this.record.total * 100
            );
            let $options = getHightPieChartOption(
              $this.record.height,
              $this.record.total
            );
            hight_att_pie_charts.setOption($options);

            //设置雷达图
            $options = getRadarChartOption([
              $this.record.att_average, //平均
              $this.record.att_scope, //广度
              $this.record.att_burst, //爆发
              $this.record.att_interfere, //抗干扰
              $this.record.att_start, //启动
              $this.record.att_height, // 高专注占比
            ]);
            radar_charts.setOption($options);

            let $pie_data = filterPieData($this.record.level);
            let $pie_option = getPieChartsOption($pie_data);
            $pie_charts.setOption($pie_option);

            //5分钟阶段
            let $five_min = 5 * 60;
            $this.is_cut = $this.record.play_time > $five_min;
            if ($this.is_cut) {
              //截断得数量
              $this.data_section = Math.ceil(
                $this.record.play_time / $five_min
              );
            }

            // 干扰值数据传输
            $this.interfereData = interfereAction($res.data.interfereArr);
            let $interfere_option = getInterfereChartsOption(
              $this.interfereData
            );
            $interfere_echarts.setOption($interfere_option);
            // 调整能力数据传输
            $this.adjustmentData = interfereAction($res.data.burstArr);
            let $adjustment_option = getAdjustmentChartsOption(
              $this.adjustmentData
            );
            $adjustment_echarts.setOption($adjustment_option);
          },
          (err) => {
            Toast.fail("错误代码：" + res.code + "，联系客服");
          }
        );
      }, 800);
    },
    get_game_line($record_id) {
      let $params = {
        game_record_id: $record_id,
      };
      gameLineChart($params).then(
        (res) => {
          let $res = res.data;
          let $option = {};
          setTimeout(() => {
            let $line_data = $res.data.line;
            if ($this.is_cut) {
              //需要截断数据
              let $more_than_count = $line_data.length % $this.data_section;
              let i = 0;
              //根据多出来的数 删除结尾得数量
              for (i = 0; i < $more_than_count; i++) {
                $line_data.pop();
              }

              $this.data_lines = [];
              //获取每一组得数据长度
              let $item_len = $line_data.length / $this.data_section;
              for (i = 0; i < $this.data_section; i++) {
                $this.data_lines.push(
                  $line_data.slice(i * $item_len, (i + 1) * $item_len)
                );
              }

              $option = util.getLineOption($this.data_lines[0], [0]);
            } else {
              $option = util.getLineOption($line_data, [0]);
            }
            att_charts.setOption($option);
          }, 800);
        },
        (err) => {
          Toast.fail("错误代码：" + res.code + "，联系客服");
        }
      );
    },
    to_game_records() {
      mpvue.navigateTo({
        url: "/pages/game_record/main",
      });
    },
    //  切换时间查看线 数据
    changeMin($e) {
      let $index = $e.mp.detail.name;
      let $option = util.getLineOption($this.data_lines[$index], [0]);
      att_charts.setOption($option);
    },
  },
  mounted() {
    $this.userinfo = wx.getStorageSync("userinfo");
    //设置游戏时间长
    wx.removeStorageSync("played_time");
    $this.get_report($this.record_id);
    $this.get_game_line($this.record_id);
  },
  created() {
    $this = this;
  },
  onLoad(options) {
    $this.record_id = options.id
      ? options.id
      : game_store.getters.getGameRecordId();
  },
};
</script>

<style scoped>
#report_container {
  background: white;
  padding-top: 10px;
  padding-bottom: 10px;
}
/* 头部椭圆 */
.head {
  width: 442px;
  height: 385px;
  background-color: #4b3ab0;
  border-radius: 50%;
  position: absolute;
  left: -34px;
  top: -252px;
  z-index: -1;
}

/* 头部个人信息 */
image.boy {
  width: 110px;
  height: 111px;
  position: absolute;
  left: 225px;
  top: 45px;
}

.user_info {
  width: 95%;
  height: 51px;
  display: flex;
  margin: 0 auto;
  margin-bottom: 10px;
  align-items: center;
  padding-right: 10px;
  box-sizing: border-box;
  box-shadow: 0px 0px 10px rgba(51, 56, 74, 0.11);
  border-radius: 5px;

  background: #fff;
}
.user_info img {
  display: inline-block;
  width: 40px;
  height: 40px;
  margin-left: 10px;
  margin-right: 8px;
}
.user_info .info_wrap {
  display: flex;
  justify-content: space-between;
  flex: 1;
}

.user_info .box_wrap {
  display: flex;
  flex-direction: column;
  color: #676767;
}
/* 智脑系数 */
.bran_wrap {
  width: 100%;
  height: 101px;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}
.bran_wrap img {
  display: inline-block;
  width: 60px;
  height: 68px;
  margin-right: 20px;
}
.bran_wrap .bran {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}
.bran_wrap .bran .p_num {
  color: #ffb72d;
  font-size: 40px;
  font-weight: 900;
}
.bran_wrap .bran .p_text {
  color: #333333;
  font-size: 12px;
  font-weight: 900;
}
/* 详细数据 */
.margin-tb {
  width: 95%;
  height: 110px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  background: #f3f3f3;
  border-radius: 5px;
}
.margin-tb .margin_left {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.margin-tb .margin_left .left_content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #676767;
}
.margin-tb .margin_left .left_content .left_num {
  font-size: 16px;
  font-weight: 900;
}
.margin-tb .margin_left .left_content .left_text {
  font-size: 8px;
}
.margin-tb .margin_centent {
  flex: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}
.margin-tb .margin_right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #90df24;
  box-sizing: border-box;
  padding: 0 3px;
}
.margin-tb .margin_right .right_num {
  font-size: 25px;
  font-weight: 900;
  margin-bottom: 10px;
}
.margin-tb .margin_right .right_text {
  width: 90%;
  height: 20px;
  background: #90df24;
  color: #fff;
  text-align: center;
  line-height: 20px;
  font-size: 10px;
  border-radius: 1px;
}
.margin-tb .detail {
  width: 48%;
  height: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #676767;
  font-size: 11px;
}
.margin-tb .detail .detail_num {
  font-size: 18px;
  font-weight: 900;
}
/* .detail view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  color: #6c6c6c;
  font-size: 10px;
}

.detail view view:first-child {
  color: #000;
  font-size: 30px;
}  */

/* 小标题 */
.bar {
  width: 100%;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  box-sizing: border-box;
  margin: 11px 0;
}

.bar view {
  display: flex;
  align-items: center;
  justify-content: start;
}

.conclution {
  width: 100%;
  padding: 5px 19px 8px;
  font-size: 12px;
  color: #6c6c6c;
  box-sizing: border-box;
}

.conclution_title {
  font-weight: 600;
  color: #000;
}

.bar .line {
  width: 4px;
  height: 15px;
  background-color: #5d4db8;
  margin-right: 7px;
}

.bar .title {
  color: #010101;
  font-size: 15px;
}

/* 图表 */
#mychart-dom-multi-line {
  width: 360px;
  height: 193px;
}

.chart {
  margin: 0 auto;
  width: 360px;
  height: 193px;
  background: #f3f3f3;
  opacity: 0.6;
  border-radius: 10px;
  box-shadow: 0px 6px 11px #dadada;
}

/*雷达图*/
.radar_chart {
  margin: 0 auto;
  width: 360px;
  height: 293px;
  background: #f3f3f3;
  opacity: 0.6;
  border-radius: 10px;
  box-shadow: 0px 6px 11px #dadada;
}

.hight_pie_chart {
  /* margin: 0 auto; */
  width: 100%;
  height: 50px;
  background: #f3f3f3;
  margin-top: 15px;
  /*border-radius: 10px;*/
  /*box-shadow: 0px 6px 11px #dadada;*/
}

/* 核销详情 */
.sheet {
  color: #6d6d6d;
  font-size: 12px;
  display: flex;
  padding: 0 16px;
  box-sizing: border-box;
}

.sheet .left,
.sheet .right {
  height: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}

.sheet .left {
  width: 195px;
}

.content_card {
  border-radius: 10px;
  box-shadow: 0px 6px 11px #dadada;
}
/* 专注力干扰看板 */
.absorbed_change {
  width: 100%;
  padding: 0 7px;
  box-sizing: border-box;
  margin-top: 40px;
}

.absorbed_change .line {
  width: 4px;
  height: 15px;
  background-color: #5d4db8;
  margin-right: 7px;
}

.absorbed_change .title {
  color: #010101;
  font-size: 15px;
}
.interfere_title_wrap {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  border-top: 1px solid #e5e5e5;
}
/* 干扰 标题*/
.interfere {
  display: flex;
  margin-left: 8px;
  height: 54px;
  align-items: center;
  margin-bottom: 14px;
}
.interfere .interfere_logo {
  display: inline-block;
  width: 19px;
  height: 19px;
  margin-right: 7px;
}
.interfere .interfere_text {
  font-size: 15px;
  color: #676767;
}

.interfere .interfere_text .interfere_text_num {
  font-size: 18px;
  font-weight: 900;
}
/* 干扰 echarts */
.interfere_echarts_wrap {
  width: 360px;
  height: 193px;
  background: #f3f3f3;
  opacity: 0.6;
  box-shadow: 0px 6px 11px #dadada;
}
.interfere_echarts {
  /* margin: 0 auto; */
  width: 100%;
  height: 173px;
  /* background: #f3f3f3;
  opacity: 0.6;
  box-shadow: 0px 6px 11px #dadada; */
}
.interfere_echarts_bottom {
  margin: 0 auto;
  width: 90%;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 15px;
  color: #828282;
}
/* 干扰 bottom */
.interfere_footer {
  width: 100%;
  height: 26px;
  font-size: 13px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #676767;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}
.interfere_footer .interfere_footer_logo {
  display: inline-block;
  width: 13px;
  height: 13px;
  background-color: #23cc92;
  margin-right: 5px;
}
/* 调整能力 */
.adjustment_warp {
  margin-top: 50px;
}
.adjustment_title {
  display: flex;
  color: #676767;
  font-size: 15px;
  padding-left: 8px;
  box-sizing: border-box;
  margin-bottom: 35px;
}
.adjustment_title .adjustment_title_logo {
  display: inline-block;
  width: 19px;
  height: 19px;
  margin-right: 7px;
}
/* 调整能力表图 */
.adjustment_echarts_wrap {
  margin: 0 auto;
  width: 360px;
  height: 193px;

  background: #f3f3f3;
  opacity: 0.6;
  box-shadow: 0px 6px 11px #dadada;
}
.adjustment_echarts {
  width: 100%;
  height: 173px;
}
.adjustment_echarts_bottom {
  margin: 0 auto;
  width: 90%;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 15px;
  color: #828282;
}
.adjustment_footer {
  width: 100%;
  height: 26px;
  font-size: 13px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #676767;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}
.adjustment_footer .adjustment_footer_logo {
  display: inline-block;
  width: 13px;
  height: 13px;
  background-color: #f3a100;
  margin-right: 5px;
}
/* 爆发值和调整时间 */
.absorbed_change_footer {
  display: flex;
  justify-content: space-around;
  margin-top: 28px;
}

.absorbed_change_footer .footer_text {
  font-size: 16px;
  color: #676767;
}
.footer_text_W {
  font-size: 21px;
  font-weight: 600;
}
.test {
  color: rgb(163, 7, 7);
}
</style>
