@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap');

:root {
    --bgcolor: #ffffff;
    --titlecolor: #000000;
    --textcolor: #222222;
    --semicolor: #c4c4c4;
    --secondarycolor: #1e64a7;
    --heavy-shadow: rgba(0, 0, 0, 0.3);
    --shadow: rgba(0, 0, 0, 0.2);
    --light-shadow: rgba(0, 0, 0, 0.1);
    --brightness: 0.8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bgcolor: #0a0a0a;
        --content-bgcolor: #1a1a1a;
        --titlecolor: #ffffff;
        --textcolor: #ffffff;
        --semicolor: #6e6e6e;
        --secondarycolor: #3376b4;
        --heavy-shadow: rgba(255, 255, 255, 0.3);
        --shadow: rgba(255, 255, 255, 0.5);
        --light-shadow: rgba(255, 255, 255, 0.1);
        --brightness: 1.2;
    }
}

@layer base {
    h1, h2, h3, h4, h5, h6 {
        font-weight: bold;
        margin: 1rem 0;
    }

    h1 {
        font-size: var(--text-2xl);
    }

    h2 {
        font-size: var(--text-xl);
    }

    h3 {
        font-size: var(--text-lg);
    }

    p {
        margin: 1rem 0;
    }

    ul, ol {
        padding-left: 30px;
    }

    ul {
        list-style-type: disc;
    }

    ol {
        list-style-type: decimal;
    }

    a {
        color: var(--secondarycolor);
        text-decoration: none;
    }

    @media (hover: hover) {
        a:hover {
            text-decoration: underline;
        }
    }

    @media (hover: none) {
        a:active {
            text-decoration: underline;
        }
    }

}

/** Material Design Icons */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24
}

body {
    background: var(--bgcolor);
    color: var(--textcolor);
    -webkit-text-size-adjust: 100%;
    font-family: 'Noto Sans JP', sans-serif;
}

header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    -webkit-backdrop-filter: blur(2px) brightness(var(--brightness));
    backdrop-filter: blur(2px) brightness(var(--brightness));
    z-index: 10;
}

.menu-button {
    cursor: pointer;
}

.share-button {
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--content-bgcolor);
    border-radius: 50%;
    transition: background 0.3s;
}

.share-button:hover {
    background: var(--secondarycolor);
}

.share-icon {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

main {
    z-index: 0;
}

.content {
    background: var(--content-bgcolor);
    border-radius: 1rem;
}

/* #region ArticleLinkSlim */
.article-link-slim {
    height: 90px;
    display: flex;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin: 1rem 0;
    cursor: pointer;
    transition: 180ms box-shadow ease-in-out;
    box-shadow: 0px 0px 10px 0px var(--light-shadow);
}

.article-link-slim:hover {
    box-shadow: 0px 0px 10px 0px var(--heavy-shadow);
}

.article-link-slim-icon img {
    height: 60px;
    width: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0px 0px 10px 0px var(--shadow);
    margin: 5px;
}

.article-link-slim-icon div {
    background-color: var(--semicolor);
    height: 60px;
    line-height: 60px;
    width: 60px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0px 0px 10px 0px var(--shadow);
    margin: 5px;
    text-align: center;
    font-size: xx-large;
}

.article-link-slim-title {
    min-width: 0;
    width: 100%;
    font-size: large;
    font-weight: bold;
    margin: 0 10px;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    text-align: left;
}

.article-link-slim-subtitle {
    min-width: 0;
    width: 100%;
    font-size: small;
    margin: 0 10px;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    text-align: left;
}
/* #endregion */

/* #region ArticleLinkBig */
.article-link-big {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin: 1rem 0;
    cursor: pointer;
    transition: 180ms box-shadow ease-in-out;
    box-shadow: 0px 0px 10px 0px var(--light-shadow);
}

.article-link-big:hover {
    box-shadow: 0px 0px 10px 0px var(--heavy-shadow);
}

.article-link-big-icon img {
    width: 480px;
    max-width: 100%;
    height: 270px;
    max-height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0px 0px 10px 0px var(--shadow);
}

.article-link-big-icon div {
    width: 480px;
    max-width: 100%;
    height: 270px;
    line-height: 270px;
    max-height: 100%;
    border-radius: 8px;
    background-color: var(--semicolor);
    box-shadow: 0px 0px 10px 0px var(--shadow);
    margin: 0 auto 7px auto;
    text-align: center;
    font-size: xx-large;
    overflow: hidden;
}

.article-link-big-title {
    min-width: 0;
    width: 100%;
    font-size: large;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow-wrap: break-word;
    word-wrap: break-word;
    text-align: left;
}
/* #endregion */


#article-content {
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    text-align: left;
}

#article-content img {
    width: 100%;
    border-radius: 8px;
    max-height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0px 0px 10px 0px var(--shadow);
    margin: auto;
}

#toast-container {
    position: fixed;
    width: calc(100% - 32px);
    bottom: 0;
    right: 0;
    margin: 16px;
}

.toast, .toast-button {
    transition: 0.3s ease-in-out;
}
