:root {
    --s-bar-1: 24%;
    --h-bar-1: 11%;
    --s-bar-2: 57.6%;
    --h-bar-2: 49.5%;
    --s-bar-3: 57.6%;
    --h-bar-3: 56.8%;
    --s-bar-4: 89.2%;
    --h-bar-4: 84.4%;
    --s-bar-5: 46%;
    --h-bar-5: 39%;
    --s-bar-color: linear-gradient(135deg, #22ccff 0%,#008fff 90%);
}

section.performance p {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

section.performance {
    display: flex;
    width: 100%;
    background: #052b43;
    padding: 80px 0;
    color:#ffffff;
    font-family: "Segoe UI","Open Sans",sans-serif;
}

.flex-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

h2.main-title {
    text-align: center;
    font-size: 38px;
    padding-bottom: 10px;
    color: white;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

h2.main-title + p {
  margin-bottom: 34px;
}

.to-graph-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding-bottom: 50px;
    padding-top: 8px;
    gap: 18px;
    width: 100%;
}

.to-graph-buttons a {
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    color: #2faac9;
    width: calc(100% / 4.3);
    padding: 18px 0;
    border-radius: 6px;
    background: #2acffe;
}

.to-graph-buttons a:hover {
    transform: scale(1.03);
    color: black;
    transition: transform 0.1s;
    cursor: pointer;
}

.to-graph-buttons a.active {
    transform: scale(1) !important;
    cursor: default;
    background: #038ee5;
    color: white !important;
    font-weight: bold;
    filter: drop-shadow(0px 2px 6px #00000054);
}

#perf-description {
    margin-bottom: 50px;
}

#perf-description h3 {
   font-weight: 600;
   font-size: 36px;
   color: #71ffee !important;
}

#perf-description p {
    font-weight: 600;
}

.hidden {
    display: none;
}

.graph-flexbox {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    font-family: "Segoe UI","Open Sans",sans-serif;
}

.vendors {
    display: grid;
    text-align: initial;
    align-content: space-around;
    padding-bottom: 2.6%;
    position: relative;
    width: 10%;
    white-space: nowrap;
}

.vendors p {
  display: flex;
  opacity: 0.4;
}

.CHT .vendors p {
  /* font-size: 13px; */
}

.vendors p:first-of-type {
  transform: scale(1.4) translateX(13px);
  opacity: 1;
}

.vendors img {
  position: absolute;
  left: -35px;
  width: 28px;
  align-self: center;
}

.animated-graph {
    position: relative;
    /* width: 61%; */
    width: 58%;
    margin-left: 3%;
}

.bar-chart {
    position: absolute;
    display: grid;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding-top: 2.8%;
    padding-bottom: 3.2%;
    box-sizing: border-box;
}

.bars {
    width: 100%;
    height: 56%;
    opacity: 0.3;
    position: relative;
}

.software-bar,
.hardware-bar {
    width: 0%;
    animation-fill-mode: forwards;
    animation-timing-function: linear;
}

.software-bar {
    /* background: #71ffee; */
    background: var(--s-bar-color);
    height: 100%;
    filter: drop-shadow(1px 4px 6px #00000059);
}

.hardware-bar {
    background: white;
    height: 34%;
}

.bars:nth-child(1){
    opacity: 1;
}

@keyframes s-bar1 {
    0%   { width: 0%; }
    100% { width: var(--s-bar-1); }
}

@keyframes h-bar1 {
    0%   { width: 0%; }
    100% { width: var(--h-bar-1); }
}

@keyframes s-bar2 {
    0%   { width: 0%; }
    100% { width: var(--s-bar-2); }
}

@keyframes h-bar2 {
    0%   { width: 0%; }
    100% { width: var(--h-bar-2); }
}

@keyframes s-bar3 {
    0%   { width: 0%; }
    100% { width: var(--s-bar-3); }
}

@keyframes h-bar3 {
    0%   { width: 0%; }
    100% { width: var(--h-bar-3); }
}

@keyframes s-bar4 {
    0%   { width: 0%; }
    100% { width: var(--s-bar-4); }
}

@keyframes h-bar4 {
    0%   { width: 0%; }
    100% { width: var(--h-bar-4); }
}

@keyframes s-bar5 {
    0%   { width: 0%; }
    100% { width: var(--s-bar-5); }
}

@keyframes h-bar5 {
    0%   { width: 0%; }
    100% { width: var(--h-bar-5); }
}

g.grid-lines line {
    fill:none;
    stroke:#5a6e79;
    stroke-miterlimit:10;
}

rect.background {
    fill:none;stroke: #5A6E79;
    stroke-miterlimit: 10;
}

g.units text {
    font-size:12px;
    fill:#fff;
    font-family: "Segoe UI","Open Sans",sans-serif;
    font-weight:700;
    opacity: 0.8;
}

.ultra-fast {
    order: 3;
    display: grid;
    /* grid-template-rows: auto 22px auto auto; */
    grid-template-rows: auto;
    text-align: initial;
    font-size: 20px;
    line-height: 1;
    /* width: 197px; */
    width: 21%;
}

p.fast {
    font-size: clamp(52px,8vw,100px);
    font-family: "Segoe UI","Open Sans",sans-serif;
    font-style: italic;
    letter-spacing: 4px;
    transform: scale(1, 1.4);
    opacity: 0;
    filter:
    drop-shadow(-5px 0px 0px #71ffee57)
    drop-shadow(-10px 0px 0px #71ffee57);
    /* animation-name: fast; */
    animation-duration: 0.8s;
    cubic-bezier: (0.01, 0.44, 0.58, 0.99);
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    line-height: 1 !important;
}

.CHT p.fast {
  align-self: baseline;
}

.FRA p.fast {
  font-size: clamp(52px,5vw,90px);
}

p.fast + p {
    line-height: 1 !important;
}

@keyframes fast {
    0%   {
        transform: translate(-380%, -16%) scale(0, 0);
        opacity: 0;
        filter:
        drop-shadow(-5px 0px 0px #71ffee57)
        drop-shadow(-10px 0px 0px #71ffee57)
        drop-shadow(0px 0px 0px #71ffee57);}

    90% {
        transform: translate(10%, -16%) scale(1, 1.4);
        opacity: 1;
        filter:
        drop-shadow(-5px 0px 0px #71ffee57)
        drop-shadow(-10px 0px 0px #71ffee57)
        drop-shadow(0px 0px 0px #71ffee57);}

    100% {
        transform: translate(0%, 0%) scale(1, 1.4);
        opacity: 1;
        filter:
        drop-shadow(-5px 0px 0px #71ffee57)
        drop-shadow(-10px 0px 0px #71ffee57)
        drop-shadow(0px 0px 0px #71ffee57);}
}

.performance-speed {
    font-size: 100px;
    font-weight: 700;
    color: #ffffff;
    line-height: 0.8 !important;
}

.performance-speed + p {
    line-height: 1;
}

p.performance-speed::after {
    content: "x";
    font-size: 0.9em;
    padding-left: 5px;
}

.CHT p.performance-speed::after,
.CHS p.performance-speed::after {
    content: "倍";
    font-size: clamp(24px,3vw,0.6em);
}

.graph-legend {
    order: 4;
    display: grid;
    grid-template-columns: 18% 60% auto;
    /* grid-template-rows: 1fr 1fr; */
    width: 100%;
}

/* .FRA .graph-legend,
.DEU .graph-legend,
.ESP .graph-legend {
    grid-template-columns: 17% 58% auto;
} */

/* .ITA .graph-legend {
   grid-template-columns: 18.3% 62.2% auto;
} */

/* .JPN .graph-legend {
  grid-template-columns: 17.5% 62% auto;
} */

.CHT .graph-legend {
  /* fix eBug:WCL211227-0009 */
  /* grid-template-columns: 31% 106% auto; */
}

.CHS .graph-legend {
  /* fix eBug:WCL211227-0009 */
  /* grid-template-columns: 29% 103%; */
}

.time-sec,
.percentage-sign {
    text-align: end;
}

.percentage-sign {
  padding-right: 4% !important;
}

.time-sec,
.percentage-sign,
.encoding-type,
.encoding-info {
    grid-column: 2 / span 1;
}

.encoding-info {
  margin-top: 5px !important;
  opacity: 0.4;
  text-align: initial;
  font-size: 13px;
  line-height: 1.3;
}

.encoding-type {
    display: flex;
}

.encoding-type p {
    margin-right: 25px !important;
    display: flex;
    align-items: baseline;
}

.encoding-type p::before {
    content: "";
    float: left;
    width: 40px;
    height: 12px;
    background: var(--s-bar-color);
    margin-right: 8px;
}

.encoding-type p:nth-child(2)::before {
    background: white;
}

/* --------------------------------------
       Tablet responsive layout
-------------------------------------- */

@media (max-width: 1100px) {
  .flex-content {
    padding: 0 24px;
  }

  .to-graph-buttons a {
      width: calc(100% / 4.4);
  }

  .vendors {
    width: 12%;
  }

  .vendors p:first-of-type {
    transform: scale(1.1) translateX(32px);
    font-size: clamp(8px,1.4vw,15px);
    font-weight: bold;
  }

  .CHT .vendors p {
    /* font-size: 11px; */
  }

  .vendors img {
    /* display: none; */
  }

  .animated-graph {
      /* width: 59.6%; */
      width: 57%;
      margin-left: 2%;
  }

  p.fast {
    font-size: clamp(52px,8vw,90px);
  }

  p.fast + p {
    font-size: 2.3vw;
  }

  .performance-speed {
    font-size: clamp(40px,12vw,90px);
  }

  .performance-speed + p {
    font-size: 1.8vw;
  }

  .graph-legend {
      grid-template-columns: 18% 59% auto;
      width: 100%;
  }
}

/* --------------------------------------
       Tablet responsive layout
-------------------------------------- */

/* @media (max-width: 1024px) {
  .flex-content {
    padding: 0 24px;
  }

  .vendors p:first-of-type {
    transform: scale(1.3) translateX(11px);
  }

  .vendors img {
  }
} */


/* --------------------------------------
       Mobile responsive layout
-------------------------------------- */

@media (max-width: 770px) {

  .flex-content {
    padding: 0;
  }

  h2.main-title {
    font-size: 6vw;
    padding: 18px;
  }

  h2.main-title + p {
    padding: 0 18px;
}

  .to-graph-buttons {
    flex-wrap: wrap;
    width: 92%;
    margin: 0 auto;
    padding-bottom: 25px;
}

  .to-graph-buttons a {
    width: 48.6%;
    margin-bottom: 10px;
  }

  .desc {
    padding: 0 18px;
  }

  #perf-description h3 {
    font-size: 5vw;
}

 #perf-description p {
    font-size: 3vw;
}

 #perf-description {
    margin-bottom: 22px;
}

.graph-flexbox {
    display: grid;
    grid-template-columns: 20% 75%;
    grid-template-rows: -webkit-max-content -webkit-max-content;
    padding: 0 20px;
}

.vendors {
    padding-bottom: 0;
    width: max-content;
}

.vendors img {
  position: unset;
  width: clamp(16px,4vw,25px);
  padding-right: 8%;
}

.vendors p {
  font-size: clamp(6px,2vw,12px);
}

.vendors p:first-of-type {
  transform: scale(1.1);
  /* transform: initial; */
  font-weight: 600;
  font-size: clamp(6px,2.5vw,15px);
}

.vendors p:last-of-type {
  padding-bottom: 17%;
}

.animated-graph {
    width: 95%;
    height: 95%;
    margin: 0 auto;
}

.graph-legend {
  order: 3;
  grid-column: 1 / span 2;
  grid-template-columns: 1fr;
  grid-template-rows: min-content;
}

.time-sec,
.percentage-sign {
  font-size: clamp(8px, 2.2vw, 14px);
  line-height: 1;
}

.encoding-type p {
  font-size: clamp(8px, 2.2vw, 14px);
  float: left;
}

.encoding-type p::before {
  width: 5vw;
  min-width: 17px;
  max-width: 24px;
  height: 1.8vw;
  min-height: 6px;
  max-height: 13px;
}

.encoding-info {
  margin-top: 0 !important;
  font-size: clamp(9px, 2.2vw, 14px);
  line-height: 1.5 !important;
}

.ultra-fast {
  grid-column: 1 / span 2;
  display: flex;
  flex-direction: column;
  padding: 18px 0;
  width: 100%;
  height: -webkit-fit-content;
  text-align: center;
}

p.fast {
  font-weight: bold;
  font-size: clamp(20px, 18vw, 65px);
  display: none;
}

p.fast + p {
  font-size: clamp(10px, 4.2vw, 24px);
  /* margin-top: 7%; */
}

.performance-speed {
  font-weight: bold;
  font-family: "Segoe UI","Open Sans",sans-serif;
  line-height: 1 !important;
  font-size: 15.6vw;
}

.performance-speed + p {
  font-size: clamp(10px, 4.2vw, 24px);
}

}

@media (max-width: 520px) {

  .to-graph-buttons {
    width: 75%;
    margin: 0 auto;
    padding-bottom: 0;
    flex-direction: column;
    gap: 0;
  }

  .to-graph-buttons a {
    width: 100%;
    margin-bottom: 20px;
    margin-right: 0 !important;
  }

  .graph-flexbox {
    grid-template-columns: 20% 80%;
  }

  .vendors p {
    font-size: clamp(6px,2.5vw,15px);
  }

  .vendors p:first-of-type {
    /* transform: scale(1.1); */
    transform: initial;
    /* font-size: clamp(6px,2.5vw,15px); */
    margin-left: -8px;
  }

  .encoding-info {
    font-size: clamp(5px,1.8vw,14px);
  }

}
