body {
  background-color: var(--color-black);
  color: #f0f0f0;
  font-family: 'Orbitron', sans-serif;
  margin: 0;
  padding: 0;
}

h1 {
    text-align: center;
    color: var(--color-lightblue);
    margin-bottom: 40px;
    margin-top: 40px;
    font-size: 35px;
}

/* ナビ全体 */
.top-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.1s ease, padding 0.1s ease;
  background-color: #1b1b1b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 24px; 
  z-index: 1000;
  position: relative;
}

.top-nav.open {
  max-height: 1000px;
  padding: 24px 24px;
}

/* ハンバーガー */
.hamburger {
  display: block;
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 9999;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 10.5px;
}

.hamburger span:nth-child(3) {
  top: 21px;
}

/* アニメーション時 */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 10.5px;
  background: var(--color-lightblue);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10.5px;
  background: var(--color-lightblue);
}

/* ハンバーガー見た目切り替え */
.hamburger.open {
  transform: rotate(90deg);
  color: var(--color-lightblue);
  transition: transform 0.1s ease, color 0.1s ease;
}

.modal-open .hamburger {
  display: none;
}

/* ロゴ画像 */
.site-logo img {
  height: 50px;
  width: auto;
  display: block;
}

/* ロゴ＋ナビの並び */
.site-title {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-wrap: wrap;
  font-weight: bold;
  overflow: hidden;
}

/* Gallery / Sparkle 表示行 */

.nav-group {
  display: grid;
  padding: 0px;
  grid-template-columns: 70px 1fr; 
  column-gap: 25px;
  row-gap: 4px;
  align-items: start;
  margin-bottom: 16px;
  align-items: baseline;
}

.nav-label {
  font-weight: bold;
  color: #ffffff;
  cursor: default;
  font-size: 14px;
  white-space: nowrap;
  width: 70px;
  text-align: right;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
}

.site-title a {
  font-size: 18px;
  line-height: 1;
  color: var(--color-white);
  text-decoration: none;
  font-weight: bold;
  padding-right: 20px;
}

/* アクティブ状態のリンク */
.site-title a.active {
  color: #808080;
}

/* ホバー時のスタイル */
.site-title a.active:hover {
  color: var(--color-white);
}

.top-nav a {
  cursor: pointer;
}

.index-page .top-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.2s ease;
  padding: 0 24px;
}

.index-page .top-nav.open {
  max-height: 1000px;
  padding: 24px;
}

.definitions {
  color: var(--color-white);
}

.definitions p{
  font-family: 'Orbitron', sans-serif;
  line-height: 1.6;
  font-size: 18px;
  text-align: center;
}

.secret-button {
  display: inline-block;
  margin: 32px auto;
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  color: #6c8e92;
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.8px;
  transition: all 0.3s ease;
  opacity: 0.6;
  text-align: center;
}

.secret-button:hover {
  border-color: var(--color-lightblue);
  color: var(--color-lightblue);
  opacity: 1;
  cursor: pointer;
}

.profile-layout {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  gap: 50px;
  max-width: 900px;
  margin: 40px auto;
  padding: 0;
}

.profile-pic img {
  width: 300px;
  height: 300px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0);
  margin-top: 2px;
}

.profile-left h2 {
  text-align: center;
  color: #9bd3ed;
}

/* SNSリンク用の箱 */
.sns-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding-left: 35px;
}

/* SNSアイコンのサイズと動きの設定 */
.sns-wrapper img {
    width: 30px; 
    height: 30px;
    transition: opacity 0.3s; 
}

.sns-links {
  padding-bottom: 10px;
  display: flex;
  align-items: center;
}

.sns-links a {
  font-size: 12px;
  padding-left: 20px;
  color: var(--color-white);
}

.sns-links :hover {
    opacity: 0.7; 
    background-color: #68686800;
}

.profile-info {
  flex: 1;
  margin: 0;
  padding: 0;
}

 /* 構文 (struct, let, var) */
.keyword {
  color: #EF81B0;
  font-weight: bold;
}

/* 型 (Int, String, View) */
.type {
  color: #CCB4F0;
}

/* ユーザーが作った型名・構造体名 (Youmi, Log) */
.user-type {
  color: #8ADCFB;
}

/* 定数の名前 (name, birth, etc...) */
.property {
  color: #69AEC8;
}

/* 標準型・標準関数 (print, Image, Text) */
.builtin {
  color: #CCB4F0;
}

 /* 文字列  */
.string {
  color: #F08875;
}

 /* 数値 */
.number {
  color: #D5CA86;
}

/* コメントアウト */
.comment {
  color: #A5B0BD;
  font-style: italic;
}

.code-block {
  counter-reset: row-num;
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  background-color: #292A2F;
  color: #dcdcdc;
  padding-right: 30px;
  padding-left: 30px;
  padding-top: 20px;
  padding-bottom: 10px;
  border-radius: 5px;
  font-size: 14px;
  line-height: 0.6;
  white-space: pre;
  word-break: break-word;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0;
}

.code-block div {
  counter-increment: row-num;
  position: relative;
  padding-left: 2.3em;
  white-space: pre;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 0.6; 
}

.code-block div::before {
  content: counter(row-num);
  font-size: 12px;
  position: absolute;
  left: 0;
  color: #747478;
  width: 1em;
  text-align: right;
  padding-right: 2.3em;
  line-height: 0.6;
  top: 0.15em;
}

.code-block div:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
  
/* ギャラリー全体の設定 */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 0 8px;
  margin: 0 auto;
}

  /* ギャラリーの写真の設定 */
.image-container {
  aspect-ratio: 1 / 1;
  width: 100%;
  background-color: #1e1e1e;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  border: 3px solid #ccc;
  border-top: 3px solid #1e1e1e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.image-container.loaded .spinner {
  display: none;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-content .spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  border: 3px solid #ccc;
  border-top: 3px solid #1e1e1e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translate(-50%, -50%);
  z-index: 10;
}
.modal-content.loaded .spinner {
  display: none;
}

#modal-image {
    max-width: 90%;
}

.modal-info {
    margin-top: 10px;
    color: #fff;
}

.modal-info h2 {
    margin: 8px 0 15px;
    font-size: 24px;
}

#modal-place {
    margin: 15px 0 15px;
    font-size: 18px;
}

#modal-camera{
    margin: 15px 0 15px;
    font-size: 14px;
}

#modal-desc {
    margin: 15px 0 10px;
    font-size: 12px;
}

body.modal-open {
  overflow: hidden;
  height: 100vh;
}

.tag-section h3 {
  color: var(--color-lightblue);
  margin: 24px 0 6px;
  font-size: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 50px;
}

.tag-list button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background-color: #333;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.tag-list button:hover {
  color: var(--color-lightblue);
}

.tag-list button.active {
  background-color: var(--color-lightblue);
  color: #000;
}

/* ライトモード時の設定 */
/* @media (prefers-color-scheme: light) {
  body {
    background-color: #FFFFFF;
    color: #000000;
  }

  .definitions {
    color: #000000;
  }

  .secret-button:hover {
    border-color: #5db14e;
    color: #5db14e;
  }

  .keyword {
    color: #a0459f
  }

  .string {
    color: #c03e2a;
  }

  .comment {
    color: #737f8b;
  }

  .number {
    color: #272ad0;
  }

  .type {
    color: #4524a9;
  }

  .user-type {
    color: #296188;
  }

  .property {
    color: #367bac
  }

  .code-block {
    background-color: #f5f5f5;
    color: #000;
  }

  .row-num {
    color: #a6a6a6;
  }

  .profile-left h2 {
    text-align: center;
    color: #5db14e;
  }

  h1 {
    text-align: center;
    color: #5db14e;
    margin-bottom: 40px;
    margin-top: 40px;
    font-size: 35px;
  }

  .sns-links a {
    font-size: 15px;
    padding-left: 20px;
    color: #000000;
  }

  .sns-wrapper :hover {
    opacity: 0.7; 
    background-color: #aeaeae00;
  }

  .top-nav {
    background-color: #f8f8f8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .site-title a {
    color: #222;
  }

  .site-title a:hover,
  .site-title a.active:hover {
    color: #5db14e;
  }

  .nav-label {
    color: #222;
  }

  .hamburger span {
    background: #000000;
  }


  .hamburger.open span:nth-child(1),
  .hamburger.open span:nth-child(3) {
    background: #5db14e;
  }
  
  .image-container {
    background-color: #f9f8f8;
  }

  .tag-section h3 {
    color: #4caf50;
  }

  .tag-list button {
    background-color: #f8f8f8;
    color: #222;
  }

  .tag-list button:hover {
    color: #4caf50;
  }

  .tag-list button.active {
    background-color: #4caf50;
    color: #fff;
}
} */

/* スマホ用の設定 */
@media (max-width: 700px) {

  h1 {
    font-size: 30px;
  }

  .nav-group {
    column-gap: 20px;
    grid-template-columns: 50px 1fr;
    margin-bottom: 0px;
  }

  .nav-links a {
    line-height: 1.5;
  }

  .modal-content {
    max-width:  100%;
}

  .nav-label {
    padding-right: 20px;
    font-size: 10px;
    width: 50px;
  }

  .site-title a {
    font-size: 12.5px;
    padding-right: 15px;
  }

  .hamburger {
    top: 25px;
    right: 18px;
    width: 28px;
    height: 20px;
  }

  .hamburger span {
    height: 2px;
  }

  .hamburger span:nth-child(1) {
    top: 0;
  }

  .hamburger span:nth-child(2) {
    top: 9px;
  }

  .hamburger span:nth-child(3) {
    top: 18px;
  }

  .hamburger.open span:nth-child(1),
  .hamburger.open span:nth-child(3) {
    top: 9px;
  }

  .site-logo img {
    height: 35px;
  }

  .definitions p {
    line-height: 1.3;
    font-size: 13px;
  }
  
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
  }

  .tag-list {
    margin: 8px 15px 8px 18px;
    gap: 6px;
    justify-content: flex-start;
  }

  .tag-list button {
    font-size: 12.5px;
    padding: 4px 10px;
    border-radius: 4px;
  }

  .profile-layout {
    flex-direction: column;
    align-items: center;
  }

  .profile-pic {
    margin-top: 5px;
  }


}

@media (max-width: 860px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .code-block {
    font-size: 10px;
    padding-right: 8px;
    padding-left: 8px;
    padding-top: 10px;
    padding-bottom: 0px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .code-block div {
    padding-left: 2.3em;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 0.6; 
  }

  .code-block div::before {
    font-size: 9px;
    top: 0.1em; 
  }
}

/* 新しいページを作るときの表示 */
  /* .coming-soon h2 {
    display: flex;
    justify-content: center;
    align-items: center;    
    font-size: 24px;
    color: #555;
    margin-bottom: 300px;
    margin-top: 200px;
  }

  .coming-soon p {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #555;
  } */
