1/* In this section you start by assigning a shape to the letter and an assigned size. */2.card{3--rounded: 20px;4--size: 270px;5width:var(--size);6height:calc(var(--size) - 10px);7border-radius:var(--rounded);8background: #fff;9position: relative;10overflow: hidden;11cursor: pointer;12}1314/* With the before property assigns the gradient that will be used as background for the chart. */15.card::before{16--size: 100%;17--blur: 20px;18content:"";19position: absolute;20width:var(--size);21height:var(--size);22/* filter: blur(var(--blur)); */23background-color: #faff99;24background-image:radial-gradient(at 33% 82%,hsla(254,71%,69%,1) 0px, transparent 50%),25radial-gradient(at 28% 4%,hsla(289,96%,63%,1) 0px, transparent 50%),26radial-gradient(at 69% 49%,hsla(309,91%,71%,1) 0px, transparent 50%),27radial-gradient(at 94% 14%,hsla(232,66%,62%,1) 0px, transparent 50%),28radial-gradient(at 19% 93%,hsla(51,98%,74%,1) 0px, transparent 50%),29radial-gradient(at 15% 80%,hsla(194,87%,63%,1) 0px, transparent 50%),30radial-gradient(at 56% 52%,hsla(109,71%,61%,1) 0px, transparent 50%);31}3233/* Cover the chart with a light white tone, this helps the gradient colors to be less aggressive. */34.card::after{35--size: 100%;36content:"";37position: absolute;38width:var(--size);39height:var(--size);40background:rgba(255, 255, 255, 0.5);41}4243/*
44In this section you define where the video cover will be displayed.
45Modify the background-image with the address of the cover to use. */46.card__view{47position: absolute;48height: 55%;49left: 0;50top: 0;51right: 0;52margin: auto;53z-index: 1;54background-image:linear-gradient(to right bottom, #fff, #e2e2e2);55background-repeat: no-repeat;56background-size: cover;57}5859/* When hovering over the element you can see the video preview. */60/* Place in the HTML an "iframe" tag with the address of the youtube video to show as preview.
61 The iframe tag must be a child of the div with the class "card__view".
62 Also place a class with name "preview__video". */63.card:hover .preview__video{64opacity: 100;65}6667.preview__video{68transition: opacity 300ms;69opacity: 0;70}717273/* In this section you define the size and position of the section that will contain the video content. */74.card__content{75position: absolute;76z-index: 2;77width: 100%;78height: 40%;79left: 0;80right: 0;81bottom: 0;82padding-left: 9px;83padding-right: 9px;84color: #000;85display: flex;86flex-direction: column;87justify-content: space-between;88}8990.channel__video__name{91font-size: 0.8em;92margin-bottom: 10px;93max-height: 50%;94overflow: hidden;95text-overflow: ellipsis;96font-weight: bold;97color: #000;98}99100.channel__data{101display: flex;102align-items: center;103width: 100%;104gap: 10px;105margin-bottom: 8px;106}107108/* In this section you assign the image of the channel that owns the video, modify the parameter "background-image" by the address of the channel cover. */109.channel__img{110--size-channel: 35px;111--rounded: 50%;112--duration: 300ms;113min-width:var(--size-channel);114min-height:var(--size-channel);115border-radius:var(--rounded);116transition: transform var(--duration);117background-repeat: no-repeat;118background-size: cover;119background-color: #99cfff;120background-image:radial-gradient(at 6% 14%,hsla(234,90%,72%,1) 0px, transparent 50%),121radial-gradient(at 9% 73%,hsla(298,79%,64%,1) 0px, transparent 50%),122radial-gradient(at 50% 38%,hsla(196,72%,75%,1) 0px, transparent 50%),123radial-gradient(at 61% 82%,hsla(288,92%,79%,1) 0px, transparent 50%),124radial-gradient(at 91% 67%,hsla(170,86%,66%,1) 0px, transparent 50%),125radial-gradient(at 83% 29%,hsla(289,73%,63%,1) 0px, transparent 50%),126radial-gradient(at 93% 34%,hsla(191,88%,75%,1) 0px, transparent 50%);127}128129.channel__img:hover{130transform:scale(1.08);131}132133.channel__data__text{134display: flex;135flex-direction: column;136gap: 5px;137width: 100%;138}139140.channel__subdata{141display: flex;142gap: 10px;143}144145.channel__name{146font-size: 0.8em;147transition: color 400ms;148}149150.channel__views, .channel__date{151font-size: 0.6em;152}153154.card__view__data{155position: absolute;156bottom: 0;157width: 100%;158display: flex;159justify-content: flex-end;160gap: 10px;161padding: 8px;162box-sizing: border-box;163pointer-events: none;164}165166.card__lenght, .card__play__icon, .card__view__preview{167background:rgba(0, 0, 0, 0.5);168padding: 5px;169border-radius: 6px;170font-size: 0.6em;171font-weight: bold;172color:rgba(255, 255, 255, 0.7);173}174175.card__play__icon{176display: flex;177justify-content: center;178align-items: center;179min-width: 30px;180}181182.card__view__preview{183opacity: 0;184transform:translateY(-10px);185transition: opacity 900ms, transform 900ms;186}187188.card:hover .card__view__preview{189opacity: 100;190transform:translateY(0px);191}192193/* List of other colors you can use */194.card:nth-child(2n)::before{195background-color: #ffd399;196background-image:radial-gradient(at 15% 65%,hsla(249,84%,60%,1) 0px, transparent 50%),197radial-gradient(at 38% 24%,hsla(197,80%,66%,1) 0px, transparent 50%),198radial-gradient(at 65% 93%,hsla(228,83%,60%,1) 0px, transparent 50%),199radial-gradient(at 16% 58%,hsla(314,83%,72%,1) 0px, transparent 50%),200radial-gradient(at 77% 57%,hsla(298,90%,78%,1) 0px, transparent 50%),201radial-gradient(at 76% 95%,hsla(178,64%,76%,1) 0px, transparent 50%),202radial-gradient(at 15% 61%,hsla(248,75%,64%,1) 0px, transparent 50%);203}204205.card:nth-child(3n)::before{206background-color: #99b3ff;207background-image:radial-gradient(at 93% 72%,hsla(293,71%,70%,1) 0px, transparent 50%),208radial-gradient(at 28% 37%,hsla(252,81%,71%,1) 0px, transparent 50%),209radial-gradient(at 25% 59%,hsla(158,67%,62%,1) 0px, transparent 50%),210radial-gradient(at 48% 16%,hsla(197,69%,63%,1) 0px, transparent 50%),211radial-gradient(at 70% 56%,hsla(171,69%,70%,1) 0px, transparent 50%),212radial-gradient(at 7% 33%,hsla(65,65%,79%,1) 0px, transparent 50%),213radial-gradient(at 89% 22%,hsla(286,64%,72%,1) 0px, transparent 50%);214}215216.card:nth-child(4n)::before{217background-color: #e2ff99;218background-image:radial-gradient(at 22% 80%,hsla(265,77%,67%,1) 0px, transparent 50%),219radial-gradient(at 91% 77%,hsla(292,60%,78%,1) 0px, transparent 50%),220radial-gradient(at 66% 7%,hsla(46,95%,76%,1) 0px, transparent 50%),221radial-gradient(at 16% 32%,hsla(275,90%,75%,1) 0px, transparent 50%),222radial-gradient(at 26% 23%,hsla(283,60%,69%,1) 0px, transparent 50%),223radial-gradient(at 2% 64%,hsla(208,62%,62%,1) 0px, transparent 50%),224radial-gradient(at 62% 77%,hsla(112,88%,75%,1) 0px, transparent 50%);225}226227.card:nth-child(5n)::before{228background-color: #99d1ff;229background-image:radial-gradient(at 21% 94%,hsla(270,95%,76%,1) 0px, transparent 50%),230radial-gradient(at 56% 5%,hsla(252,65%,79%,1) 0px, transparent 50%),231radial-gradient(at 67% 94%,hsla(194,81%,67%,1) 0px, transparent 50%),232radial-gradient(at 15% 72%,hsla(304,97%,77%,1) 0px, transparent 50%),233radial-gradient(at 63% 56%,hsla(38,98%,63%,1) 0px, transparent 50%),234radial-gradient(at 41% 67%,hsla(321,61%,77%,1) 0px, transparent 50%),235radial-gradient(at 68% 68%,hsla(263,67%,69%,1) 0px, transparent 50%);236}