html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  color: #fff;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 120px;
  box-sizing: border-box;
}

.name {
  font-size: 1.5em;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  text-align: center;
  margin-bottom: 15px;
}

.icon-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid white; /* 枠線の色 */
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  position: relative;
  animation: iconBorderExpand 1.5s ease-out forwards; /* アイコンの枠線が広がるアニメーション */
}

.icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: iconScaleIn 1.5s ease-out forwards; /* アイコンが出てくる */
}

/* アイコンの枠線が広がる */
@keyframes iconBorderExpand {
  0% {
    border-width: 4px;
    transform: scale(0);
  }
  50% {
    border-width: 12px; /* 枠線の太さを広げる */
    transform: scale(1.1);
  }
  100% {
    border-width: 4px; /* 元の枠線幅に戻る */
    transform: scale(1);
  }
}

/* アイコンがふわっと出る */
@keyframes iconScaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.ringing-animated {
  font-size: 1.5rem;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-left: 50px;
  animation: fadeIn 1s ease-out forwards, fadeBlink 3s ease-in-out 1s infinite;
}

.ringing-animated::before {
  content: "\1F4DE";
  font-size: 2rem;
  position: absolute;
  left: 0;
  animation: shake 1s infinite ease-in-out;
  z-index: 2;
}

.ringing-animated::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: pulse 1.5s infinite ease-out;
  z-index: 1;
}

.timer {
  font-size: 1.4rem;
  margin-top: 20px;
  color: white;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
  text-align: center;
}

#lineAddBtn {
  background-color: #ff6347;  /* 赤系の色（警告的な感じ） */
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 25px;
  padding: 15px 30px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 99, 71, 0.5); /* 赤みのあるシャドウ */
  transition: background-color 0.3s ease;
  margin-top: 40px;
  text-align: center;
  animation: pulse 2s infinite ease-in-out;  /* 点滅アニメーション */
}

#lineAddBtn:hover {
  background-color: #ff4500;  /* 赤みが強い色に変更 */
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

#lineAddBtn span {
  font-size: 3rem; /* 🔇アイコンを大きく表示 */
  animation: iconSwitch 2s ease-in-out forwards;
}

@keyframes iconSwitch {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* フェードインアニメーション */
.fade-in {
  opacity: 0;
  animation: fadeIn 1.2s ease-out forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }
.delay-4 { animation-delay: 1.2s; }
.delay-5 { animation-delay: 1.5s; }

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  50% { transform: rotate(-15deg); }
  75% { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

/* スマホ用調整 */
@media (max-width: 480px) {
  .name {
    font-size: 1.3em;
    margin-bottom: 12px;
  }

  .icon-wrap {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
  }

  .ringing {
    font-size: 1.2rem;
    margin-bottom: 24px;
  }

  #lineAddBtn {
    padding: 12px 24px;
    font-size: 1rem;
  }
}
