@charset "utf-8";

:root{
    --header-height:110px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 15px);
}

body {
    font-family: sans-serif;
    margin: 0;
    background-color: burlywood;
    background-size: cover;
    background-repeat: no-repeat;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: linear-gradient(to right, rgba(255, 100, 180,1),rgba(255, 100, 180,0.9),rgba(255, 100, 180,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%;
}

.update {
    margin-top: calc(var(--header-height) + 5px);
    text-align: right;
    font-size: 20px;
}

.container {
    display: flex;
    gap: 20px;
    margin: 20px;
    min-width: 900px;
    /*padding-top: calc(var(--header-height) + 25px);*//*なんで？*/
}

.contents {
    gap: 20px;
    padding: 30px;
    min-width: 600px;
    background: rgba(255,255,255,0.4);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.7);
    flex: 1;
}

h1 {
    padding: 20px;
    font-size: 25px;
}

img {
    display: block;
    margin: auto;
    max-width: 600px;
}

.page-toc {
    border: 2px solid rgb(30, 255, 255);
    background: white;
    padding: 0px 15px;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 2px 2px rgba(0,0,0,0.4);
}

.page-toc p {
    font-weight: bold;
    font-size: x-large;
    margin-bottom: 8px;
}

.page-toc ul {
    padding-left: 20px;
}

.page-toc li {
    margin: 5px 0;
}

.page-toc-h3 {
    padding-left: 20px;
    font-size: 0.9em;
    list-style: none;
}

.page-toc a {
    text-decoration: none;
    color: #1976d2;
}

h2 {
    margin-top: 30px;
    font-size: 20px;
    border-top: 4px solid rgb(222,184,135);
}

.txt {
    margin: 15px 0;
}

pre {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    line-height: 1;
    font-family: inherit;
}

span.important {
    font-size: 1.2em;
    color: red;
    font-weight: bold;
    background: linear-gradient(transparent 60%, #6f6 60%);
}
span.delete {
    font-size: 0.85em;
    text-decoration: line-through;
    opacity: 0.8;
}
.link-card {
    display: flex;
    max-width: 500px;
    gap: 5px;
    background-color: white;
    text-decoration: none;
    color: black;
    border: 1px solid rgb(30, 255, 255);
    border-radius: 8px;
    margin: 0 0 5px 20px;
    overflow: hidden;
}
.link-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: rgba(30, 255, 255, 0.2);
}
.link-card img {
    margin: 5px;
    max-width: 100px;
    object-fit: cover;
}
.link-info {
    padding: 5px;
}
.link-info p,h4 {
    margin: 0;
}
span.link-url::after {
    margin: 0 0 0 3px;
    font-family: "Font Awesome 5 Free";
    font-size: 0.7em;
    content: '\f35d';
    font-weight: 900;
}
.codebox {
    background: rgb(100, 100, 100);
    border-radius: 8px;
    overflow: hidden;
}
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(40, 40, 40);
    padding: 5px 12px;
}
.lang {
    font-size: 0.9em;
    color: white;
}
.copybtn {
    font-size: 0.9em;
    padding: 4px 10px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.copy-now {
    background: gray;
}
.code-scr {
    max-height: 200px;
    padding: 8px;
    overflow: auto;
    counter-reset: line;
}
.code-line {
    display: block;
    counter-increment: line;
    position: relative;
    padding: 3px 0 3px 50px;
    color: white;
    text-align: left;
    white-space: pre;
    font-family: monospace;
    tab-size: 4;
    font-size: 16px;
}
.code-line::before {
    content: counter(line);
    position: absolute;
    left: 0px;
    width: 40px;
    text-align: right;
    color: lightblue;
}
.code-line:nth-child(even) {
    background-color: rgb(80, 80, 80);
}
.code-line:hover {
    background-color: rgba(173, 216, 230, 0.5);
}

/* 目次 */
.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;
}

.myintro img {
    width: 100%;
}

.myintro a {
    position: relative;
    text-decoration: none;
    color: black;
    border-bottom: 2px solid lightseagreen;
}

.myintro a span {
    position: relative;
    z-index: 2;
}

/* 背景アニメーション用 */
.myintro a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: lightblue;  /* ボタン色*/
    z-index: 1;
    transition: height 0.3s ease;
}

/* 下から上に満ちる */
.myintro a:hover::before {
    height: 100%;
}

.ratestblog {
    background: white;
    border-radius: 6px;
    margin-top: 30px;
    padding: 5px;
}

.ratestblog ul {
    justify-content: left;
    list-style: none;
    padding-left: 3px;
}

.ratestblog li {
    border-left: 3px solid skyblue;
    border-bottom: 3px solid skyblue;
}

.ratestblog a {
    position: relative;
    text-decoration: none;
    color: black;
}

.ratestblog a span {
    position: relative;
    z-index: 2;
}

/* 背景アニメーション用 */
.ratestblog a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 100%;
    background: lightblue;  /* ボタン色*/
    z-index: 1;
    transition: width 0.3s ease;
}

/* 左から右に満ちる */
.ratestblog a:hover::before {
    width: 100%;
}

.gotop {
    font-size: large;
}