@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
* {font-family: 'Roboto', sans-serif;}

body, html {
    margin: 0px;
    padding: 0px;
}
main {
    margin: 0px;
    padding: 0px;
    background-color: #fa0;
}
a {
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
    color:#000;
}
pre{
    background-color: #000;
    color: #019e01;
    font-weight:bolder;
    font-size: 14px;
    width: 350px;
    margin: 10px auto 0px;
    padding: 20px 0px 0px 0px;
    border: 4px solid #019e01;
    border-radius: 30px;
    position:relative;
}
pre::before {
    content: 'CSS->';
    position: absolute;
    top: 20px;
    left: -100px;
    font-weight: bolder;
    font-size: 2rem;
}
h1{
    background-color: #f00;
    color: aqua;
    padding: 4px 4px 4px 16px;
}
h2 {
    margin:20px 20px 0px 20px;
    padding: 4px 4px 4px 16px;
    background-color: blueviolet;
    color:#fff;
}
.indice {
    margin-right: 40px;
    background-color: #019e01;
    padding:8px;
    width:fit-content;
    margin-left: 90%;
    border-radius: 10px;
    border: 2px solid #4c2080;
    box-shadow:4px 4px 8px #888;
}
.item {
    border: 2px solid #000;
    background-color: #888;
    color: #000;
    width: 50px;
    height: 50px;
    font-size: 26px;
    text-align: center;
    font-weight: bold;
}
.item2 { /*lo usamos a partir del punto 3 */
    border: 2px solid #000;
    background-color: #888;
    color: #000;
    width: 99%;
    height: 50px;
    font-size: 26px;
    text-align: center;
    font-weight: bold;
}
.item3 { /*lo usamos a partir del punto 3 */
    border: 2px solid #000;
    background-color: #888;
    color: #000;
    width: 40%;
    height: 50px;
    font-size: 26px;
    text-align: center;
    font-weight: bold;
}
.item4 { /*lo usamos a partir del punto 3 */
    border: 2px solid #000;
    background-color: #888;
    color: #000;
    width: 100px;
    height: 50px;
    font-size: 26px;
    text-align: center;
    font-weight: bold;
}
.item5 { /*lo usamos a partir del punto 3 */
    border: 2px solid #000;
    background-color: #888;
    color: #000;
    width: 100px;
    font-size: 26px;
    text-align: center;
    font-weight: bold;
}
.rojo {background-color: #faa;}
.verde {background-color: #afa;}
.azul {background-color: #aaf;}

/* Flex-direction */

.container1 {
    display: flex;
    background-color: aquamarine;
    border: 2px solid #000;
    flex-direction: row; /* Esto no tienen efecto visible porque por defecto flex tiene una flex-direction:row */
    margin: 50px;
}
.container2 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row-reverse;
}
.container3 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: column;
}
.container4 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: column-reverse;
}

/* Flex: justifý-content */

.container5 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row;
    justify-content: flex-start;
}
.container6 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row;
    justify-content: flex-end;
}
.container7 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row;
    justify-content: center;
}
.container8 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row;
    justify-content: space-between;
}
.container9 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row;
    justify-content: space-around;
}
.container10 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row;
    justify-content: space-evenly;
}

/* Flex: gap */

.item2 {color:#fff;}
.item2:first-child {background-color: #a73939;}
.item2:nth-child(2) {background-color: #078307;}
.item2:last-child {background-color:  #4c2080;}
.container11 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row;
    column-gap: 10px;
}
.container12 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: row-reverse;
    column-gap: 10px;
}
.container13 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: column;
    row-gap: 10px;
}
.container14 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-direction: column-reverse;
    row-gap: 10px;
}

/*Flex warp*/

.item3 {color:#fff;}
.item3:first-child {background-color: #a73939;}
.item3:nth-child(2) {background-color: #078307;}
.item3:last-child {background-color:  #4c2080;}

.container15 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-wrap:nowrap; /*fuerza que no se rompa la línea*/
}
.container16 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-wrap:wrap; /*rompe la línea si lo necesita*/
}
.container17 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    flex-wrap:wrap-reverse;
}

/*Flex align items*/

.item4 {color:#fff;}
.item4:first-child {background-color: #a73939;}
.item4:nth-child(2) {background-color: #078307;}
.item4:last-child {background-color:  #4c2080;}

.container18 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-start;
    align-items: flex-start;
}
.container19 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-start;
    align-items: flex-end;
}
.container20 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-start;
    align-items: center;
}
.container21 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-start;
    align-items: stretch;
    /*Hay que quitar la altura a los
    items, por eso he hecho el item 5*/
}
.container22 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-start;
    align-items: baseline;
}
.container23 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-end;
    align-items: flex-start;
}
.container24 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-end;
    align-items: flex-end;
}
.container25 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-end;
    align-items: center;
}
.container26 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-end;
    align-items: stretch;
}
.container27 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: flex-end;
    align-items: baseline;
}
.container28 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: center;
    align-items: flex-start;
}
.container29 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: center;
    align-items: flex-end;
}
.container30 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: center;
    align-items: center;
}
.container31 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: center;
    align-items: center;
    column-gap: 25px;
}
.container32 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: center;
    align-items: stretch;
    column-gap: 25px;
}
.container33 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: space-between;
    align-items: flex-start;
    column-gap: 25px;
}
.container34 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: space-between;
    align-items: flex-end;
    column-gap: 25px;
}
.container35 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: space-between;
    align-items: center;
    column-gap: 25px;
}
.container36 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: space-between;
    align-items: stretch;
    column-gap: 25px;
}
.container37 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: space-between;
    align-items: baseline;
    column-gap: 25px;
}
.container38 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: space-around;
    align-items: flex-start;
    column-gap: 25px;
}
.container39 {
    display:flex;
    background-color: aquamarine;
    border: 2px solid #000;
    margin: 50px;
    height:150px;
    justify-content: space-around;
    align-items: flex-end;
    column-gap: 25px;
}