body {
    font-family: sans;
    margin: 0;
}

main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    min-height: calc(100vh - 4rem);
}

button,
input[type="submit"],
input[type="reset"] {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;

    border-radius: 0.5rem;
    height: 4rem;
    min-width: 2rem;
    padding: 0 1rem;
    background-color: #ddd;

    font-weight: bold;
    font-size: 28px;
}

h2 {
    padding: 0;
    margin: 0;
    font-size: 24px !important;
}

h3 {
    padding: 0;
    margin: 0;
}

.top {
    display: flex;
    justify-content: space-between;
}

.available {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.available .container {
    display: grid;
    grid-template-columns: repeat(6, 4.5rem);
    height: 4rem;
    gap: 0.5rem;
}

.available .container .item {
    width: 4rem;
}

.item {
    background-color: #ddd;
    font-weight: bold;
    font-size: 28px;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.target {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: right;
}

.target .container {
    background-color: #ddd;
    border-radius: 0.5rem;
    width: 8rem;
    height: 4rem;
    font-weight: bold;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.time {
    border-radius: 0.5rem;
    overflow: clip;
    height: 1rem;
    width: 100%;
    background-color: #000;
}

.answer {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.answer .item {
    width: 4rem;
    height: 4rem;
}

.answer .item_container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
}

.item_container .parenthesis {
    font-weight: bold;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.item_container .colliding {
    color: red;
}

.hide {
    opacity: 0;
}

.answer .operator {
    background-color: #aaa;
    border-radius: 0.5rem;
    width: 3rem;
    height: 4rem;
    font-weight: bold;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.selected {
    background-color: #aff !important;
}

.popup_background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vw;
    background-color: rgba(0, 0, 0, 0.5);
}

.popup {
    padding: 1rem;
    position: fixed;
    transform: translateX(-50%) translateY(-50%);
    border-radius: 1rem;
    background-color: #fff;
}

.operator_popup {
    display: grid;
    grid-template-columns: repeat(2, 4rem);
    grid-template-rows: repeat(2, 4rem);
    padding: 1rem;
    gap: 0.5rem;
}

.start_popup {
    display: flex;
    flex-direction: column;
    width: 400px;
    gap: 0.5rem;
    top: 50vh;
    left: 50vw;
}

.mode-change {
    border-radius: 0.5rem;
    height: 4rem;
    min-width: 2rem;
    padding: 0 1rem;
    background-color: #ddd;
    font-weight: bold;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.action-buttons {
    display: flex;
    justify-content: end;
    gap: 0.5rem;
}

.result {
    font-weight: bold;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: auto;
}

.blur {
    filter: blur(10px);
}
