/* リストアイテムのレイアウト */
#word-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  transition: background-color 0.2s;
}

#word-list li:hover {
  background: #e9ecef;
}

.content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.word-text {
  font-weight: 600;
  font-size: 1.1rem;
  color: #212529;
}

.word-meaning {
  font-size: 0.9rem;
  color: #6c757d;
}

.spoken-date {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
  margin-top: 0.25rem;
}

.timestamp {
  font-size: 0.8rem;
  color: #adb5bd;
  margin-top: 0.25rem;
}

/* アクションボタンコンテナ */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* 編集ボタン */
.edit-btn {
  padding: 0.5rem 1rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.edit-btn:hover {
  background: #0056b3;
}

/* 削除ボタン */
.delete-btn {
  padding: 0.5rem 1rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.delete-btn:hover {
  background: #c82333;
}

/* 編集モード */
.edit-mode {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.edit-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  margin-top: 0.25rem;
  margin-bottom: 0.1rem;
}

.edit-word-input,
.edit-date-input,
.edit-meaning-input {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 2px solid #ced4da;
  border-radius: 6px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.edit-word-input:focus,
.edit-date-input:focus,
.edit-meaning-input:focus {
  outline: none;
  border-color: #007bff;
}

.edit-meaning-input {
  resize: vertical;
  min-height: 60px;
}

.edit-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.save-edit-btn,
.cancel-edit-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.save-edit-btn {
  background: #28a745;
  color: white;
}

.save-edit-btn:hover {
  background: #218838;
}

.cancel-edit-btn {
  background: #6c757d;
  color: white;
}

.cancel-edit-btn:hover {
  background: #5a6268;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
  #word-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons {
    width: 100%;
  }

  .edit-btn,
  .delete-btn {
    flex: 1;
  }
}
