body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f7fa;
  color: #333;
  text-align: center;
}

/* ヘッダー */
header {
  background: #4CAF50;
  color: white;
  padding: 15px;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
}

/* 入力エリア */
.input-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#name-input {
  padding: 14px;
  font-size: 1.1rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  flex: 1;
  max-width: 400px;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

button i {
  font-size: 1rem;
}

/* ボタン共通カラー（落ち着いたトーンで統一） */
#add-btn, .timer-row .start-btn { background: #2196F3; color: white; }
#toggle-sound { background: #FF9800; color: white; }

#start-all, .timer-row .start-btn { background: #4CAF50; color: white; }
#pause-all, .timer-row .pause-btn { background: #f44336; color: white; }
#stop-all-sounds, .timer-row .stopSound-btn { background: #9C27B0; color: white; }
#reset-all, .timer-row .reset-btn { background: #4664f9; color: white; }
#delete-all, .timer-row .delete-btn { background: #607D8B; color: white; }

/* タイマーリスト */
main {
  padding: 20px;
}

/* FAQセクション */
.faq-section {
  margin: 30px auto;
  max-width: 700px;
  text-align: left;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #333;
}

.faq-item {
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-question {
  width: 100%;
  padding: 15px;
  background: #f9f9f9;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: #f1f1f1;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 15px;
}

.faq-answer p {
  margin: 15px 0;
  color: #555;
}

.faq-item.active .faq-answer {
  max-height: 200px; /* 必要に応じて調整 */
  padding: 0 15px 15px;
}

.faq-item .icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.faq-item.active .icon {
  transform: rotate(45deg); /* ＋ を × に */
}

/* FAQカテゴリタブ */
.faq-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.faq-tab {
  padding: 8px 16px;
  border: 1px solid #ccc;
  background: #f9f9f9;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: 0.3s;
}

.faq-tab.active {
  background: #4CAF50;
  color: white;
  border-color: #4CAF50;
}

.faq-content {
  display: none;
}

.faq-content.active {
  display: block;
}


.timer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* ボタン含め中央揃え */
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.timer-row input[type="text"] {
  font-size: 1.2rem;
  font-weight: bold;
  background: #f9f9f9;
  border: 2px solid #ccc;
  padding: 12px;
  border-radius: 0.5rem;
}

.timer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* デフォルトでも中央寄せ */
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.timer-row button {
  padding: 10px 16px;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;  /* ★ これを追加 */
  text-align: center;
  flex: 1 1 auto;
}

.timer-row select {
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  background: #f9f9f9;
}
.timer-row select:focus {
  border-color: #2196F3;
  box-shadow: 0 0 5px rgba(33,150,243,0.5);
}

/* スマホ・タブレット時のレイアウト調整 */
@media (max-width: 768px) {
  .timer-row {
    flex-direction: column;
    align-items: center;
  }
  .timer-row input[type="text"],
  .timer-row input[type="time"],
  .timer-row select {
    width: 100%;
    max-width: 300px;
  }

  .timer-row button {
    width: 100%;                  /* ボタン幅を全幅に */
    max-width: 250px;             /* 見やすさのため制限 */
    justify-content: center;
    text-align: center;           /* テキスト中央 */
  }
}

/* ステータス */
.timer-status.running { color: green; font-weight: bold; }
.timer-status.stopped { color: gray; }
.timer-status.finished { color: red; font-weight: bold; }

.stop-time {
  font-size: 0.8rem;
  color: #666;
  width: 100%;
  text-align: center;
  margin-top: 5px;
}

.flash {
  animation: flash 1s infinite;
}

@keyframes flash {
  0% { background-color: #fff; }
  50% { background-color: #ffebee; }
  100% { background-color: #fff; }
}

/* フッター */
footer {
  background: #eee;
  padding: 15px;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.controls {
  display: flex;
  justify-content: center; /* 一括ボタン中央揃え */
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

/* アラームリスト */
#footer-list {
  list-style: none;
  padding: 0;
}

#footer-list li {
  padding: 6px;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
}

#footer-list li:hover {
  background: #f0f0f0;
}

/* 広告も中央寄せ */
.ad-area {
  margin-top: 20px;
  text-align: center;
}

/* フッター下部 */
.footer-bottom {
  margin-top: 15px;
  font-size: 0.9rem;
}

.footer-bottom nav a {
  color: #333;
  text-decoration: none;
  margin: 0 5px;
}

.footer-bottom nav a:hover {
  text-decoration: underline;
}

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

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 1rem;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-content button {
  margin: 10px;
  padding: 10px 20px;
  border-radius: 0.5rem;
  cursor: pointer;
}

#enable-sound { background: #4CAF50; color: white; }
#skip-sound { background: #ddd; }

/* レスポンシブ */
@media (max-width: 768px) {
  .input-area {
    flex-direction: column;
  }
  .controls {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .timer-row {
    flex-direction: column;
    align-items: center;
  }
  .timer-row input[type="time"] {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  background: #222;
  color: #0f0;  /* 緑デジタル文字風 */
  text-align: center;
  border: none;
  padding: 8px;
  border-radius: 0.5rem;
}
.timer-status.running { color: #4CAF50; }
.timer-status.finished { color: #f44336; }
}
