:root{
    --header-height:110px;
}

html {
    line-height: 1.5;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 15px);
}

body {
    font-family: sans-serif;
    margin: 0;
    min-width: 800px;
    background-color: burlywood;
    background-size: cover;
    background-repeat: no-repeat;
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: linear-gradient(to right, rgba(255, 255, 255,1),rgba(255, 255, 255,0.8),rgba(255, 255, 255,0.3));
    color: black;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.header-top {
    margin-left: 20px;
    padding: 15px;
    font-size: 30px;
    font-weight: bold;
    font-style: italic;
}

.header-nav {
    position: relative;
    background: rgba(255,255,255,1);
    border-bottom: 3px solid rgb(30, 255, 255);
    z-index: 10;
}

.header-nav ul {
    display: flex;
    justify-content: left;
    padding: 6px 0;
    list-style: none;
    margin: 0 0 0 30px;
}

.header-nav a {
    position: relative;
    text-decoration: none;
    overflow: hidden;
    color: black;
    font-size: 15px;
    padding: 7px 12px;
    z-index: 4;
    transition: color 0.3s ease;
}

/* 背景アニメーション用 */
.header-nav a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: rgba(30, 255, 255, 0.7);  /* ボタン色*/
    z-index: -1;
    transition: height 0.3s ease;
}

/* 下から上に満ちる */
.header-nav a:hover::before {
    height: 100%;
}

.chk-db {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 50px 250px;
    justify-content: right;
}
.chk-db img {
    height: 70px;
}
.chk-db p {
    color: red;
    font-weight: bold;
}

.container {
    display: flex;
    flex: 1;
    gap: 10px;
    margin: 20px;
}

.contents {
    padding: 30px;
    min-width: 550px;
    background: rgba(255,255,255,0.4);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.7);
    flex: 1;
}

h2 {
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,.1));
    margin-block-end: 0;
    padding-left: 10px;
}
.site-info {
    margin: 0 5px;
    padding: 10px 0;
    text-align: center;
    border: 2px dashed rgb(30, 255, 255);
    a {
        display: block;
        margin: 10px;
        border: 1px solid gray;
        background-color: whitesmoke;
        text-decoration: none;
        color: black;
        transition: background-color .2s;
        &:hover {
            background-color: lightblue;
        }
    }
}
.site-info + .goto-info {
    text-align: right;
    margin-bottom: 20px;
    padding-right: 10px;
}
.finder {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 50px;
    font-family: inherit;
    * {
        background-color: transparent;
        border: 1px solid black;
        border-radius: 6px;
    }
    input {
        background-color: rgba(0, 0, 0, .1);
        padding: .5em;
        outline: none;
        &:focus {
            border: 1px solid blue;
            box-shadow: 0 0 4px 1px blue;
        }
    }
    button {
        &:hover {
            background: rgba(0, 128, 255, 0.6);
        }
        &:active {
            background: rgba(0, 32, 64, 0.6);
        }
        &.selected {
            background-color: paleturquoise;
            &::after {
                content: "✖";
                margin: 0 0 0 .5rem;
            }
        }
    }
    #findbtn::before {
        font-family: "Font Awesome 5 Free";
        font-size: 1.3em;
        content: '\f002';
        font-weight: 900;
    }
    .sug {
        border: 0;
        display: none;
        button {
            border: 0;
        }
    }
}
.listbox {
    margin: 10px 0;
    border: 2px solid black;
    background-color: aliceblue;
    .list {
        /* * {
            border: 1px solid black;
        } */
        display: grid;
        margin: 10px;
        grid-template-columns: 3fr 1fr 1fr 2fr;
        grid-template-rows: 35px 115px 1fr;
        border: 2px solid rgb(30, 255, 255);
        border-radius: 12px;
        overflow: hidden;
        .title {
            font-weight: bold;
            font-size: 22px;
            text-align: center;
            background: rgb(30, 255, 255);
            text-decoration: none;
            color: black;
            &:hover {
                background-color: rgb(30, 180, 180);
            }
        }
        .version {
            grid-column: 2 / 4;
            align-content: end;
            padding-left: 3px;
            background: linear-gradient(to right, rgba(95, 158, 160, .8),rgba(95, 158, 160, 0));
            font-size: 20px;
            &::before {
                content: "ver.";
                font-size: 18px;
            }
        }
        .image {
            grid-column: 4 / 5;
            grid-row: 1 / 3;
            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }
        .sub {
            grid-column: 1 / 3;
            padding: 0 0 5px 10px;
            &::before {
                content: "[ ";
            }
            &::after {
                content: " ]";
            }
        }
        .dl {
            text-align: right;
            align-content: end;
            padding-right: 5px;
            background: linear-gradient(to left, rgba(180, 255, 255, 1),rgba(180, 255, 255, .3));
            &::before {
                content: "DL:";
            }
        }
        .tag {
            display: flex;
            padding: 3px 0;
            background: linear-gradient(to top, rgb(30, 255, 255, .3),rgba(30, 255, 255, .0));
            grid-column: 1 / 5;
            font-size: 15px;
            align-content: center;
            margin-left: 4px;
            flex-wrap: wrap;
            span {
                padding: 0 5px;
                border: 1px solid black;
                margin: 1px;
                border-radius: 1rem;
                background-color: yellowgreen;
            }
            .selecttag {
                background-color: paleturquoise;
            }
        }
    }
    .pagemover {
        margin: 10px 0;
        text-align: center;
        font-size: 18px;
        button {
            border: 0;
            background: lightgray;
            border-radius: 5px;
            color: gray;
            &.aviable {
                border: 1px solid rgb(0, 128, 255);
                border-radius: 6px;
                background: rgb(30, 255, 255);
                &:hover {
                    background: rgba(0, 128, 255, 0.6);
                }
                &:active {
                    background: rgba(0, 32, 64, 0.6);
                }
            }
        }
        
    }
}

/* 目次 */
.toc {
    width: 180px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    align-self: flex-start;
    padding: 5px;
}

.myintro {
    background: whitesmoke;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.7);
    padding: 5px;
    img {
        width: 100%;
    }
    a {
        position: relative;
        text-decoration: none;
        color: black;
        border-bottom: 2px solid lightseagreen;
        span {
            position: relative;
            z-index: 2;
        }
        /* 背景アニメーション用 */
        &::before {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 0%;
            background: lightblue;  /* ボタン色*/
            z-index: 1;
            transition: height 0.3s ease;
        }
        /* 下から上に満ちる */
        &:hover::before {
            height: 100%;
        }
    }
}
.sitemap {
    background-color: aliceblue;
    margin-top: 10px;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.7);
    a {
        display: block;
        color: black;
        text-decoration: none;
        border-bottom: 2px solid rgb(30, 255, 255);
    }
    .nest {
        margin:0 0 5px 6px;
        padding-left: 10px;
        position: relative;
        &::before {
            position: absolute;
            left: 0;
            bottom: 0;
            width: 4px;
            height: 100%;
            content: "";
            background: rgb(30, 255, 255);
        }
    }
    
}
footer {
    background-color: gray;
    text-align: center;
    padding: 20px 0;
    div {
        margin: 20px;
        &.warn {
            font-weight: bold;
        }
    }
}
a.gotop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 5px;
    text-decoration: none;
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 12px;
    opacity: 0;
    z-index: 1000;
    &.show {
        opacity: 1;
    }
}