@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&family=Quicksand:wght@300..700&family=Space+Mono&display=swap');
@import url('https://fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,900,300');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&family=Quicksand:wght@300..700&family=Space+Mono&family=Zen+Maru+Gothic&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&display=swap');

/* header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #fff;
    z-index: 100;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #ffffff;
}

#logo {
    height: 60px;
}

.language-dropdown {
    position: relative;
    margin-left: auto; /* 右端に移動 */
}

#language-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto; /* 右端に移動 */
    padding: 0;
}

#language-icon {
    background: url('./asset/language.png') no-repeat center center; /* 背景画像を適用 */
    background-size: contain; /* 画像がボタン内に収まるように */
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px;
    width: 30px;
    display: block;
}

#language-options {
    position: absolute;
    top: 40px;
    right: 0;
    background-color: #fff;
    border-radius: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 80px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#language-options li {
    padding: 10px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    font-weight: 200;
}

#language-options li:hover {
    background-color: #f0f0f0;
}

.hidden {
    display: none;
}

/* global */
body, html {
    margin: 0;
    padding: 0;
    font-family: "Noto Sans JP", serif;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
}

main {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 70px 10px 50px;
    gap: 20px;
    min-height: calc(100vh-80px);
    box-sizing: border-box;
}

h2 {
    margin: 0;
    font-family: 'Noto Sans JP', serif;
    font-size: 16pt;
}

h3 {
    font-family: 'Noto Sans JP', serif;
    font-size: 13pt;
    font-weight: 400;
}

p {
    text-align: center;
}

/* loading */
#spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#spinner-container.hidden {
    display: none;
}

.spinner {
    --spinner-size: 5;
    --line-color: #51c4ce;
    --line-alpha: 1;
    --ring-color: #fac8d2;
    --ring-alpha: .3;
    --ring-size: 28;

    font-size: calc(var(--spinner-size) * 1em);
    width: 1em;
    height: 1em;
    border-radius: 50%;
}

.spinner .line {
    fill: none;
    stroke: var(--line-color);
    stroke-width: var(--ring-size);
    opacity: var(--line-alpha);
    stroke-linecap: round;
    transform-origin: 50% 50%;
    animation: 
        2156ms spinner-arc ease-in-out infinite,
        1829ms spinner-rotate linear infinite;
}

.spinner .ring {
    fill: none;
    stroke: var(--ring-color);
    stroke-width: var(--ring-size);
    opacity: var(--ring-alpha);
}

@keyframes spinner-rotate {
    to {
        transform: rotate3d(0, 0, 1, 360deg);
    }
}

@keyframes spinner-arc {
    from {
        stroke-dasharray: 0 150;
        stroke-dashoffset: 0;
    }
    to {
        stroke-dasharray: 100 150;
        stroke-dashoffset: -140;
    }
}

/* mobile */
@media (max-width: 600px) {
    .container {
        width: 90%;
    }

    #logo {
        size: 70%;
    }

    #instruction {
        font-size: 15px;
        padding: 10px;
        overflow: scroll;
    }

    #send-icon {
        width: 40px;
    }

    canvas {
        width: 100% !important;
        height: auto;
    }

    .retryButtons button {
        width: 80%;
        font-size: 18px;
    }

    .share-buttons {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .share-buttons button {
        width: 44px;
        height: 44px;
    }
    .share-buttons button img {
        width: 20px;
        height: 20px;
    }

    #copy-status {
        font-size: 12px;
        font-weight: 200;
    }
}