body {
    background-color: black;
    color: white;
    margin: auto;
    font-family: "Noto Sans JP", sans-serif;
}

h1, p {
    text-align: center;
}

button {
    color: black;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: calc(3/4);
    background-color: white;
    cursor: pointer;
}

#large-container {
    position: relative;
    width: 80%;
    margin: 0 auto;
}

#small-container {
    position: absolute;
    width: 30.5%;
    outline: 3px solid black;
    border-radius: 15px;
}

#small-container.top-left {
    top: 2.6%;
    left: 3.47%;
}

#small-container.top-right {
    top: 2.6%;
    right: 3.47%;
}

#small-container.bottom-left {
    bottom: 2.6%;
    left: 3.47%;
}

#small-container.bottom-right {
    bottom: 2.6%;
    right: 3.47%;
}

#large-container:hover,
#small-container:hover {
    background-color: #e5e5e5;
}

#large-container:hover:has(#small-container:hover) {
    background-color: white;
}

#large-preview {
    width: 20%;
}

#small-preview {
    width: 40%;
}

#large-preview.has-image,
#small-preview.has-image {
    width: 100%;
    height: 100%;
}

#large-image,
#small-image {
    display: none;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    width: 80%;
    aspect-ratio: 2.5;
    margin: 30px auto 40px;
}

.grid button {
    font-size: 1.1rem;
    background-color: white;
    border-radius: 20px;
    cursor: pointer;
}

.grid button:hover {
    background-color: #e5e5e5;
}

.grid button.selected {
    background-color: #accfff;
    font-weight: bold;
}

.function-group {
    display: flex;
}

.swap-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
}

#swap-button {
    background: none;
    border: 2px solid white;
    border-radius: 50%;
    width: 70px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
    cursor: pointer;
}

#swap-button:hover {
    background-color: #ffffff40;
}

#swap-button img {
    width: 90%;
}

.download-div {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#download-button {
    padding: 15px 20px;
    border: none;
    background-color: white;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
}

@media (min-aspect-ratio: 1/1) {
    body {
        width: 40%;
    }
}

footer {
    display: flex;
    justify-content: space-between;
    position: sticky;
    bottom: 0;
    padding: 15px;
    background-color: #2c2c2c;
    z-index: 1000;
}

.footer-left {
    width: 90px;
}

footer .title {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    color: #88a6ff;
}

.language {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: white;
    text-decoration: none;
    width: 90px;
    height: 40px;
    outline: 1px solid #4f4f4f;
    border-radius: 10px;
}

.language:hover {
    background-color: #3b3b3b;
}
