body {
    margin: 0;
}
h1 {
    font-size: 45px;
}
h2 {
  font-size: 30px;
}
header h1 {
  margin: 0;
}
article {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  box-sizing: border-box;
  padding-top: 50px;
  background: rgb(255, 255, 255);
}
article p {
  justify-content: left;
  text-align: left;
  line-height: 1.5;
}
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: black;
  margin: 0;
}
header a {
    color: white;
    text-decoration: none;
}
.profile-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-top: 100px;
  margin-bottom: 300px;
}

.profile-container img {
  height: 150px;
  border-radius: 30px;
}

.profile-text h2,
.profile-text p {
  margin: 0;
}
.profile-text h2 {
  margin-bottom: 8px;
}

.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.project {
  width: 200px;
  text-align: center;
  background-color: white;
  border-radius: 10px;
  padding-bottom: 10px;
}

.project img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid black;
  box-sizing: border-box;
}

.project p {
  margin: 10px 5px 0 5px;
  color: black;
  font-size: 14px;
}

.modal-overlay {
      position: fixed;
      top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.6);
      display: flex;
      justify-content: center;
      align-items: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

    .modal-overlay.is-open {
      opacity: 1;
      pointer-events: auto;
    }

    .modal-contents {
      background: white;
      padding: 30px;
      border-radius: 8px;
      text-align: center;
    }
    .modal-overlay button{
      border-radius: 5px;
      height: 40px;
    }
    #okBtn{
      background: lightgreen;
    }
.language-javascript {
  border-radius: 20px;
}
.copy-button {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #a0aec0;
  border: 1px solid rgba(255, 255, 255, 0.15);
            padding: 5px 10px;
            font-size: 0.75em;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
}
pre[class*="language-"] {
            position: relative;
            background: #2d3139 !important;
            border-radius: 8px !important;
            padding: 18px !important;
            padding-bottom: 45px !important;
            margin: 20px 0 !important;
        }
        .copy-button:hover {
            background: rgba(255, 255, 255, 0.2);
            color: #ffffff;
        }
        .copy-button.copied {
            background: #48bb78;
            color: #ffffff;
            border-color: #48bb78;
        }
        .error-container {
            text-align: center;
            padding: 100px 20px;
        }
        .error-title {
            font-family: 'Bree Serif', serif;
            font-size: 80px;
            margin: 0;
            color: #ff4c23;
        }
pre {
  margin-left: 50px;/* --- コピーボタン用の修正スタイル --- */

/* 元々ある pre code のスタイルに、基準位置と下部余白を追加 */
pre code {
  position: relative;          /* ボタンを内側に浮かせる基準 */
  display: block;              /* 横いっぱいに広げる（または inline-block） */
  padding-bottom: 45px !important; /* コードの下側にボタンを置くための余白を作る */
}

/* ボタンとメッセージを包むコンテナ */
.copy-btn-container {
  position: absolute;
  bottom: 8px;   /* グレーの箱の底から8px上 */
  right: 12px;   /* グレーの箱の右端から12px内側 */
  display: flex;
  flex-direction: row-reverse; /* ボタンを右、メッセージを左に並べる */
  align-items: center;
  gap: 8px;
  z-index: 10;
}

/* コピー画像ボタン（灰色背景） */
.copy-icon-btn {
  background-color: #f0f0f0;  /* 灰色 */
  border: 1px solid #d0d0d0; 
  border-radius: 4px;        
  cursor: pointer;
  padding: 5px;              
  color: #444444;            
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s;
}

.copy-icon-btn:hover {
  background-color: #ffffff;  /* ホバー時は白に */
}

.copy-icon-btn:active {
  transform: scale(0.95);    
}

/* 「コピーしました！」メッセージ */
.copy-success-msg {
  font-size: 11px;
  color: #b7eb8f;             /* グレー背景で見えやすい明るい黄緑色 */
  font-weight: bold;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  white-space: nowrap;       
}

.copy-success-msg.is-show {
  opacity: 1;
  visibility: visible;
}

}
pre code{
  background: rgb(130, 130, 130);
  color: white;
  padding: 10px;
  border-radius: 15px;
  width: 95%;
}
