:root {
    --color-01: #c8e3ae;
    --color-02: #b4d491;
    --color-03: #a0c97a;
    --color-04: #638e4f;
}

html,
body {
    background-color: var(--color-02);
    width: 100vw;
    height: 100%;
    max-width: 100vw;
    max-height: 100%;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

* {
    user-select: none;
}

.polaroid {
    background-color: white;

    padding: 40px;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.4);

    margin: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px
}


.polaroid-content {
    background-color: var(--color-03);
    flex-grow: 1;
    width: 240px;
    height: 240px;

    position: relative;
}

.polaroid-content>* {
    top: 0;
    left: 0;
    position: absolute;
}

.polaroid .photo {
    width: 100%;
    height: 100%;
    background-size: 100% auto;
    background-image: url(./assets/polaroid_04.png);
    transition: background 0.2s;
}

.row {
    display: flex;
    flex-direction: row;
}

.col {
    display: flex;
    flex-direction: column;
}

.grow {
    flex-grow: 1;
}

.button {
    color: var(--color-04);

    min-width: 40px;
    min-height: 40px;
    border-radius: 40px;
    padding: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;

    text-align: center;
    gap: 10px;
    user-select: none;
}

.center {
    justify-content: center;
}

.button:hover {
    background-color: #eeeeee;
}

.button i {
    font-size: 30px;
}

.hide {
    display: none;
}


/* Kanji card */
.polaroid #kanji {
    position: relative;
    color: white;
    display: flex;
    flex-direction: column;
}

#card.polaroid .photo {
    filter: grayscale(60%) brightness(1.5);
    opacity: 0.1;
}

#card-index {
    padding: 10px;
}

.polaroid-action {
    top: 10px;
    left: auto;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.polaroid-action .button {
    background-color: var(--color-04);
    color: white;
}

#card-value-box {
    width: 100%;
    height: 100%;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 40px;
    line-height: 40px;
    text-align: center;
}

#card-value {
    max-height: 100%;
    flex-grow: 1;
}

.response {
    font-size: 18px;
    line-height: 18px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    text-align: left;
    position: relative;
}

table {
    width: 100%;
    background-color: var(--color-04);
    color: white
}

td {
    padding: 5px;
    box-sizing: content-box;
}

tr {
    width: 100%;
}

.response .title {
    color: white;
    font-size: 30px;
    line-height: 30px;
    margin: 10px;
    text-align: center;
}

.reading {
    width: 40%;
    font-weight: bolder;
    color: var(--color-04);
    background-color: white;
    text-align: right;
}

#result {
    flex-grow: 1;
    overflow-y: auto;
    transition-timing-function: ease-in-out;
    transition-duration: 1s;
    max-height: 100vh;
    opacity: 1;
}

#result.hide {
    display: flex !important;
    max-height: 0;
    opacity: 0;
}

#result .item {
    padding: 5px;
    flex-wrap: wrap;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

#result .index {
    font-size: 20px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background-color: var(--color-04);
    color: white;
}

#result .title {
    font-size: 30px;
    padding-left: 10px;
}