:root {
    --rotation-speed: 500ms;
    --background-color: #222;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
    color: white;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    font-family: Arial, Helvetica, sans-serif;
}

[type='radio'] {
    display: none;
}

.container {
    display: flex;
    height: 300px;
    width: 300px;
    position: relative;
}

label {
    padding: 5px 10px;
    background-color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    margin: 0 10px;
}

nav {
    display: flex;
    margin-bottom: 20px;
}

section {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 250ms;
}

#tab-1:checked ~ nav > [for='tab-1'],
#tab-2:checked ~ nav > [for='tab-2'],
#tab-3:checked ~ nav > [for='tab-3'] {
    border: 1px solid white;
}

#tab-1:checked ~ div #blue,
#tab-2:checked ~ div #red,
#tab-3:checked ~ div #green {
    opacity: 1;
}

.colors {
    margin-top: 1rem;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 100px);
    gap: 1rem;
}

h2 {
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.05rem;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.red,
.blue,
.green {
    height: 100%;
    width: 100%;
}

/* red */
.red:nth-of-type(1) {
    background-color: #fc8181;
}

.red:nth-of-type(2) {
    background-color: #f56565;
}

.red:nth-of-type(3) {
    background-color: #e53e3e;
}

.red:nth-of-type(4) {
    background-color: #c53030;
}

.red:nth-of-type(5) {
    background-color: #9b2c2c;
}

.red:nth-of-type(6) {
    background-color: #742a2a;
}

/* blue */
.blue:nth-of-type(1) {
    background-color: #4299e1;
}

.blue:nth-of-type(2) {
    background-color: #3182ce;
}

.blue:nth-of-type(3) {
    background-color: #3182ce;
}

.blue:nth-of-type(4) {
    background-color: #2b6cb0;
}

.blue:nth-of-type(5) {
    background-color: #2c5282;
}

.blue:nth-of-type(6) {
    background-color: #2a4365;
}

/* green */

.green:nth-of-type(1) {
    background-color: #68d391;
}

.green:nth-of-type(2) {
    background-color: #48bb78;
}

.green:nth-of-type(3) {
    background-color: #38a169;
}

.green:nth-of-type(4) {
    background-color: #2f855a;
}

.green:nth-of-type(5) {
    background-color: #276749;
}

.green:nth-of-type(6) {
    background-color: #22543d;
}
