/* styles.css */
/*=== Webフォント ================================= */
@font-face {
    font-family: 'azukiLB';
    src: url('../fonts/azukiLB.woff') format('woff');
}

@font-face {
    font-family: 'Times-Bold-Italic';
    src: url('../fonts/Times-Bold-Italic.woff') format('woff');
}

*{
    transition: 0.2s ease-out;
    font-family:
    'Plus Jakarta Sans',
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,
    "メイリオ",
    "Original Yu Gothic",
    sans-serif;
    font-size: 98%;
    font-weight: 400;
    font-style: normal;
}

body{
    transition: 0.2s ease-out;
    margin: 0;
    background-color: var(--color-background);
    font-weight: 400;
    line-height: 1.7em;
    padding: 0;
    background-color: var(--color-background);
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6, b{
    font-weight: 800; /* Extra bold */
}

:root{
    --color-background: #f4f4f4;
    --color-background-transparent: rgb(244, 244, 244, 0.8);
    --color-text: #111;
    --color-side-menu-active: rgba(0, 0, 0, 0.07);
    --color-side-menu-hover: rgba(0, 0, 0, 0.05);
    --color-back-white: rgba(255, 255, 255, 0.5);
    --color-button2-background-hover : rgb(171, 0, 80, 0.2);

    --color-button: #fff;
    --color-button-background: #bb0050;
    --color-button-background-hover : #9b0a42;

    --color-text-codebox: #fff;
    --color-background-codebox: #111;

    --color-hr: #ddd;
    --color-red: #d43371;

    --color-back-note-warn: #ffffb7;
    --color-icon-note-warn: #dea600;
    --color-back-note-info: #d2ffd1;
    --color-icon-note-info: #00ae34;
    --color-back-note-error: #ffd1dd;
    --color-icon-note-error: #ae0023;
    --color-border: #ddd;
    --color-back-table-amikake: rgba(0,0,0,0.08);

    --color-input-back: rgba(255, 255, 255, 0.8);

    --color-progress-box: #ddd;

    --box-shadow-glass: inset 1px -1px 0 rgba(255, 255, 255, 0.5);
}
a:visited{
    text-decoration: none;
}
a{
    color: var(--color-red);
}

header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background-color: var(--color-background-transparent);
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    margin: 8px;
    position: fixed;
    width: calc(100% - 56px);
    top: 0;
    border-radius: 32px;
    z-index: 999;
    line-height: 1.0em !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left-color: rgba(0, 0, 0, 0.1);
    border-bottom-color: rgba(0, 0, 0, 0.1);
    box-shadow: var(--box-shadow-glass);
}

.menu-icon {
    flex-shrink: 0;
    width: 40px;
    text-align: left;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text);
    padding-top: 10px;
}

.logo {
    height: 35px;
}

.side-menu {
    width: 300px;
    background-color: var(--color-background-transparent);
    backdrop-filter: blur(8px);
    color: var(--color-text);
    position: fixed;
    top: 65px;
    left: -316px;
    height: calc(100% - 81px);
    overflow-y: auto;
    transition: left 0.3s ease-out;
    z-index: 998;
    margin: 8px;
    border-radius: 32px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left-color: rgba(0, 0, 0, 0.1);
    border-bottom-color: rgba(0, 0, 0, 0.1);
    box-shadow: var(--box-shadow-glass);

}

.side-menu.open {
    left: 0;
}

.side-menu ul {
    list-style-type: none;
    padding: 0;
}

.side-menu ul li {
    padding: 10px;
    margin: 5px 20px;
    border-radius: 12px;
}

.side-menu ul a {
    color: var(--color-text);
    text-decoration: none;
}

.side-menu ul a.active li{
    background-color: var(--color-side-menu-active);
}

.side-menu ul li:hover{
    background-color: var(--color-side-menu-hover);
}

.side-menu ul li img{
    width: 100%;
    border-radius: 8px;
}

.side-menu .menutitle {
    margin: 3px 15px;
    border-radius: 12px;
}

.side-menu table td{
    text-align: left;
}

.form-control {
    border: 1px solid var(--color-border);
    border-radius: 20px;
    display: block;
    padding: 8px 16px;
    width: 100%;
    box-sizing:border-box;
    background-color: var(--color-input-back);
    color: var(--color-text);
    backdrop-filter: blur(8px);
}

.header-right {
    border: 0px;
    border-radius: 0px;
    display: block;
    padding: 8px 16px;
    width: 300px;
    color: var(--color-text);
}

.form-control:hover{
    border: 1px solid var(--color-button-background-hover);
}

.card{
    position: relative;
    margin: 20px;
    padding: 24px;
    border-radius: 32px;
    color: var(--color-text);
    width: auto;
    flex:1;
}

.card.white{
    background-color: var(--color-back-white);
    backdrop-filter: blur(8px);
}

.card img{
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.card_footer{
    position: relative;
    margin: 5px;
    padding: 20px;
    border-radius: 7px;
    color: var(--color-text);
}

.right_aligned{
    text-align: right;
    width: 100%;
}

.button{
    align-items: center;
    display: flex;
    border-radius: 32px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    margin-bottom: 0px;
    min-height: 34px;
    min-width: 64px;
    padding: 6px 18px;
    text-align: center;
    user-select: none;
    vertical-align: middle;
    white-space: nowrap;
    transition-duration: 0.1s;
    transition-timing-function: ease-out;
    transition-delay: 0s;
    background-color: var(--color-button-background);
    border: 1px solid var(--color-button-background);
    color: var(--color-button);
    margin: 5px;
    text-decoration: none;
    box-shadow: var(--box-shadow-glass);
}
.button:hover{
    background-color: var(--color-button-background-hover);
    border: 1px solid var(--color-button-background-hover);
    box-shadow: var(--box-shadow-glass);
}

.button2{
    align-items: center;
    display: flex;
    border-radius: 32px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    margin-bottom: 0px;
    min-height: 34px;
    min-width: 64px;
    padding: 6px 18px;
    text-align: center;
    user-select: none;
    vertical-align: middle;
    white-space: nowrap;
    transition-duration: 0.1s;
    transition-timing-function: ease-out;
    transition-delay: 0s;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    margin: 5px;
    text-decoration: none;
    box-shadow: var(--box-shadow-glass);
}
.button2:hover{
    background-color: var(--color-button2-background-hover);
    box-shadow: var(--box-shadow-glass);
}

.no_display{
    display: none;
}

a.no_decoration{
    text-decoration: none;
    color: var(--color-text);
}

.page_box{
    border-radius: 7px;
    overflow: hidden;
    display: inline-block;
}

.h1{
    font-size: 1.8em;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: .1em;
}
.h2, .h3{
    font-size: 1.5em;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: .1em;
}
.h4, .h5{
    font-size: 1.3em;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: .1em;
}
.header_right_box_item{
    display: flex;
    padding: 4px;
    margin: 5px;
}
.codebox{
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background-color: var(--color-background-codebox);
    color: var(--color-text-codebox);
    font-family: monospace;
    padding: 15px;
}

.progress_box{
    display: inline-block;
    width: 100%;
    height: 7px;
    background: #ddd;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.progress_bar{
    width: 0;
    height: 7px;
    background: var(--color-red);
    position: absolute;
    left: 0;
    top: 0;
    transition: 0.3s ease-out;
}

.center_aligned{
    text-align: center;
    box-sizing: border-box;
    padding: 10px;
}

.main_contents_2row{
    display: grid;
    grid-template-areas:
        "left_2row right_2row";
    grid-template-rows: auto;
    gap: 0px;
    grid-template-columns: 1fr 1.5fr;
    max-width: 1500px;
    margin: 0 auto;
}
.left_2row{
    grid-area: left_2row;
    display: flex;
    padding: 8px;
}
.right_2row{
    grid-area: right_2row;
    display: flex;
    padding: 8px;
    flex: 1;
}
.flex_box_1{
    flex: 1;
}

.hashtag{
    padding: 2px 8px;
    background: #666;
    color: #fff;
    font-weight: bold;
    font-size: 0.9em;
    border-radius: 16px;
    margin: 4px 1px;
    transition: 0.2s ease;
    display: inline-block;
    border: 1px #999 solid;
}
.hashtag::before {
    content: '#';
    padding: 0px;
    opacity: 0.5;
}
.hashtag:hover{
    background: var(--color-background) !important; 
    color: var(--color-text) !important;
}
.hashtag .count{
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 16px;
    font-size: 1.0em;
    padding: 3px 6px;
    margin-left: 3px;
}

i{
    font-size: 1.2em;
    padding: 0px 5px;
}

main {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: transparent;
    color: var(--color-text);
    top: 0;
    left: 0px;
    transition: margin-left 0.3s ease-out;
    overflow-y: auto;
    text-align: center;
}

main.shifted {
    margin-left: 300px;
}

content {
    display: inline-block;
    width: 100%;
    max-width: 920px;
    margin-top: 60px;
    text-align: left;
    transition: margin-left 0.3s ease-out;
}

content > img{
    border-radius: 8px;
    width: 100%;
    /*max-width: 400px;*/
    object-fit: contain;
}

hr{
    height: 1px;
    background-color: var(--color-hr);
    border: none;
    margin: 5px 10px;
    border-radius: 12px;
}

table{
    border: none;
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

table.main_contents_table{
    border: 1px solid var(--color-border);
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}
table.main_contents_table th{
    padding: 5px;
    border: 1px solid var(--color-border);
}
table.main_contents_table tr{
    padding: 5px;
    margin: 0;
    border: 1px solid var(--color-border);
}
table.main_contents_table td{
    padding: 5px;
    margin: 0;
    border: 1px solid var(--color-border);
}
table.main_contents_table tr:nth-child(2n) {
    background-color: var(--color-back-table-amikake);
}

.img_icon{
    width: 30px !important;
    margin-top: 8px;
    margin-right: 8px;
    border-radius: 100px;
    overflow: hidden;
}

.note{
    align-items: flex-start;
    border-radius: 8px;
    display: flex;
    padding: 16px;
    margin: 24px 0;
    white-space: pre-wrap;
    font-weight: bold;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}
.note > .fa{
    font-size: 20px;
    margin-right: 8px;
    padding-top: 4px;
}
.note > div {
    flex-grow: 1;
    min-width: 0;
    white-space: normal;
}
.note.warn{
    background: var(--color-back-note-warn);
}
.note.warn > .fa{
    color: var(--color-icon-note-warn);
}
.note.info{
    background: var(--color-back-note-info);
}
.note.info > .fa{
    color: var(--color-icon-note-info);
}
.note.error{
    background: var(--color-back-note-error);
}
.note.error > .fa{
    color: var(--color-icon-note-error);
}

.back_rotate_color{
    position: fixed;
    right: -20vh;
    bottom: -500px;
    overflow: hidden;
    width: 100vw;
    min-width: 700px;
    max-width: 900px;
    opacity: 0.1;
    animation: rotate_back_img linear 40s infinite;
}
@keyframes rotate_back_img{
    0% {transform: rotate(0deg)}
    100% {transform: rotate(360deg)}
}

.header_progress_box {
    position: fixed;
    top: 61px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-progress-box);
    z-index: 999;
}

.header_progress_bar {
    position: fixed;
    top: 61px;
    left: 0;
    width: 0px;
    height: 4px;
    background-color: var(--color-red);
    z-index: 999;
    transition: 0.3s ease-out;
}

.mono {
    font-family: monospace;
    background: rgb(52, 52, 52);
    color: rgb(240, 240, 240);
    padding: 2px 4px;
    border-radius: 4px;
}
.code-label {
    display: inline-block;
    background: rgb(36, 36, 36);
    color: rgb(240, 240, 240);
    padding: 2px 12px;
    border-radius: 8px 8px 0 0;
    transform: translateX(15px) translateY(14px);
}

pre {
    white-space: pre;      /* 改行と空白をそのまま保持 */
    overflow-x: auto;      /* 横方向にスクロールを出す */
    max-width: 100%;       /* 親要素幅を超えないように */
    background: rgb(52, 52, 52);
    border-radius: 8px;
    color: rgb(240, 240, 240);
}

code {
    display: block;
    font-family: monospace;
    padding: 8px 16px;
    border-radius: 8px;
    line-height: 1.3em;
}


@media (min-width: 768px) { 
    /* FOR PC */
    .side-menu {
        left: 0;
    }

    main {
        width: calc(100% - 300px);
        left: 300px;
    }

    main.shifted {
        width: calc(100% - 300px);
        left: 300px;
    }

    .menu-icon{
        display: none;
    }
}

@media (max-width: 768px) {
    /* FOR PHONES */
    main {
        margin-left: 0px;
        width: 100%;
        left: 0px;
    }

    main.shifted {
        margin-left: 0px;
        width: 100%;
        left: 0px;
    }

    .menu-icon{
        display: block;
    }

    .header-right, .pc_only{
        display: none;
    }
}

@media (max-width: 550px) {
    /* FOR PHONES */
    .main_contents_container{
        display: grid;
        grid-template-areas:
            "main"
            "side_left"
            "side_right";
        grid-template-rows: auto;
        grid-template-columns: 1fr;
        justify-content: center;
    }
    .main_contents_2row{
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "left_2row"
            "right_2row";
    }
}

/* ================== DARK MODE ================== */
@media (prefers-color-scheme: dark) {
    :root{
        --color-background: #0f0f0f;
        --color-background-transparent: rgb(15, 15, 15, 0.8);
        --color-text: #fff;
        --color-side-menu-active: rgba(255, 255, 255, 0.07);
        --color-side-menu-hover: rgba(255, 255, 255, 0.05);
        --color-back-white: rgba(255, 255, 255, 0.05);
        --color-button2-background-hover : rgba(255, 43, 142, 0.2);
    
        --color-button: #fff;
        --color-button-background: #bb0050;
        --color-button-background-hover : #9b0a42;
    
        --color-text-codebox: #fff;
        --color-background-codebox: #111;
    
        --color-hr: #333;
        --color-red: #d43371;
    
        --color-back-note-warn: rgba(255, 255, 183, 0.2);
        --color-icon-note-warn: #dea600;
        --color-back-note-info: rgba(210, 255, 209, 0.2);
        --color-icon-note-info: #00ae34;
        --color-back-note-error: rgba(255, 209, 221, 0.2);
        --color-icon-note-error: #ae0023;
        --color-border: #555;
        --color-back-table-amikake: rgba(255,255,255,0.08);
    
        --color-input-back: rgba(10, 10, 10, 0.8);
        
        --color-progress-box: #333;

        --box-shadow-glass: inset 1px -1px 0 rgba(255, 255, 255, 0.1);
    }
}
