/* ---- 共通スタイル ---- */
body {
  margin: 0;
  font-family: 'Shippori Mincho B1', 'Noto Sans JP', serif;
  color: #333;
  background-color: #f7f7f7;
}

main {
  position: relative;
  padding: 3em 1.5em;
  margin: 0 auto;
  max-width: 480px;                  /* デスクトップでは背景を広く見せる */
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0;
  z-index: 1;
  min-height: 100vh;                /* 上下の隙間をなくすために全高を確保 */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

main::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px) brightness(1.4);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0;
  z-index: -1;
}

.icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.links {
  margin-top: 2em;
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: center;
}

.my-name {
  font-size: 2rem;
  font-weight: bold;
  margin: 0.5em 0;
}

.bio{
  color: #222;
  text-shadow: none;
  max-width: 500px;
  margin: 1em auto;
  font-size: 1rem;
  line-height: 1.6;
}

.bio-long {
  display: block;
}

.bio-short {
  display: none;
}

.link-button {
  padding: 0.8em 2em;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 2em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #222;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.link-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* ---- オープニング ---- */
#intro-cover {
  position: fixed;
  inset: 0;
  background: black;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid white;
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- 背景 ---- */
#background {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* ---- 季節毎のスタイル ---- */
body.morning .bio {
  color: #3a5a78;
  text-shadow: none;
}

body.morning .my-name {
  color: #3a5a78;
  text-shadow: none;
  font-size: 2rem;
  margin-top: 0.5em;
}

body.morning .link-button {
  color: #3a5a78;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(58, 90, 120, 0.2);
}

body.night .bio {
  color: #e8f0ff;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

body.night .my-name {
  color: #e8f0ff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  font-size: 2rem;
  margin-top: 0.5em;
}

body.night .link-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(200, 200, 255, 0.3);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

/* ---- レスポンシブ対応 ---- */
@media (max-width: 600px) {
  main {
    max-width: 80vw;     /* スマホでは画面に合わせてやや広く */
    padding: 1.5em 1em;
  }

  main::before {
    backdrop-filter: blur(5px) brightness(1.3); /* やや抑える */
    background-color: rgba(255, 255, 255, 0.1); /* 控えめな白 */
  }

  .icon {
    width: 80px;
    height: 80px;
  }

  .bio {
    font-size: 0.95rem;
    padding: 0 1em;
  }

  .bio-long {
    display: none;
  }

  .bio-short {
    display: block;
  }

  .link-button {
    font-size: 1rem;
    padding: 0.8em 1.2em;
  }
}

@media (max-width: 400px) {
  main {
    max-width: 100vw;     /* スマホでは画面に合わせてやや広く */
    padding: 1em 0.5em;
  }
}