@font-face {
    font-family: 'Humming';
    src: url('font/Humming.otf');
}

@font-face {
    font-family: 'RobotoMono';
    src: url('font/RobotoMono.ttf');
}

html {
    background-image: url('img/background.png');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
    font-family: Humming;
    font-size: 22px;
    color: rgb(60, 60, 60);
}

canvas {
    background: white;
    border-radius: 20px;
    border: rgb(60, 60, 60) 1px solid;
    padding: 10px;
    margin-inline: 50px;
    margin-top: 10px;
}

hr {
    border: none;
    border-bottom: rgba(0, 0, 0, 0.3) 2px dashed;
    margin-inline: 50px;
}

input {
    text-align: center;
    font-family: Humming;
    font-size: 22px;
    color: rgb(60, 60, 60);
    width: 80px;
    height: 45px;
    outline: none;
    border: rgb(60, 60, 60) 1px solid;
    border-radius: 10px;
    background: rgb(235, 235, 235);
    transform: scale(0.95);
}
input:not(:active) {
    opacity: 80%;
}
input:focus,
input:hover {
    opacity: 100%;
}
input:focus::placeholder {
    color: transparent;
}

#bells {
    height: 40px;
    width: 40px;
    position: relative;
    top: 10px;
    margin-left: 5px;
}

#first button {
    width: 80px;
}
#pattern button {
    width: max-content;
    padding-inline: 10px;
}

#first {
    margin-bottom: 10px;
}

button {
    font-family: Humming;
    font-size: 16px;
    color: rgb(60, 60, 60);
    height: 45px;
    margin-inline: 2.5px;
    margin-top: 5px;
    border: rgb(60, 60, 60) 1px solid;
    border-radius: 10px;
    transition: ease-in-out;
    background: rgb(235, 235, 235);
    cursor: pointer;
    transition: ease-in-out;
    opacity: 80%;
}
button:hover {
    opacity: 100%;
}
button:not(.pattern):active {
    transform: scale(0.975);
}
.active-btn {
    background: rgb(200, 255, 225);
    color: rgb(10, 20, 15);
}

#content {
    margin: auto;
    margin-top: 25px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.85);
    width: 900px;
    border-radius: 15px;
    padding: 10px;
    text-align: center;
    height: min-content;
}

.section {
    margin-bottom: 30px;
}
.sec-add {
    margin-top: -20px;
    margin-bottom: 30px;
}
.hidden {
    visibility: hidden;
    position: absolute;
}

#data {
    display: grid;
    grid-template-columns: 200px 200px 200px;
    gap: 20px;
    margin: auto;
    width: max-content;
    margin-top: 10px;
}

#data-chart {
    margin-top: 30px;
}

.day {
    border-radius: 15px;
    width: 200px;
    height: 115px;
    border: rgb(60, 60, 60) 1px solid;
    background: white;
    cursor: default;
    font-size: 18px;
    padding-top: 5px;
}
.day input {
    transform: scale(0.875);
}
.day-input {
    padding-top: 5px;
    display: flex;
    width: max-content;
    margin: auto;
}
.halfday {
    font-size: 7px;
    color: rgb(0, 0, 0, 0.5);
}
.halfday:hover {
    color: rgb(60, 60, 60);
}
.halfday:hover input {
    opacity: 100%;
}

#score-overview {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.score {
    font-size: 16px;
    margin-inline: 10px;
    border: rgb(60, 60, 60) 1px solid;
    border-radius: 10px;
    padding-bottom: 10px;
    padding-top: 4px;
    width: 180px;
    height: fit-content;
}

.numbers {
    font-family: 'RobotoMono';
    font-size: 18px;
    font-weight: 500;
    display: inline-flex;
    gap: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-error {
    font-weight: 400;
    opacity: 0.8;
}

gray {
    opacity: 0.8;
}

@keyframes pop {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.05);
    }
    60% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.attention {
    display: inline-block;
    animation: pop 0.3s ease-in-out;
}

/* NEW CODE */

#pattern-overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding-inline: 58px;
}

.pattern {
    height: fit-content;
    display: flex;
    overflow: hidden;
    background: white;
}

.pattern.dec, #dec-score {
    background-color: rgba(255, 0, 0, 0.15);
}

.pattern.ss, #ss-score {
    background-color: rgba(255, 255, 0, 0.15);
}

.pattern.ls, #ls-score {
    background-color: rgba(0, 255, 0, 0.15);
}

.pattern.alt, #alt-score {
    background-color: rgba(0, 0, 255, 0.15);
}

#dec-score.active-btn,
#ss-score.active-btn,
#ls-score.active-btn,
#alt-score.active-btn,
.patterm.active-btn {
    opacity: 1;
    border: 1px solid black;
}

.pattern > div {
    padding: 7px;
    padding-top: 5px;
}

.pattern > div:not(:last-child) {
    border-right: rgba(60, 60, 60, 0.3) 1px solid;
}

.pattern .ranking {
    width: 120px;
    font-size: 35px;
}

.pattern .phases {
    flex: 1;
}

.pattern .optimal {
    flex: 1;
}

.pattern .var-score {
    flex: 1;
}

.pattern .status {
    width: 120px;
}

.phases .numbers {
    font-size: 15px;
}

.title {
    font-variant-caps: small-caps;
    font-family: 'RobotoMono';
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
}

.info .numbers {
    padding-top: 7px;
}

.info {
    display: flex;
    flex-direction: column;
    font-family: 'RobotoMono';
    font-size: 24px;
    font-weight: 400;
    gap: 0; /* start with no gap */
    transition: gap 0.25s ease;
}

.info .hint {
    font-size: 8px;
    letter-spacing: 1px;
    font-weight: 600;
    text-align: left;
    line-height: 1.3;

    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-5px);
    transition: opacity 0.25s ease, max-height 0.25s ease, transform 0.25s ease;
}

.pattern:focus .info {
    gap: 6px;
}

.pattern:focus .info .hint {
    opacity: 1;
    max-height: 100px;
    transform: translateY(0);
}

.icon {
    font-size: 25px;
    line-height: 1;
}

.animated {
    display: inline-block; /* needed for rotation */
    animation: spin 1.2s ease-in-out infinite;
    transform-origin: 50% 65%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(360deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) ;
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

green {
    color: rgb(0, 180, 0);
}

red {
    color: rgb(225, 0, 0);
}

yellow {
    color: rgb(255, 80, 15)
}